:root {
  --page: #f4f6f9;
  --surface: #ffffff;
  --ink: #18212f;
  --muted: #667085;
  --line: #e3e8ef;
  --green: #168765;
  --green-soft: #e9f6f1;
  --blue: #2563b9;
  --blue-soft: #edf4ff;
  --amber: #b76b16;
  --amber-soft: #fff6e8;
  --red: #b33b35;
  --red-soft: #fff0ef;
  --shadow: 0 12px 30px rgba(25, 38, 56, .08);
}



* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--page); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 900; }
.brand img { width: 40px; height: 40px; border-radius: 8px; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 700; }
.text-link, .text-button { border: 0; color: var(--blue); background: transparent; font-size: 14px; font-weight: 800; }

.auth-screen { min-height: 100vh; background: #f5f5f3; }
.auth-header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 12px clamp(20px, 5vw, 72px); border-bottom: 1px solid rgba(227, 232, 239, .85); background: rgba(255, 255, 255, .9); }
.auth-main { width: min(1040px, calc(100% - 32px)); min-height: calc(100vh - 126px); margin: 0 auto; display: grid; grid-template-columns: 1fr 420px; gap: 72px; align-items: center; padding: 48px 0; }
.auth-copy h1 { max-width: 600px; margin: 0; font-size: 48px; line-height: 1.15; letter-spacing: 0; }
.auth-copy > p:not(.eyebrow) { max-width: 560px; margin: 20px 0 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--green); font-size: 12px; font-weight: 900; }
.auth-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.auth-points span { padding: 8px 11px; border: 1px solid #cfe3da; border-radius: 6px; color: #28624e; background: #f7fcfa; font-size: 13px; font-weight: 800; }
.auth-panel { padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.auth-tabs, .segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; border-radius: 7px; background: #eef1f5; }
.auth-tab, .segmented button { min-height: 40px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 800; }
.auth-tab.active, .segmented button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(28, 40, 55, .08); }
.auth-panel h2 { margin: 24px 0 18px; font-size: 22px; }
label { display: block; color: #344054; font-size: 13px; font-weight: 800; }
input, select, textarea { width: 100%; margin-top: 7px; border: 1px solid #d4dbe5; border-radius: 6px; color: var(--ink); background: #fff; outline: 0; }
input, select { min-height: 44px; padding: 0 12px; }
textarea { padding: 11px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 185, .1); }
.auth-panel label + label { margin-top: 15px; }
.consent-row { display: flex; align-items: flex-start; gap: 9px; margin: 18px 0 !important; color: var(--muted); line-height: 1.55; }
.consent-row input { flex: 0 0 auto; width: 17px; min-height: 17px; margin: 2px 0 0; accent-color: var(--green); }
.consent-row a { color: var(--blue); }
.primary, .secondary, .danger-button, .wechat-pay { min-height: 42px; padding: 0 18px; border-radius: 6px; font-weight: 900; }
.primary { border: 1px solid var(--green); color: #fff; background: var(--green); }
.secondary { border: 1px solid #ccd5e1; color: #344054; background: #fff; }
.danger-button { border: 1px solid var(--red); color: #fff; background: var(--red); }
.wide { width: 100%; }
.small { min-height: 36px; padding: 0 13px; font-size: 13px; }
button:disabled { cursor: not-allowed; opacity: .48; }
.form-message { min-height: 20px; margin: 12px 0 0; color: var(--red); font-size: 13px; text-align: center; }
.simple-footer { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 24px; color: var(--muted); font-size: 12px; }

.app-shell { min-height: 100vh; padding: 70px 0 0 220px; }
.app-header { position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(14px); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: #475467; background: #fff; font-size: 22px; }
.account-button { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; }
.account-button span, .profile-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: var(--green); font-size: 13px; font-weight: 900; }
.account-button strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.side-nav { position: fixed; z-index: 40; top: 70px; left: 0; bottom: 0; width: 220px; display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; border-right: 1px solid var(--line); background: #fff; }
.nav-item { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 0; border-radius: 6px; color: #596579; background: transparent; font-size: 14px; font-weight: 800; text-align: left; }
.nav-item span { width: 22px; color: #7d899b; font-size: 18px; text-align: center; }
.nav-item:hover { background: #f4f6f9; }
.nav-item.active { color: #126d52; background: var(--green-soft); }
.nav-item.active span { color: var(--green); }
.workspace { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 30px 0 70px; }
.workspace-toolbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.workspace-toolbar h1 { margin: 0; font-size: 28px; line-height: 1.2; }
.child-picker { min-width: 220px; color: var(--muted); }
.child-picker select { margin-top: 4px; }
.view { display: none; }
.view.active { display: block; }
.status-band, .profile-band, .membership-status, .records-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.child-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.child-identity > div, .profile-band > div { min-width: 0; }
.child-identity strong, .profile-band strong { display: block; overflow-wrap: anywhere; font-size: 18px; }
.child-identity small, .child-identity span:not(.avatar), .profile-band small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.avatar { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--blue); font-weight: 900; }
.status-pill { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.status-pill.online { color: #126d52; background: var(--green-soft); }
.status-pill.offline { color: var(--red); background: var(--red-soft); }
.status-pill.neutral { color: #596579; background: #eef1f5; }
.metric-grid, .location-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.metric { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; min-height: 26px; margin: 9px 0 5px; overflow-wrap: anywhere; font-size: 20px; }
.metric small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-section { margin-top: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 17px; }
.section-head p, .section-head > span { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.action-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.command-button { min-height: 116px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fafbfc; text-align: left; }
.command-button > span { color: #596579; font-size: 20px; }
.command-button strong { font-size: 14px; }
.command-button small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.command-button.danger { border-color: #f0cfcc; background: var(--red-soft); }
.command-button.danger > span { color: var(--red); }
.command-button.success { border-color: #cce5db; background: var(--green-soft); }
.command-button.success > span { color: var(--green); }
.command-button.blue { border-color: #d6e3f7; background: var(--blue-soft); }
.command-button.blue > span { color: var(--blue); }
.command-button.amber { border-color: #efdfc6; background: var(--amber-soft); }
.command-button.amber > span { color: var(--amber); }
.alert-list { display: grid; gap: 8px; }
.alert-row { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #edf0f4; }
.alert-row:first-child { border-top: 0; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.alert-row strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.alert-row small, .alert-row time { color: var(--muted); font-size: 11px; }
.muted-empty { width: 100%; margin: 20px 0; color: var(--muted); font-size: 13px; text-align: center; }
.empty-state { margin-top: 12px; padding: 54px 20px; border: 1px dashed #cdd5df; border-radius: 8px; background: #fff; text-align: center; }
.empty-state strong { font-size: 18px; }
.empty-state p { color: var(--muted); }

.segmented { width: min(360px, 100%); grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; }
.records-summary strong { display: block; margin-top: 4px; font-size: 28px; }
.records-summary span { color: var(--muted); font-size: 12px; }
.usage-chart { height: 190px; display: grid; grid-template-columns: repeat(24, minmax(4px, 1fr)); align-items: end; gap: 4px; padding-top: 16px; }
.chart-bar { position: relative; min-height: 4px; border-radius: 3px 3px 0 0; background: #b9c8dc; }
.chart-bar.active { background: var(--blue); }
.chart-bar span { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); color: var(--muted); font-size: 9px; }
.app-list { display: grid; gap: 2px; }
.app-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #edf0f4; }
.app-row:first-child { border-top: 0; }
.app-rank { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 900; }
.app-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.app-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.app-duration { color: #344054; font-size: 12px; font-weight: 900; white-space: nowrap; }
.limit-button { min-height: 34px; padding: 0 10px; border: 1px solid #d2dae5; border-radius: 5px; color: #475467; background: #fff; font-size: 11px; font-weight: 800; }
.limit-button.active { border-color: #edc4c1; color: var(--red); background: var(--red-soft); }

.guard-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; }
.guard-layout .tool-section { margin-top: 0; }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.mode-button { min-height: 86px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fafbfc; text-align: left; }
.mode-button strong { font-size: 14px; }
.mode-button span { color: var(--muted); font-size: 11px; }
.mode-button.danger { border-left: 4px solid var(--red); }.mode-button.success { border-left: 4px solid var(--green); }.mode-button.blue { border-left: 4px solid var(--blue); }.mode-button.amber { border-left: 4px solid var(--amber); }
.mode-button.release-all { grid-column: 1 / -1; min-height: 66px; border-left: 4px solid var(--ink); }
.setting-list, .permission-list { display: grid; }
.setting-row { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #edf0f4; }
.setting-row:first-child { border-top: 0; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 13px; }.setting-row small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.switch { appearance: none; flex: 0 0 auto; width: 42px; min-height: 24px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: #c7ced8; transition: .18s; }
.switch::after { content: ""; display: block; width: 20px; height: 20px; margin: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: .18s; }
.switch:checked { background: var(--green); }.switch:checked::after { transform: translateX(18px); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row button { min-height: 38px; padding: 0 13px; border: 1px solid #d4dce7; border-radius: 6px; color: #475467; background: #fff; font-size: 12px; font-weight: 800; }
.permission-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 11px 0; border-top: 1px solid #edf0f4; font-size: 13px; }
.permission-item:first-child { border-top: 0; }.permission-item span:last-child { color: var(--red); font-size: 12px; font-weight: 900; }.permission-item.ok span:last-child { color: var(--green); }

.membership-gate { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; border: 1px solid #ead7af; border-radius: 8px; background: var(--amber-soft); }
.map-frame { height: min(52vh, 520px); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #dfe6ea; }
.map-frame { position: relative; isolation: isolate; }
.map-tiles { position: absolute; inset: 0; overflow: hidden; background: #dfe6ea; }
.map-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; }
.map-marker { position: absolute; z-index: 2; left: 50%; top: 50%; width: 18px; height: 18px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; background: #e5484d; box-shadow: 0 2px 7px rgba(50, 30, 30, .35); transform: translate(-50%, -75%) rotate(-45deg); }
.map-marker::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.map-empty { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; color: #667085; background: #e6ebef; font-size: 14px; }
.map-fallback { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; gap: 7px; padding: 20px; color: #344054; text-align: center; background: #e5e5e1; }
.map-fallback strong { font-size: 17px; }.map-fallback span { color: #16704c; font-size: 14px; font-weight: 900; }.map-fallback small { color: #667085; font-size: 12px; }
.map-attribution { position: absolute; right: 6px; bottom: 5px; z-index: 4; padding: 2px 5px; border-radius: 3px; color: #46505d; background: rgba(255, 255, 255, .82); font-size: 10px; }
.location-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.screen-toolbar { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.screen-stage { position: relative; width: min(430px, 100%); min-height: 580px; display: grid; place-items: center; margin: 0 auto; overflow: hidden; border: 1px solid #2c3747; border-radius: 8px; background: #111820; }
.screen-stage img { display: block; max-width: 100%; max-height: 74vh; }
.screen-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; color: #d7dce3; text-align: center; }
.screen-actions { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }

.community-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; margin-bottom: 12px; }.community-toolbar input { margin: 0; }
.community-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.post-card { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.post-card header { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }.post-card h2 { margin: 12px 0 7px; overflow-wrap: anywhere; font-size: 16px; }.post-card p { margin: 0; color: #4d596b; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }.post-card footer { display: flex; justify-content: space-between; margin-top: 14px; color: var(--muted); font-size: 11px; }

.membership-status { border-color: #e7d5b0; background: var(--amber-soft); }.membership-status strong { display: block; margin: 6px 0; font-size: 24px; }.membership-status span, .membership-status small { color: #75511f; font-size: 12px; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.product { min-height: 164px; display: flex; flex-direction: column; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.product.selected { border: 2px solid var(--green); padding: 16px; background: #f7fcfa; }.product span { color: var(--muted); font-size: 11px; }.product strong { margin-top: 8px; font-size: 16px; }.product b { margin-top: auto; color: var(--ink); font-size: 25px; }.product small { margin-top: 5px; color: var(--green); font-size: 11px; font-weight: 900; }
.payment-bar { position: sticky; z-index: 10; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 14px 16px; border: 1px solid #cdd8d3; border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }.payment-bar span { display: block; color: var(--muted); font-size: 11px; }.payment-bar strong { display: block; margin-top: 4px; font-size: 14px; }.wechat-pay { min-width: 130px; border: 1px solid #07a65a; color: #fff; background: #07a65a; }
.inline-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }.inline-form input { margin: 0; }
.order-state { padding: 12px; border-radius: 6px; color: #75511f; background: var(--amber-soft); font-size: 13px; font-weight: 800; }

.profile-band { justify-content: flex-start; }.profile-avatar { flex: 0 0 auto; width: 48px; height: 48px; font-size: 17px; }.profile-band .secondary { margin-left: auto; }
.children-list { display: grid; gap: 8px; }.child-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid #edf0f4; }.child-row:first-child { border-top: 0; }.child-row strong, .child-row small { display: block; }.child-row small { margin-top: 4px; color: var(--muted); font-size: 11px; }.child-row button { min-height: 34px; padding: 0 10px; border: 1px solid #d2dae5; border-radius: 5px; color: #475467; background: #fff; font-size: 12px; font-weight: 800; }
.link-list { padding: 0 18px; }.link-list a { min-height: 52px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #edf0f4; font-size: 13px; font-weight: 800; }.link-list a:first-child { border-top: 0; }.link-list strong { color: #98a2b3; font-size: 20px; }

dialog { width: min(480px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 8px; color: var(--ink); box-shadow: 0 24px 70px rgba(21,32,48,.25); }dialog::backdrop { background: rgba(17,24,39,.55); }.dialog-form { padding: 22px; }.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }.dialog-head h2 { margin: 0; font-size: 19px; }.dialog-form > label { margin-top: 15px; }.dialog-form > p { color: #4d596b; font-size: 14px; line-height: 1.7; }.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.loading { position: fixed; z-index: 100; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #fff; background: rgba(17,24,39,.45); }.loading span { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }.loading strong { font-size: 13px; }.toast { position: fixed; z-index: 110; left: 50%; bottom: 24px; max-width: min(440px, calc(100% - 28px)); padding: 11px 15px; border-radius: 6px; color: #fff; background: #263142; font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.bottom-nav { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1040px) {
  .action-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .auth-main { grid-template-columns: 1fr; gap: 28px; padding: 34px 0 72px; }.auth-copy h1 { font-size: 34px; }.auth-copy > p:not(.eyebrow) { font-size: 14px; }.simple-footer { flex-wrap: wrap; gap: 10px 20px; padding: 12px 20px; }
  .app-shell { padding: 62px 0 calc(76px + env(safe-area-inset-bottom)); }.app-header { height: 62px; padding: 8px 14px; }.app-header .brand span { display: none; }.account-button strong { display: none; }.side-nav { display: none; }.workspace { width: min(100% - 24px, 680px); padding: 18px 0 32px; }.workspace-toolbar { align-items: flex-end; margin-bottom: 14px; }.workspace-toolbar h1 { font-size: 23px; }.child-picker { min-width: 152px; max-width: 48%; }.child-picker select { min-height: 40px; font-size: 12px; }
  .bottom-nav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; min-height: calc(62px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px 4px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); }.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; color: #7a8698; background: transparent; font-size: 10px; font-weight: 800; }.bottom-nav button span { font-size: 18px; }.bottom-nav button.active { color: var(--green); }
  .status-band, .profile-band, .membership-status, .records-summary { padding: 14px; }.metric-grid, .location-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.metric { padding: 14px; }.metric strong { font-size: 17px; }.tool-section { padding: 16px; }.action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.command-button { min-height: 96px; }.guard-layout { grid-template-columns: 1fr; }.product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.community-list { grid-template-columns: 1fr; }.usage-chart { gap: 2px; }.app-row { grid-template-columns: 30px minmax(0,1fr) auto; }.app-row .limit-button { grid-column: 2 / 4; width: 100%; }.screen-stage { min-height: 480px; }.payment-bar { bottom: calc(70px + env(safe-area-inset-bottom)); }.toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

/* Refined family control room: restrained surfaces, stronger hierarchy. */
:root {
  --page: #f4f6f8;
  --surface: #ffffff;
  --ink: #142033;
  --muted: #687386;
  --line: #e1e6ec;
  --blue: #2859d6;
  --blue-soft: #edf2ff;
  --green: #17845a;
  --green-soft: #eaf7f1;
  --amber: #a76512;
  --amber-soft: #fff4df;
  --red: #cf3f48;
  --red-soft: #fff0f1;
  --shadow: 0 8px 26px rgba(20,32,51,.07);
}

body,
.app-shell,
.auth-screen {
  background: linear-gradient(135deg, #f7f8fa 0%, #eef3f5 52%, #f5f7f9 100%);
  background-attachment: fixed;
}

.app-header,
.side-nav,
.auth-header {
  border-color: var(--line) !important;
  background: rgba(250,251,252,.92) !important;
  box-shadow: none;
}
.app-header .icon-button,
.app-header .account-button,
.child-picker select {
  border-color: var(--line) !important;
  border-radius: 10px !important;
  background: #fff !important;
}
.app-header .brand img { border-radius: 10px !important; }
.account-button span,
.profile-avatar { border-radius: 10px !important; }
.side-nav { background: #f8fafb !important; }
.nav-item { border-radius: 10px !important; }
.nav-item.active {
  color: var(--blue) !important;
  background: #fff !important;
  box-shadow: inset 3px 0 0 var(--blue), 0 4px 16px rgba(20,32,51,.05);
}

.workspace { padding-bottom: 40px; }
.workspace-toolbar { padding-bottom: 26px; }
.workspace-toolbar h1 { letter-spacing: 0; }

.device-hero,
.quick-section,
.today-panel,
.alerts-panel,
.tool-section,
.status-band,
.profile-band,
.membership-status,
.records-summary,
.metric,
.empty-state,
.membership-gate,
.post-card,
.product,
.payment-bar {
  border-color: var(--line) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 5px 20px rgba(20,32,51,.055) !important;
  backdrop-filter: none;
}

.device-hero {
  min-height: 230px;
  color: #fff;
  border: 0 !important;
  background: linear-gradient(135deg, #173b78 0%, #2859d6 62%, #327ea2 100%) !important;
  box-shadow: 0 16px 36px rgba(29,70,145,.2) !important;
}
.device-hero::after {
  right: -70px;
  bottom: -105px;
  border-color: rgba(255,255,255,.1);
}
.device-hero .device-eyebrow,
.device-hero .child-identity > div > span:last-child,
.device-hero .device-facts span,
.device-hero .device-facts small { color: rgba(255,255,255,.72) !important; }
.device-hero .child-identity strong,
.device-hero .device-facts strong { color: #fff !important; }
.device-hero .avatar {
  color: #173b78 !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(4,24,60,.18);
}
.device-hero .status-pill { color: #0d704a !important; background: #dff8ec !important; }
.device-facts {
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 12px !important;
  background: rgba(5,26,63,.18) !important;
  backdrop-filter: blur(12px);
}
.device-facts article { background: transparent !important; }
.device-facts article + article { border-left: 1px solid rgba(255,255,255,.14); }

.quick-section { padding: 22px !important; }
.action-grid { gap: 9px; }
.command-button {
  min-height: 104px;
  border-color: var(--line) !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}
.command-button:hover { transform: translateY(-2px); border-color: #c8d2df !important; }
.command-button.danger { border-color: #f0c8cc !important; color: var(--red) !important; background: var(--red-soft) !important; }
.command-button.success { border-color: #c5e7d7 !important; color: var(--green) !important; background: var(--green-soft) !important; }
.command-button.blue { border-color: #d4def7 !important; background: var(--blue-soft) !important; }
.command-button.amber { border-color: #f0dfbb !important; background: var(--amber-soft) !important; }
.command-button > span { border-radius: 9px !important; }

.today-panel,
.alerts-panel { min-height: 0; }
.overview-aside { align-content: start; }
.usage-total,
.permission-total { padding: 18px 0; }

.guard-device-head { padding: 2px 2px 14px; }
.guard-avatar {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #173b78, #2859d6);
  box-shadow: 0 8px 20px rgba(40,89,214,.17);
}
.guard-settings-button { border-color: var(--line); border-radius: 10px; background: #fff; box-shadow: none; }
.guard-score-card {
  border-color: var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}
.guard-score-card > span strong { color: var(--blue); }
.guard-score-track { height: 7px; background: #edf1f5; }
.guard-score-track i { background: linear-gradient(90deg, #38a874, #17845a); }
.guard-status-strip {
  margin-top: 10px;
  padding: 11px 6px;
  border-color: var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}
.guard-status-strip > div { border-right-color: var(--line); }
.guard-primary-actions { gap: 8px; margin: 10px 0 14px; }
.guard-action {
  min-height: 58px;
  border-color: var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}
.guard-action span { width: 34px; height: 34px; }
.guard-action.lock { background: var(--red-soft); border-color: #f0c8cc; }
.guard-layout { gap: 12px; }
.mode-button { min-height: 82px; border-radius: 10px !important; box-shadow: none !important; }
.recovery-grid { grid-template-columns: 1fr 1fr; }
.recovery-grid .release-all { grid-column: auto; }
.setting-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.setting-row { background: #fff; }
.choice-row button { border-radius: 9px; }

.bottom-nav {
  border-color: var(--line) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.94) !important;
  box-shadow: 0 10px 28px rgba(20,32,51,.14) !important;
  backdrop-filter: blur(16px);
}
.bottom-nav button { border-radius: 9px !important; }
.bottom-nav button.active { color: var(--blue) !important; background: var(--blue-soft) !important; }

@media (max-width: 760px) {
  .workspace { width: calc(100% - 28px); padding-bottom: 106px; }
  .workspace-toolbar { min-height: 94px; padding: 16px 0 18px; }
  .workspace-toolbar h1 { font-size: 26px; }
  .device-hero { min-height: 218px; padding: 20px; }
  .quick-section { padding: 18px !important; }
  .command-button { min-height: 88px; padding: 12px; }
  .command-button > span { width: 34px; height: 34px; }
  .bottom-nav { right: 10px !important; bottom: calc(7px + env(safe-area-inset-bottom)) !important; left: 10px !important; min-height: 60px !important; }
  .bottom-nav button span { height: 25px; }
  .guard-score-card { padding: 18px; }
  .guard-score-card > span strong { font-size: 32px; }
  .guard-action { min-height: 56px; }
  .tool-section { padding: 17px; }
  .recovery-grid { grid-template-columns: 1fr; }
}

/* 2026 family-space redesign: new navigation and task-based workspace. */
:root {
  --page: #f6f7fb;
  --surface: #ffffff;
  --ink: #20232a;
  --muted: #6f7682;
  --line: #e3e6ec;
  --coral: #ff6b5f;
  --coral-soft: #fff0ee;
  --blue: #3a62f4;
  --blue-soft: #edf1ff;
  --green: #2e9b72;
  --green-soft: #e9f6f1;
  --amber: #e29a22;
  --amber-soft: #fff5df;
  --violet: #6e5ae6;
  --violet-soft: #f1efff;
  --shadow: 0 12px 32px rgba(37, 43, 58, .08);
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; color: var(--ink); background: var(--page); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.eyebrow, .section-kicker, .nav-label { font-family: inherit; letter-spacing: 0; }

.auth-screen { min-height: 100svh; background: var(--page); }
.auth-header { min-height: 72px; padding: 0 clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); }
.auth-header .brand, .auth-header .text-link { color: var(--ink); }
.auth-header .brand img, .app-header .brand img { border-radius: 8px; }
.auth-main { width: min(1120px, calc(100% - 40px)); min-height: calc(100svh - 132px); grid-template-columns: minmax(0,1.15fr) minmax(340px,.75fr); gap: clamp(44px, 8vw, 112px); align-items: center; }
.auth-copy .eyebrow { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 6px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 800; }
.auth-copy h1 { max-width: 680px; margin-top: 20px; color: var(--ink); font-size: clamp(44px, 5vw, 68px); line-height: 1.08; }
.auth-copy > p:not(.eyebrow) { max-width: 580px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.auth-points { gap: 8px; }
.auth-points span { border: 0; border-radius: 6px; color: #4d5563; background: #e9ebf1; }
.auth-panel { padding: 24px; border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.auth-tabs, .segmented { padding: 4px; border-radius: 7px; background: #eef0f4; }
.auth-tab, .segmented button { border-radius: 5px; }
.auth-tab.active, .segmented button.active { color: var(--blue); background: #fff; box-shadow: 0 2px 8px rgba(37,43,58,.08); }
input, select, textarea { border: 1px solid #d9dde5; border-radius: 7px; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(58,98,244,.12); outline: 0; }
.primary, .wechat-pay { border-color: var(--blue); border-radius: 7px; background: var(--blue); }
.primary:hover, .wechat-pay:hover { border-color: #274bd0; background: #274bd0; }
.secondary { border-color: var(--line); border-radius: 7px; color: var(--ink); background: #fff; }
.danger-button { border-color: var(--coral); border-radius: 7px; background: var(--coral); }
.simple-footer { color: var(--muted); }

.app-shell { min-height: 100vh; padding: 72px 0 0 208px; background: var(--page); }
.app-header { position: fixed; inset: 0 0 auto 0; z-index: 30; height: 72px; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(18px); }
.app-header .brand, .app-header .icon-button, .app-header .account-button { color: var(--ink); }
.app-header .brand small { color: var(--muted); }
.app-header .icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.app-header .account-button { min-height: 40px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.account-button span, .profile-avatar { border-radius: 7px; color: #fff; background: var(--violet); }

.side-nav { position: fixed; top: 72px; bottom: 0; left: 0; width: 208px; padding: 24px 14px; border-right: 1px solid var(--line); background: #fff; }
.nav-label { margin: 0 10px 10px; color: #9ba1ac; font-size: 11px; font-weight: 800; }
.nav-label.nav-secondary { margin-top: 24px; }
.nav-item { min-height: 44px; margin: 2px 0; border-radius: 7px; color: #69717e; font-size: 14px; font-weight: 700; }
.nav-item span { display: grid; place-items: center; width: 34px; height: 32px; margin-right: 5px; color: #8a919d; font-family: inherit; }
.nav-item span svg { width: 19px; height: 19px; }
.nav-item:hover { color: var(--ink); background: #f4f5f8; }
.nav-item.active { border-left: 0; color: var(--blue); background: var(--blue-soft); }
.nav-item.active span { color: var(--blue); }

.workspace { width: min(1280px, calc(100% - 64px)); margin: 0 auto; padding: 32px 0 72px; }
.workspace-toolbar { min-height: 82px; margin-bottom: 22px; border-bottom: 0; }
.workspace-toolbar h1 { margin-top: 4px; color: var(--ink); font-size: 30px; line-height: 1.15; }
.section-kicker { color: var(--muted); font-size: 13px; font-weight: 600; }
.child-picker { color: var(--muted); }
.child-picker select { min-width: 180px; border-color: var(--line); background: #fff; }
.view { animation: view-in .24s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.overview-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.75fr); gap: 20px; align-items: start; }
.overview-main, .overview-aside { display: grid; gap: 20px; }
.device-hero { position: relative; min-height: 272px; overflow: hidden; padding: 28px; border: 1px solid #dfe4f6; border-radius: 8px; background: #f1f4ff; }
.device-hero::after { position: absolute; right: -54px; bottom: -74px; width: 240px; height: 240px; border: 44px solid rgba(58,98,244,.08); border-radius: 50%; content: ""; }
.child-identity { position: relative; z-index: 1; }
.avatar { width: 58px; height: 58px; border-radius: 8px; color: #fff; background: var(--blue); }
.child-identity strong { color: var(--ink); font-size: 22px; }
.device-eyebrow { margin-bottom: 2px; color: var(--blue) !important; font-size: 11px !important; font-weight: 800; }
.status-pill { position: absolute; top: 28px; right: 28px; z-index: 2; border-radius: 6px; font-family: inherit; }
.status-pill.online { color: #1e7958; background: var(--green-soft); }
.device-facts { position: absolute; right: 28px; bottom: 26px; left: 28px; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid rgba(58,98,244,.12); border-radius: 8px; background: rgba(58,98,244,.12); }
.device-facts article { display: grid; min-height: 104px; padding: 18px; background: rgba(255,255,255,.78); }
.device-facts article > span { color: var(--muted); font-size: 12px; }
.device-facts article strong { margin-top: 5px; color: var(--ink); font-size: 20px; }
.device-facts article small { margin-top: 5px; color: var(--muted); }

.quick-section, .today-panel, .alerts-panel, .tool-section { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.section-head { min-height: 44px; padding-bottom: 14px; border-bottom: 0; }
.section-head h2 { color: var(--ink); font-size: 17px; }
.section-head p, .section-head > span { color: var(--muted); }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.command-button { min-height: 118px; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #fff; text-align: left; }
.command-button > span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 7px; color: var(--blue); background: var(--blue-soft); }
.command-button > span svg { width: 18px; height: 18px; }
.command-button strong { color: var(--ink); }
.command-button small { color: var(--muted); }
.command-button:hover { border-color: #bac5ec; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(37,43,58,.07); }
.command-button.danger { border-color: #ffd4d0; color: var(--ink); background: var(--coral-soft); }
.command-button.danger > span { color: #fff; background: var(--coral); }
.command-button.danger strong, .command-button.danger small { color: inherit; }
.command-button.success { border-color: #cde8dd; color: var(--ink); background: var(--green-soft); }
.command-button.success > span { color: #fff; background: var(--green); }
.command-button.success strong, .command-button.success small { color: inherit; }
.command-button.blue > span { color: #fff; background: var(--blue); }
.command-button.amber > span { color: #fff; background: var(--amber); }
.today-panel { min-height: 272px; }
.usage-total, .permission-total { display: grid; padding: 18px 0; border-top: 1px solid var(--line); }
.usage-total > span, .permission-total > span { color: var(--muted); font-size: 12px; }
.usage-total strong, .permission-total strong { margin-top: 5px; color: var(--ink); font-size: 27px; }
.usage-total small, .permission-total small { margin-top: 5px; color: var(--muted); }
.alerts-panel { min-height: 230px; }
.text-button { color: var(--blue); }
.alert-list { display: grid; gap: 8px; }

.status-band, .profile-band, .membership-status, .records-summary { border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 8px; background: #fff; }
.metric-grid { gap: 12px; }
.metric { min-height: 126px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.metric::before { display: none; content: none; }
.metric > span { margin-top: 0; color: var(--muted); }
.metric strong { color: var(--ink); font-size: 22px; }
.metric small { color: var(--muted); }
.guard-layout { gap: 16px; }
.mode-grid { gap: 10px; }
.mode-button { min-height: 92px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.mode-button.danger { border-color: #ffd4d0; color: #b64038; background: var(--coral-soft); }
.mode-button.success { border-color: #cde8dd; color: #247d5e; background: var(--green-soft); }
.mode-button.danger span, .mode-button.success span { color: var(--muted); }
.mode-button.blue { border-color: #d8dfff; color: #294fda; background: var(--blue-soft); }
.mode-button.amber { border-color: #f2ddb5; color: #996412; background: var(--amber-soft); }
.mode-button.release-all { border-color: var(--line); color: var(--coral); background: #fff; }
.setting-row { border-color: var(--line); }
.switch:checked { background: var(--blue); }
.choice-row button { border-radius: 6px; }
.choice-row button.active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.chart-bar { background: #dfe3eb; }
.chart-bar.active, .progress-fill { background: var(--blue); }
.app-rank { color: var(--blue); background: var(--blue-soft); }
.limit-button.active { border-color: var(--coral); color: var(--coral); background: var(--coral-soft); }
.membership-gate { border: 1px solid #f0d9a6; border-left: 1px solid #f0d9a6; border-radius: 8px; background: var(--amber-soft); }
.map-frame, .screen-stage { border-radius: 8px; }
.screen-stage { background: #2b2e35; }
.post-card, .product { border-color: var(--line); border-radius: 8px; }
.product.selected { border-color: var(--blue); background: var(--blue-soft); }
.product small { color: var(--blue); }
.payment-bar { border-color: var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.wechat-pay { background: var(--blue); }
dialog { border-radius: 8px; }
.toast { border-radius: 7px; background: var(--ink); }

.bottom-nav { display: none; }

.legal-page { background: var(--page); }
.legal-header { border-bottom: 1px solid var(--line); color: var(--ink); background: rgba(255,255,255,.96); }
.legal-header nav { color: var(--blue); }
.legal-nav { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.legal-nav a { border-radius: 6px; color: var(--muted); }
.legal-nav a:hover { color: var(--blue); background: var(--blue-soft); }
.legal-content { gap: 14px; }
.legal-content section { padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.legal-content section:first-child { padding-top: 28px; }
.legal-content p, .legal-content li { color: #555d69; }
.legal-footer { border-color: var(--line); background: #fff; }

@media (max-width: 1060px) {
  .workspace { width: calc(100% - 40px); }
  .overview-layout { grid-template-columns: 1fr; }
  .overview-aside { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .auth-header { min-height: 62px; padding: 0 18px; }
  .auth-main { width: calc(100% - 32px); min-height: auto; grid-template-columns: 1fr; gap: 24px; padding: 42px 0; }
  .auth-copy h1 { font-size: 38px; }
  .auth-copy > p:not(.eyebrow) { font-size: 15px; }
  .auth-panel { padding: 18px; }
  .simple-footer { padding-bottom: 28px; }
  .app-shell { padding: 62px 0 calc(82px + env(safe-area-inset-bottom)); }
  .app-header { height: 62px; padding: 0 14px; }
  .app-header .brand small, .app-header .account-button strong { display: none; }
  .app-header .account-button { width: 40px; padding: 0; border: 0; }
  .app-header .account-button span { margin: 0; }
  .side-nav { display: none; }
  .workspace { width: calc(100% - 28px); margin: 0 auto; padding: 20px 0 36px; }
  .workspace-toolbar { min-height: 72px; margin-bottom: 14px; align-items: flex-start; }
  .workspace-toolbar h1 { font-size: 26px; }
  .section-kicker { font-size: 12px; }
  .child-picker { max-width: 132px; font-size: 0; }
  .child-picker select { min-width: 0; width: 132px; height: 40px; font-size: 13px; }
  .overview-layout, .overview-main, .overview-aside { gap: 14px; }
  .overview-aside { grid-template-columns: 1fr; }
  .device-hero { min-height: 286px; padding: 20px; }
  .status-pill { top: 20px; right: 20px; }
  .device-facts { right: 20px; bottom: 20px; left: 20px; }
  .device-facts article { min-height: 100px; padding: 14px; }
  .device-facts article strong { font-size: 17px; }
  .quick-section, .today-panel, .alerts-panel, .tool-section { padding: 16px; }
  .action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .command-button { min-height: 112px; padding: 14px; }
  .guard-layout { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 118px; padding: 15px; }
  .bottom-nav { position: fixed; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); left: 10px; z-index: 50; display: flex; min-height: 66px; padding: 4px; border: 1px solid var(--line) !important; border-radius: 8px; background: rgba(255,255,255,.97) !important; box-shadow: 0 10px 26px rgba(37,43,58,.14); backdrop-filter: blur(18px); }
  .bottom-nav button { min-width: 0; border-radius: 6px; color: #808793; background: transparent; font-size: 11px; }
  .bottom-nav button span { display: grid; place-items: center; height: 29px; color: inherit; font-family: inherit; }
  .bottom-nav button span svg { width: 19px; height: 19px; }
  .bottom-nav button.active { border-top: 0; color: var(--blue); background: var(--blue-soft); }
  .bottom-nav button.active span { color: var(--blue); }
  .legal-header { background: #fff; }
  .legal-nav { background: #fff; }
  .legal-content section { padding: 22px 18px; }
}

@media (max-width: 390px) {
  .workspace { width: calc(100% - 22px); }
  .child-identity strong { max-width: 150px; font-size: 19px; }
  .device-facts article strong { font-size: 15px; }
  .command-button strong { font-size: 13px; }
  .command-button small { font-size: 11px; }
}

@media (max-width: 420px) {
  .auth-panel { padding: 22px 18px; }.auth-points { display: grid; grid-template-columns: repeat(2, 1fr); }.workspace { width: calc(100% - 18px); }.workspace-toolbar { display: grid; grid-template-columns: 1fr 150px; }.metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }.metric { min-height: 112px; }.location-grid { grid-template-columns: 1fr; }.mode-grid { grid-template-columns: 1fr 1fr; }.product-grid { grid-template-columns: 1fr 1fr; gap: 8px; }.product { min-height: 150px; padding: 14px; }.product.selected { padding: 13px; }.payment-bar { align-items: stretch; }.payment-bar > div { min-width: 0; }.payment-bar strong { overflow-wrap: anywhere; }.wechat-pay { min-width: 106px; padding: 0 12px; }.membership-gate { align-items: stretch; flex-direction: column; }.inline-form { grid-template-columns: 1fr; }
}

@layer legacy {
/* Previous visual layer retained for markup compatibility. */
:root {
  --page: #f4f6f2;
  --surface: #ffffff;
  --ink: #18221d;
  --muted: #68736c;
  --line: #dce2dd;
  --green: #147a5a;
  --green-soft: #e9f2ec;
  --blue: #287d8e;
  --blue-soft: #e5f1f2;
  --amber: #d49a2a;
  --amber-soft: #fbf2dd;
  --red: #e1604d;
  --red-soft: #fbe9e5;
  --shadow: none;
}

body { background: var(--page); color: var(--ink); }
.auth-screen { background: var(--page); }
.auth-header { min-height: 74px; border-bottom: 0; background: #18221d; }
.auth-header .brand, .auth-header .text-link { color: #fff; }
.auth-header .brand small { color: #b8c0ba; }
.auth-main { width: min(1160px, calc(100% - 40px)); grid-template-columns: minmax(0, 1fr) minmax(360px, 410px); gap: 92px; }
.auth-copy h1 { font-size: clamp(42px, 5.6vw, 70px); letter-spacing: 0; }
.auth-copy > p:not(.eyebrow) { color: var(--muted); }
.auth-points span { border-color: #c7d8cd; border-radius: 4px; color: #206247; background: #edf5ef; }
.auth-panel { border-radius: 6px; box-shadow: none; }
.auth-tab, .segmented button { border-radius: 3px; }
.auth-tab.active, .segmented button.active { box-shadow: none; }
input, select, textarea { border-radius: 4px; }
.primary, .secondary, .danger-button, .wechat-pay { border-radius: 4px; }
.app-shell { background: var(--page); }
.app-header { border-bottom: 0; background: #18221d; }
.app-header .brand, .app-header .icon-button, .app-header .account-button { color: #fff; }
.app-header .brand small { color: #b8c0ba; }
.app-header .icon-button, .app-header .account-button { border-color: #405048; background: #26332c; }
.account-button span, .profile-avatar { border-radius: 4px; background: var(--red); }
.side-nav { border-right: 0; background: #18221d; }
.nav-item { border-radius: 4px; color: #b8c0ba; }
.nav-item span { color: #819087; }
.nav-item:hover { background: #26332c; }
.nav-item.active { color: #fff; background: #28634f; border-left: 3px solid #2a9d72; }
.nav-item.active span { color: #66c39b; }
.workspace { width: min(1240px, calc(100% - 56px)); }
.workspace-toolbar { border-bottom: 1px solid var(--line); }
.section-kicker, .eyebrow { letter-spacing: .08em; }
.status-band, .profile-band, .membership-status, .records-summary, .metric, .tool-section, .empty-state, .membership-gate, .post-card, .product, .payment-bar { border-radius: 6px; box-shadow: none; }
.status-band, .profile-band, .membership-status, .records-summary, .metric, .tool-section, .post-card, .product { border-color: var(--line); }
.status-band { border-left: 4px solid var(--green); }
.status-pill { border-radius: 4px; }
.metric { background: #fbfcfa; }
.metric strong { color: var(--ink); }
.tool-section { background: #fff; }
.command-button, .mode-button { border-radius: 4px; }
.command-button:hover, .mode-button:hover { border-color: var(--green); transform: translateY(-2px); }
.command-button.blue, .mode-button.blue { border-color: #b9d8dc; background: var(--blue-soft); }
.chart-bar { border-radius: 2px 2px 0 0; background: #bfd7d0; }
.chart-bar.active { background: var(--green); }
.screen-stage { border-radius: 6px; }
.product.selected { border-color: var(--green); background: #edf5ef; }
.payment-bar { box-shadow: 0 -8px 0 var(--page); }
.bottom-nav { background: #18221d; border-top-color: #405048; }
.bottom-nav button { color: #b8c0ba; }
.bottom-nav button.active { color: #66c39b; }

@media (max-width: 760px) {
  .auth-main { width: min(100% - 32px, 560px); gap: 22px; }
  .auth-copy h1 { font-size: 36px; }
  .app-header { background: #18221d; }
  .workspace { width: calc(100% - 24px); }
  .workspace-toolbar { border-bottom: 1px solid var(--line); }
}

.legal-page { background: #f6f7f9; }
.legal-header { position: sticky; z-index: 20; top: 0; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px clamp(18px, 5vw, 70px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.legal-header nav { display: flex; gap: 20px; color: var(--blue); font-size: 13px; font-weight: 800; }
.legal-layout { width: min(1080px, calc(100% - 32px)); display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 28px; margin: 28px auto 56px; }
.legal-nav { position: sticky; top: 96px; align-self: start; display: grid; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.legal-nav a { min-height: 42px; display: flex; align-items: center; padding: 0 11px; border-radius: 6px; color: #596579; font-size: 13px; font-weight: 800; }
.legal-nav a:hover { color: #126d52; background: var(--green-soft); }
.legal-content { display: grid; gap: 14px; }
.legal-content section { scroll-margin-top: 88px; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.legal-content h1 { margin: 0 0 18px; font-size: 28px; }
.legal-content h2 { margin: 24px 0 8px; font-size: 16px; }
.legal-content p, .legal-content li { color: #4d596b; font-size: 14px; line-height: 1.85; }
.legal-content ul { padding-left: 22px; }
.legal-footer { min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: 12px; }
@media (max-width: 720px) {
  .legal-header nav { gap: 10px; }.legal-layout { grid-template-columns: 1fr; margin-top: 16px; }.legal-nav { position: static; grid-template-columns: repeat(4, 1fr); overflow-x: auto; }.legal-nav a { justify-content: center; min-width: 76px; padding: 0 6px; text-align: center; }.legal-content section { padding: 20px 17px; }.legal-content h1 { font-size: 23px; }
}
}

@layer legacy {
/* Retained only for compatibility with older legal-page markup. */
:root {
  --page: #f5f5f3;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #6d6d67;
  --line: #d9d9d4;
  --green: #26a269;
  --green-soft: #e7f5ed;
  --blue: #111111;
  --blue-soft: #f0f0ed;
  --amber: #d39a23;
  --amber-soft: #fbf4df;
  --red: #e5483f;
  --red-soft: #fceae8;
  --shadow: none;
}

body { color: var(--ink); background: var(--page); }
.hidden { display: none !important; }
.eyebrow, .section-kicker, .nav-label {
  font-family: Consolas, "SFMono-Regular", monospace;
  letter-spacing: 0;
}
.auth-screen { background: var(--page); }
.auth-header { min-height: 72px; border-bottom: 1px solid #30302f; background: #101010; }
.auth-header .brand, .auth-header .text-link { color: #fff; }
.auth-header .brand img, .app-header .brand img { border-radius: 4px; }
.auth-main { min-height: calc(100svh - 132px); align-items: center; }
.auth-copy .eyebrow { color: var(--red); font-size: 12px; font-weight: 900; }
.auth-copy h1 { max-width: 620px; color: #111; font-size: 64px; line-height: 1.04; }
.auth-copy > p:not(.eyebrow) { max-width: 560px; color: var(--muted); }
.auth-points span { border: 1px solid var(--line); border-radius: 4px; color: #111; background: #fff; }
.auth-panel { border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 6px; background: #fff; }
.auth-tabs, .segmented { border-radius: 6px; background: #ecece8; }
.auth-tab, .segmented button { border-radius: 4px; }
.auth-tab.active, .segmented button.active { color: #fff; background: #111; }
input, select, textarea { border-color: #cfcfca; border-radius: 4px; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,72,63,.12); }
.primary, .wechat-pay { border-color: #111; border-radius: 4px; background: #111; }
.primary:hover, .wechat-pay:hover { border-color: var(--red); background: var(--red); }
.secondary { border-color: #cfcfca; border-radius: 4px; color: #111; }
.danger-button { border-color: var(--red); border-radius: 4px; background: var(--red); }

.app-shell { min-height: 100vh; padding-left: 224px; background: var(--page); }
.app-header { height: 70px; border-bottom: 1px solid #30302f; background: #101010; }
.app-header .brand, .app-header .icon-button, .app-header .account-button { color: #fff; }
.app-header .brand small { color: #92928d; }
.app-header .icon-button, .app-header .account-button { border-color: #3d3d3a; border-radius: 4px; background: #1d1d1c; }
.account-button span, .profile-avatar { border-radius: 4px; background: var(--red); }
.side-nav { top: 70px; width: 224px; padding: 22px 14px; border: 0; background: #101010; }
.nav-label { margin: 0 10px 14px; color: #777773; font-size: 10px; font-weight: 900; }
.nav-item { min-height: 45px; border-radius: 4px; color: #b9b9b4; }
.nav-item span { width: 26px; color: #777773; font-family: Consolas, monospace; font-size: 11px; }
.nav-item:hover { color: #fff; background: #1d1d1c; }
.nav-item.active { border-left: 3px solid var(--red); color: #fff; background: #272725; }
.nav-item.active span { color: var(--red); }
.workspace { width: min(1220px, calc(100% - 56px)); margin: 0 auto; padding: 34px 0 64px; }
.workspace-toolbar { min-height: 86px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.workspace-toolbar h1 { font-size: 32px; line-height: 1.1; }
.section-kicker { color: var(--red); font-size: 11px; font-weight: 900; }
.child-picker { color: var(--muted); }
.child-picker select { border-color: var(--line); background: #fff; }

.status-band, .profile-band, .membership-status, .records-summary {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  background: #fff;
}
.avatar { border-radius: 4px; background: var(--red); }
.status-pill { border-radius: 4px; font-family: Consolas, "SFMono-Regular", monospace; }
.status-pill.online { color: #126b45; background: var(--green-soft); }
.metric-grid { gap: 10px; }
.metric { min-height: 138px; padding: 20px; border-color: var(--line); border-radius: 6px; background: #fff; }
.metric::before { content: "NODE STATUS"; color: #a2a29d; font-family: Consolas, monospace; font-size: 9px; font-weight: 900; }
.metric > span { margin-top: 14px; color: var(--muted); }
.metric strong { color: #111; font-size: 24px; }
.metric small { color: var(--muted); }

.tool-section { border-color: var(--line); border-radius: 6px; background: #fff; }
.section-head { min-height: 48px; padding-bottom: 14px; border-bottom: 1px solid #ecece8; }
.section-head h2 { font-size: 17px; }
.action-grid { gap: 8px; }
.command-button { min-height: 118px; border-color: var(--line); border-radius: 4px; background: #fff; }
.command-button > span { color: var(--red); font-family: Consolas, monospace; }
.command-button:hover { border-color: #111; transform: translateY(-2px); }
.command-button.danger { border-color: var(--red); color: #fff; background: var(--red); }
.command-button.danger > span, .command-button.danger small { color: #fff; }
.command-button.success { border-color: #111; color: #fff; background: #111; }
.command-button.success > span, .command-button.success small { color: #fff; }
.command-button.blue, .command-button.amber { border-color: var(--line); background: #fff; }
.command-button small { color: var(--muted); }
.mode-button { border-color: var(--line); border-radius: 4px; background: #fff; }
.mode-button.danger { border-color: var(--red); color: #fff; background: var(--red); }
.mode-button.success { border-color: #111; color: #fff; background: #111; }
.mode-button.danger span, .mode-button.success span { color: #fff; }
.mode-button.blue, .mode-button.amber { border-color: var(--line); background: #fff; }
.mode-button.release-all { border-color: var(--red); color: var(--red); background: #fff; }
.switch:checked { background: var(--red); }
.choice-row button { border-radius: 4px; }
.choice-row button.active { border-color: #111; color: #fff; background: #111; }
.chart-bar { background: #c8c8c3; }
.chart-bar.active { background: var(--red); }
.app-rank { color: #fff; background: #111; }
.limit-button.active { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.membership-gate { border-color: var(--line); border-left: 4px solid var(--amber); border-radius: 6px; background: #fff; }
.map-fallback { background: #e5e5e1; }
.screen-stage { border-radius: 6px; background: #101010; }
.post-card, .product { border-color: var(--line); border-radius: 6px; }
.product.selected { border-color: #111; background: #f0f0ed; }
.product small { color: var(--red); }
.payment-bar { border-color: var(--line); border-radius: 6px; box-shadow: none; }
.wechat-pay { background: #111; }
dialog { border-radius: 6px; }
.toast { border-radius: 4px; background: #111; }

.legal-page { background: var(--page); }
.legal-header { border-bottom: 1px solid #30302f; color: #fff; background: #101010; }
.legal-header nav { color: #c7c7c2; }
.legal-nav { border: 0; border-radius: 4px; background: #101010; }
.legal-nav a { border-radius: 3px; color: #b7b7b2; }
.legal-nav a:hover { color: #fff; background: #252523; }
.legal-content { gap: 0; }
.legal-content section { padding: 34px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.legal-content section:first-child { padding-top: 8px; }
.legal-content h1 { color: #111; }
.legal-content h2 { color: #111; }
.legal-content p, .legal-content li { color: #555550; }
.legal-footer { border-color: var(--line); background: var(--page); }

.bottom-nav { border-top: 1px solid #30302f; background: #101010; }
.bottom-nav button { color: #8e8e89; }
.bottom-nav button span { font-family: Consolas, monospace; font-size: 11px; }
.bottom-nav button.active { border-top: 2px solid var(--red); color: #fff; background: #242422; }
.bottom-nav button.active span { color: var(--red); }

@media (max-width: 760px) {
  .auth-main { min-height: auto; }
  .auth-copy h1 { font-size: 38px; }
  .app-shell { padding: 62px 0 calc(76px + env(safe-area-inset-bottom)); }
  .app-header { height: 62px; }
  .workspace { width: calc(100% - 24px); margin-left: auto; padding-top: 20px; }
  .workspace-toolbar { min-height: 76px; }
  .workspace-toolbar h1 { font-size: 26px; }
  .metric { min-height: 124px; padding: 15px; }
  .metric strong { font-size: 19px; }
  .tool-section { padding: 15px; }
  .command-button { min-height: 102px; }
  .bottom-nav { min-height: calc(66px + env(safe-area-inset-bottom)); }
  .bottom-nav button { min-width: 0; }
  .legal-header { background: #101010; }
  .legal-nav { background: #101010; }
  .legal-content section { padding: 28px 3px; }
}
}

/* Watchover glass system: final visual layer based on the supplied product design. */
:root {
  --page: #f0f4ff;
  --surface: rgba(255,255,255,.52);
  --ink: #0b1c30;
  --muted: #434653;
  --line: rgba(255,255,255,.72);
  --blue: #003da2;
  --blue-soft: #dce9ff;
  --green: #087429;
  --green-soft: #dff5df;
  --amber: #9a6316;
  --amber-soft: #ffedce;
  --red: #ba1a1a;
  --red-soft: #ffdad6;
  --shadow: 0 16px 44px rgba(0,50,150,.08);
}

body,
.app-shell,
.auth-screen {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(179,197,255,.52), transparent 34%),
    radial-gradient(circle at 94% 56%, rgba(152,249,148,.28), transparent 28%),
    linear-gradient(135deg, #f0f4ff 0%, #e0ebff 100%);
  background-attachment: fixed;
}
.view { animation: none !important; }

.app-header,
.side-nav,
.auth-header {
  border-color: rgba(255,255,255,.58) !important;
  color: var(--ink) !important;
  background: rgba(255,255,255,.62) !important;
  box-shadow: 0 10px 36px rgba(0,50,150,.05);
  backdrop-filter: blur(20px);
}

.app-header .brand,
.app-header .icon-button,
.app-header .account-button,
.auth-header .brand,
.auth-header .text-link { color: var(--blue) !important; }
.app-header .brand small,
.auth-header .brand small { color: var(--muted) !important; }
.app-header .icon-button,
.app-header .account-button { border-color: var(--line) !important; border-radius: 999px !important; background: rgba(255,255,255,.46) !important; }
.app-header .brand img,
.account-button span,
.profile-avatar { border-radius: 999px !important; background: var(--blue) !important; }

.side-nav { top: 70px; padding: 24px 14px; }
.nav-label { color: #747684 !important; font-family: inherit !important; letter-spacing: 0 !important; }
.nav-item { min-height: 46px; border: 0 !important; border-radius: 16px !important; color: var(--muted) !important; background: transparent !important; }
.nav-item span { color: #747684 !important; font-family: inherit !important; }
.nav-item:hover { background: rgba(255,255,255,.5) !important; }
.nav-item.active { color: var(--blue) !important; background: rgba(255,255,255,.64) !important; box-shadow: 0 5px 18px rgba(0,50,150,.06); }
.nav-item.active span { color: var(--blue) !important; }

.workspace-toolbar { border: 0 !important; }
.section-kicker,
.eyebrow { color: var(--blue) !important; font-family: inherit !important; letter-spacing: 0 !important; }
.child-picker select { border-color: var(--line) !important; border-radius: 14px !important; background: rgba(255,255,255,.56) !important; backdrop-filter: blur(14px); }

.device-hero,
.quick-section,
.today-panel,
.alerts-panel,
.tool-section,
.status-band,
.profile-band,
.membership-status,
.records-summary,
.metric,
.empty-state,
.membership-gate,
.post-card,
.product,
.payment-bar {
  border: 1px solid var(--line) !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.5) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(18px);
}
.device-hero { background: rgba(255,255,255,.46) !important; }
.device-facts { border-radius: 16px !important; background: rgba(255,255,255,.28) !important; }
.device-facts article { background: rgba(255,255,255,.54) !important; }
.avatar { border-radius: 999px !important; background: var(--blue) !important; }
.status-pill { border-radius: 999px !important; font-family: inherit !important; }
.metric::before { content: none !important; }

.command-button,
.mode-button { border-radius: 16px !important; background: rgba(255,255,255,.46) !important; }
.command-button.danger,
.mode-button.danger { border-color: rgba(186,26,26,.2) !important; color: var(--red) !important; background: rgba(255,218,214,.66) !important; }
.command-button.success,
.mode-button.success { border-color: rgba(8,116,41,.18) !important; color: var(--green) !important; background: rgba(223,245,223,.7) !important; }
.command-button.danger > span,
.command-button.danger small,
.mode-button.danger span,
.command-button.success > span,
.command-button.success small,
.mode-button.success span { color: inherit !important; }
.command-button.blue,
.mode-button.blue { border-color: rgba(0,61,162,.14) !important; background: rgba(220,233,255,.72) !important; }
.command-button.amber,
.mode-button.amber { border-color: rgba(154,99,22,.15) !important; background: rgba(255,237,206,.72) !important; }

.guard-device-head { display: flex; align-items: center; gap: 14px; padding: 5px 3px 18px; }
.guard-avatar { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; border: 3px solid rgba(255,255,255,.86); border-radius: 50%; color: #fff; background: var(--blue); box-shadow: 0 8px 24px rgba(0,61,162,.16); font-size: 22px; font-weight: 850; }
.guard-device-head > div { display: grid; min-width: 0; flex: 1; gap: 4px; }
.guard-device-head strong { overflow: hidden; color: var(--ink); font-size: 24px; text-overflow: ellipsis; white-space: nowrap; }
.guard-device-head small { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.guard-settings-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); background: rgba(255,255,255,.52); box-shadow: 0 6px 18px rgba(0,50,150,.06); }
.guard-settings-button svg { width: 20px; height: 20px; }

.guard-score-card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 16px; overflow: hidden; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.5); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.guard-score-card > div:first-child { display: grid; gap: 6px; }
.guard-score-card > div:first-child strong { font-size: 18px; }
.guard-score-card small { color: var(--muted); font-size: 13px; }
.guard-score-card > span { align-self: end; color: var(--green); font-size: 12px; font-weight: 800; }
.guard-score-card > span strong { color: var(--blue); font-size: 36px; line-height: .9; }
.guard-score-track { grid-column: 1 / -1; height: 10px; overflow: hidden; border-radius: 999px; background: rgba(211,228,254,.7); }
.guard-score-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7ddc7a, #087429); transition: width .5s ease; }

.guard-status-strip { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 12px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.48); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.guard-status-strip > div { display: grid; place-items: center; gap: 4px; min-width: 0; padding: 3px 8px; border-right: 1px solid rgba(255,255,255,.82); }
.guard-status-strip > div:last-child { border-right: 0; }
.guard-status-strip svg { width: 20px; height: 20px; color: var(--blue); }
.guard-status-strip strong { max-width: 100%; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.guard-status-strip small { color: var(--muted); font-size: 10px; }

.guard-primary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 16px; }
.guard-action { min-height: 66px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 18px; color: var(--blue); background: rgba(255,255,255,.5); box-shadow: 0 8px 24px rgba(0,50,150,.05); backdrop-filter: blur(16px); }
.guard-action span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,61,162,.1); }
.guard-action svg { width: 20px; height: 20px; }
.guard-action.temporary { color: var(--amber); }
.guard-action.temporary span { background: rgba(154,99,22,.1); }
.guard-action.lock { grid-column: 1 / -1; color: var(--red); background: rgba(255,218,214,.54); border-color: rgba(186,26,26,.18); }
.guard-action.lock span { background: rgba(186,26,26,.1); }

.bottom-nav { border: 1px solid var(--line) !important; border-radius: 20px !important; background: rgba(255,255,255,.68) !important; box-shadow: 0 12px 34px rgba(0,50,150,.12) !important; backdrop-filter: blur(20px); }
.bottom-nav button { border: 0 !important; border-radius: 14px !important; color: #747684 !important; background: transparent !important; font-family: inherit !important; }
.bottom-nav button span { font-family: inherit !important; }
.bottom-nav button.active { color: var(--blue) !important; background: rgba(220,233,255,.74) !important; }

@media (max-width: 760px) {
  .app-header { background: rgba(255,255,255,.66) !important; }
  .workspace { width: calc(100% - 32px); }
  .guard-device-head strong { font-size: 22px; }
  .guard-score-card { padding: 20px; }
  .bottom-nav { right: 12px !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important; left: 12px !important; min-height: 68px !important; padding: 4px !important; }
}

/* Final refinement lock. Keep this last while legacy visual layers remain above. */
:root { --page:#f4f6f8; --surface:#fff; --ink:#142033; --muted:#687386; --line:#e1e6ec; --blue:#2859d6; --blue-soft:#edf2ff; --green:#17845a; --green-soft:#eaf7f1; --amber:#a76512; --amber-soft:#fff4df; --red:#cf3f48; --red-soft:#fff0f1; --shadow:0 8px 26px rgba(20,32,51,.07); }
body,.app-shell,.auth-screen { background:linear-gradient(135deg,#f7f8fa 0%,#eef3f5 52%,#f5f7f9 100%); }
.app-header,.side-nav,.auth-header { border-color:var(--line)!important; background:rgba(250,251,252,.94)!important; box-shadow:none; }
.app-header .icon-button,.app-header .account-button,.child-picker select { border-color:var(--line)!important; border-radius:10px!important; background:#fff!important; }
.app-header .brand img,.account-button span,.profile-avatar { border-radius:10px!important; }.side-nav { background:#f8fafb!important; }.nav-item { border-radius:10px!important; }.nav-item.active { color:var(--blue)!important; background:#fff!important; box-shadow:inset 3px 0 0 var(--blue),0 4px 16px rgba(20,32,51,.05); }
.workspace { padding-bottom:40px; }.workspace-toolbar { padding-bottom:26px; }
.quick-section,.today-panel,.alerts-panel,.tool-section,.status-band,.profile-band,.membership-status,.records-summary,.metric,.empty-state,.membership-gate,.post-card,.product,.payment-bar { border-color:var(--line)!important; border-radius:14px!important; background:#fff!important; box-shadow:0 5px 20px rgba(20,32,51,.055)!important; backdrop-filter:none; }
.device-hero { min-height:230px; color:#fff; border:0!important; border-radius:14px!important; background:linear-gradient(135deg,#173b78 0%,#2859d6 62%,#327ea2 100%)!important; box-shadow:0 16px 36px rgba(29,70,145,.2)!important; backdrop-filter:none; }
.device-hero::after { border-color:rgba(255,255,255,.1); }.device-hero .device-eyebrow,.device-hero .child-identity>div>span:last-child,.device-hero .device-facts span,.device-hero .device-facts small { color:rgba(255,255,255,.72)!important; }.device-hero .child-identity strong,.device-hero .device-facts strong { color:#fff!important; }.device-hero .avatar { color:#173b78!important; background:#fff!important; }.device-hero .status-pill { color:#0d704a!important; background:#dff8ec!important; }
.device-facts { border:1px solid rgba(255,255,255,.16)!important; border-radius:12px!important; background:rgba(5,26,63,.18)!important; }.device-facts article { background:transparent!important; }.device-facts article+article { border-left:1px solid rgba(255,255,255,.14); }
.quick-section { padding:22px!important; }.action-grid { gap:9px; }.command-button { min-height:104px; border-color:var(--line)!important; border-radius:12px!important; background:#f8fafc!important; box-shadow:none!important; }.command-button.danger { border-color:#f0c8cc!important; color:var(--red)!important; background:var(--red-soft)!important; }.command-button.success { border-color:#c5e7d7!important; color:var(--green)!important; background:var(--green-soft)!important; }.command-button.blue { border-color:#d4def7!important; background:var(--blue-soft)!important; }.command-button.amber { border-color:#f0dfbb!important; background:var(--amber-soft)!important; }.command-button>span { border-radius:9px!important; }
.guard-avatar { width:58px; height:58px; flex-basis:58px; border:0; border-radius:16px; background:linear-gradient(145deg,#173b78,#2859d6); box-shadow:0 8px 20px rgba(40,89,214,.17); }.guard-settings-button { border-color:var(--line); border-radius:10px; background:#fff; box-shadow:none; }
.guard-score-card { border-color:var(--line); border-radius:14px; background:#fff; box-shadow:var(--shadow); backdrop-filter:none; }.guard-score-card>span strong { color:var(--blue); }.guard-score-track { height:7px; background:#edf1f5; }.guard-score-track i { background:linear-gradient(90deg,#38a874,#17845a); }
.guard-status-strip { margin-top:10px; padding:11px 6px; border-color:var(--line); border-radius:12px; background:#fff; box-shadow:none; backdrop-filter:none; }.guard-status-strip>div { border-right-color:var(--line); }
.guard-primary-actions { gap:8px; margin:10px 0 14px; }.guard-action { min-height:58px; border-color:var(--line); border-radius:12px; background:#fff; box-shadow:none; backdrop-filter:none; }.guard-action span { width:34px; height:34px; }.guard-action.lock { background:var(--red-soft); border-color:#f0c8cc; }
.mode-button { min-height:82px; border-radius:10px!important; box-shadow:none!important; }.recovery-grid { grid-template-columns:1fr 1fr; }.recovery-grid .release-all { grid-column:auto; }.setting-list { border:1px solid var(--line); border-radius:10px; overflow:hidden; }.setting-row { background:#fff; }
.bottom-nav { border-color:var(--line)!important; border-radius:14px!important; background:rgba(255,255,255,.94)!important; box-shadow:0 10px 28px rgba(20,32,51,.14)!important; }.bottom-nav button { border-radius:9px!important; }.bottom-nav button.active { color:var(--blue)!important; background:var(--blue-soft)!important; }
@media(max-width:760px){.workspace{width:calc(100% - 28px);padding-bottom:106px}.workspace-toolbar{min-height:94px;padding:16px 0 18px}.workspace-toolbar h1{font-size:26px}.device-hero{min-height:218px;padding:20px}.quick-section{padding:18px!important}.command-button{min-height:88px;padding:12px}.bottom-nav{right:10px!important;bottom:calc(7px + env(safe-area-inset-bottom))!important;left:10px!important;min-height:60px!important}.guard-score-card{padding:18px}.guard-action{min-height:56px}.tool-section{padding:17px}.recovery-grid{grid-template-columns:1fr}}
