*{box-sizing:border-box}html,body{margin:0;width:100%;min-height:100%;overflow-x:hidden;background:#fff8f1;color:#2f2521;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button{border:0}body{display:flex;justify-content:center}.h5-shell{width:min(390px,100vw);min-height:100vh;background:linear-gradient(180deg,#fff8f1,#fffdf9 55%,#f7fbff);position:relative;overflow:hidden;padding-bottom:92px}.h5-root{width:100%;overflow:hidden}.h5-page{width:100%;padding:12px;overflow:hidden}.top-bar,.sub-header{height:56px;display:flex;align-items:center;justify-content:space-between;gap:10px}.brand{display:flex;align-items:center;gap:8px;min-width:0}.logo{width:34px;height:34px;border-radius:12px;background:linear-gradient(135deg,#ff9b7b,#df765f);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:950;background-position:center}.brand b{font-size:18px}.top-actions{display:flex;gap:8px}.top-actions button,.sub-header button{width:34px;height:34px;border-radius:50%;background:#fff;color:#7d8798;box-shadow:0 8px 20px rgba(79,54,43,.08)}.sub-header b{font-size:18px}.sub-header span{min-width:34px;text-align:right;color:#d9826b;font-weight:850}.safe-hero,.profile-hero,.login-hero,.page-hero,.risk-hero,.elder-hero{padding:22px 16px;border-radius:18px;background:linear-gradient(135deg,#fff,#fff4ea);border:1px solid #f0ddd2;box-shadow:0 12px 28px rgba(140,84,58,.08);text-align:center}.safe-hero h1,.page-hero h1,.risk-hero h1,.elder-hero h1{margin:0;font-size:28px;line-height:1.15}.shield{width:74px;height:74px;border-radius:50%;margin:24px auto 4px;background:#ffe4d6;display:flex;align-items:center;justify-content:center;font-size:34px}.home-actions,.elder-actions{display:grid;gap:14px;margin:14px 0}.home-actions button,.elder-actions button{height:50px;border-radius:999px;color:#fff;font-weight:950;font-size:16px}.green{background:#25c875!important;color:#fff!important}.blue{background:#4b93dc!important;color:#fff!important}.red{background:#e95d58!important;color:#fff!important}.dark{background:#142039!important;color:#fff!important}.light{background:#fff4ea!important;color:#744f44!important}.setup-card,.status-card,.flow-card,.state-card,.quick-card,.watch-card,.section-card,.hardware-card,.notice-card,.login-card,.tip-card,.chart-card,.privacy-doc,.logo-area{margin:12px 0;padding:15px;border-radius:16px;background:rgba(255,255,255,.94);border:1px solid #f0ddd2;box-shadow:0 10px 24px rgba(140,84,58,.07)}.card-head,.status-card>div:first-child,.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.card-head span,.page-hero span,.risk-hero span{color:#9a8272;font-weight:850}.card-head b,.status-card em{padding:4px 9px;border-radius:999px;background:#fff1ea;color:#d9826b;font-size:12px;font-style:normal}.setup-card h2{margin:8px 0 6px;font-size:18px}.list-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 0;border-top:1px solid #f3e6dd}.list-row i{width:24px;height:24px;border-radius:50%;background:#df826b;color:#fff;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:12px;font-weight:900}.list-row b{display:block;font-size:14px}.list-row span,.state-card p,.quick-card p,.page-hero p,.login-hero p,.risk-hero p,.section-card p,.privacy-doc p,.tip-card p{display:block;margin:4px 0 0;color:#7f716b;font-size:13px;line-height:1.55}.list-row em{font-style:normal;color:#d9826b;font-size:12px;font-weight:850}.grid2,.grid3,.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}.metric{padding:13px;border-radius:14px;background:#fffaf6;border:1px solid #f1e2d9}.metric b{display:block;font-size:22px}.metric span{display:block;margin-top:4px;color:#7f716b;font-size:12px}.two-btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}button[data-handler]{min-height:42px;border-radius:999px;background:#d9826b;color:#fff;font-weight:900;padding:0 14px}.segment{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:6px;border-radius:999px;background:#fff;border:1px solid #edf1f6;margin:8px 0 12px}.segment button{height:42px;border-radius:999px;background:transparent;color:#506070;font-weight:900}.segment button.active{background:#142039;color:#fff;box-shadow:0 8px 18px rgba(20,32,57,.22)}.state-card h1{margin:4px 0;font-size:24px}.tags{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.tags span{padding:5px 9px;border-radius:999px;background:#fffaf6;color:#7f716b;font-size:12px}.avatar{width:82px;height:82px;margin:0 auto 10px;border-radius:50%;background:#df826b;color:#fff;display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:950}.hardware-card .h5-device-form,.modal-body{display:none}.hardware-card .h5-device-form.show,.modal-body.show{display:block}.h5-user-device,.contact-card{padding:12px;border-radius:14px;background:#fffaf6;border:1px solid #f1e2d9;margin:9px 0}.h5-user-device b,.contact-card b{display:block}.h5-user-device span,.contact-card span{display:block;margin-top:4px;color:#7f716b;font-size:12px}.h5-device-form input,.h5-device-form select,.h5-device-form textarea,.modal-body input,.modal-body select{width:100%;min-height:42px;margin-top:9px;padding:0 12px;border-radius:12px;border:1px solid #f0ddd2;background:#fff8f1}.h5-device-form textarea{padding:10px 12px;min-height:72px}.empty-state{text-align:center;padding:28px 12px;color:#7f716b}.add-area{text-align:center;margin:12px 0}.modal-mask{display:none;position:fixed;inset:0;background:rgba(34,28,25,.42);z-index:40}.modal-mask.show{display:block}.modal-body{position:fixed;left:50%;bottom:0;transform:translateX(-50%);z-index:50;width:min(390px,100vw);max-height:86vh;overflow:auto;background:#fff;border-radius:20px 20px 0 0;padding:16px;border:1px solid #f0ddd2}.modal-head button{width:32px;height:32px;background:#fff4ea;color:#744f44}.switch-item{display:flex;justify-content:space-between;align-items:center;margin-top:9px;padding:12px;border-radius:12px;background:#fff8f1;border:1px solid #f0ddd2}.switch-item em{width:38px;height:22px;border-radius:99px;background:#d7d1ca}.switch-item.on em{background:#25c875}.bars{height:120px;display:flex;align-items:flex-end;gap:10px;padding:12px;border-radius:14px;background:#fffaf6}.bars i{flex:1;border-radius:8px 8px 0 0;background:#4b93dc}.h5-tabbar{position:fixed;left:50%;bottom:10px;transform:translateX(-50%);width:calc(min(390px,100vw) - 24px);height:66px;display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:7px;border-radius:24px;background:rgba(255,255,255,.96);border:1px solid #eef2f7;box-shadow:0 18px 38px rgba(42,58,92,.16);z-index:30}.h5-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:18px;background:transparent;color:#7d8798;font-size:11px;font-weight:850}.h5-tab img{width:20px;height:20px}.h5-tab.active{background:#eef6ff;color:#3151d3}.h5-drawer{display:none;position:fixed;left:50%;top:12px;transform:translateX(-50%);width:calc(min(390px,100vw) - 24px);max-height:76vh;overflow:auto;z-index:60;padding:10px;border-radius:18px;background:#fff;border:1px solid #f0ddd2;box-shadow:0 20px 48px rgba(42,58,92,.18)}.h5-drawer.show{display:block}.h5-drawer button{display:block;width:100%;text-align:left;margin:4px 0;padding:11px;border-radius:12px;background:#fff8f1;color:#342520}.h5-toast{position:fixed;left:50%;bottom:86px;transform:translateX(-50%);max-width:86vw;padding:10px 16px;border-radius:999px;background:#142039;color:#fff;opacity:0;pointer-events:none;transition:.18s;z-index:80}.h5-toast.show{opacity:1}@media(max-width:360px){.h5-page{padding:10px}.safe-hero h1,.page-hero h1{font-size:24px}.grid3{grid-template-columns:1fr 1fr}.two-btns{grid-template-columns:1fr}}
.h5-page[data-route="pages/profile/profile"]{padding:0;background:radial-gradient(circle at 12% 6%,rgba(239,154,130,.18),transparent 30%),radial-gradient(circle at 88% 2%,rgba(255,213,154,.24),transparent 28%),linear-gradient(180deg,#fff8f1 0%,#fffdf8 52%,#f8f3ef 100%)}.profile-page{min-height:100vh;padding-bottom:96px}.mini-nav{height:88px;padding:28px 12px 0;display:grid;grid-template-columns:60px 1fr 74px;align-items:center}.mini-nav b{text-align:center;font-size:14px;font-weight:500;color:#3b2a25}.mini-nav button{height:32px;border-radius:18px;background:#fff;color:#111;box-shadow:0 4px 12px rgba(0,0,0,.08)}.profile-title-row{height:52px;padding:0 20px;display:grid;grid-template-columns:60px 1fr 60px;align-items:center}.profile-title-row b{text-align:center;font-size:17px;color:#3b2a25}.profile-title-row button{background:transparent;color:#d9826b;font-weight:900}.trial-strip{margin:0 12px 14px;padding:12px;border-radius:0 0 14px 14px;background:rgba(255,255,255,.9);border:1px solid #f0ddd2;box-shadow:0 8px 18px rgba(140,84,58,.07)}.trial-strip b{font-size:13px}.trial-strip em{float:right;padding:3px 9px;border-radius:999px;background:#f7f0ec;color:#927c73;font-style:normal;font-size:11px}.trial-strip p{clear:both;margin:5px 0 0;color:#8a746b;font-size:12px;line-height:1.5}.profile-edit-card{margin:0 18px 14px;padding:18px 14px 20px;border-radius:18px;background:rgba(255,255,255,.92);border:1px solid #f0ddd2;box-shadow:0 10px 24px rgba(140,84,58,.08)}.profile-edit-card h2{text-align:center;margin:0 0 18px;font-size:16px;color:#3b2a25}.avatar-oval{width:178px;height:72px;margin:0 auto 18px;border-radius:50%;background:#df826b;display:flex;align-items:center;justify-content:center;box-shadow:0 18px 38px rgba(217,130,107,.22)}.avatar-img{width:64px;height:64px;border-radius:50%;background:#fff;color:#d9826b;display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:950;border:3px solid #fff}.profile-edit-card label{display:block;margin:12px 0 7px;color:#8a746b;font-size:14px;font-weight:800}.profile-edit-card input{width:100%;height:44px;border-radius:12px;border:1px solid #f0ddd2;background:#fffdf8;padding:0 12px;color:#3b2a25}.gender-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.gender-row button{height:42px;border-radius:10px;background:#fffdf8;color:#7a6670;border:1px solid transparent}.gender-row button.active{background:#fff1ea;color:#c97854;border-color:#e8b09b}.save-profile{width:176px!important;height:44px!important;margin:14px auto 0!important;display:block!important;background:linear-gradient(135deg,#e39176,#d9826b)!important;color:#fff!important}.cancel-profile{width:176px!important;height:42px!important;margin:10px auto 0!important;display:block!important}.h5-page[data-route="pages/profile/profile"] .quick-grid{margin:0 18px 22px}
.h5-miniapp-page{padding:0!important}.h5-miniapp-page .container,.h5-miniapp-page .page{width:100%;min-height:calc(100vh - 92px);overflow:hidden}.h5-miniapp-page [data-handler]{cursor:pointer}.h5-miniapp-page img{max-width:100%;object-fit:cover}.h5-miniapp-page img:not([src]),.h5-miniapp-page img[src=""]{display:none!important}.h5-miniapp-page .h5-block{display:contents}.h5-miniapp-page .scroll-view{overflow:auto}.h5-miniapp-page .switch-pill{min-width:44px;height:26px;border-radius:999px;background:#d9826b;color:#fff;font-size:12px}.h5-miniapp-page .radio{display:inline-block;width:16px;height:16px;border-radius:50%;border:2px solid #d9826b;margin-right:6px;vertical-align:-3px}.h5-miniapp-page input,.h5-miniapp-page textarea{max-width:100%}.h5-tabbar{z-index:999}.h5-drawer{z-index:1000}
.voice-countdown-mask,.timeout-picker-mask,.timeout-picker-popup,.sos-countdown-card,.safe-home-sos,.modal-mask,.modal-body,.auth-mask,.popup-mask,.dialog-mask,.loading-card,.device-form{display:none!important}.modal-mask.show{display:block!important}.modal-body.show,.h5-device-form.show,.device-form.show{display:block!important}
.modal-body{left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(390px,100vw)!important;max-width:100vw!important}
.h5-shell{overflow-y:auto!important;overflow-x:hidden!important}
.h5-miniapp-page .container,.h5-miniapp-page .page{min-height:100vh!important;overflow:visible!important;padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))!important}
.h5-miniapp-page .top-bar{position:sticky!important;top:0!important;left:auto!important;right:auto!important;width:100%!important;min-height:56px!important;padding:8px 14px!important;transform:none!important}
.h5-miniapp-page .safe-home-hero,.h5-miniapp-page .family-safe-card,.h5-miniapp-page .monitor-page-title,.h5-miniapp-page .analysis-page-title{margin-top:12px!important}
.h5-miniapp-page .logo-img[src]{display:block!important;width:100%!important;height:100%!important;border-radius:inherit!important}
.home-footer{display:block!important;min-height:92px!important;padding-bottom:calc(118px + env(safe-area-inset-bottom,0px))!important}
.home-footer>span{display:block!important;font-size:11px!important;line-height:1.8!important;color:#B6A59D!important}
.home-footer-links span{display:inline!important;color:#4A90D9!important;font-size:11px!important}

/* visual polish */
html,body{background:#f7faf8;color:#243044}
.h5-shell{background:linear-gradient(180deg,#f9fcfa 0%,#fff8f2 50%,#f3f7f6 100%)!important}
.top-bar,.sub-header,.mini-nav,.profile-title-row{background:rgba(255,255,255,.9)!important;border-bottom:1px solid rgba(228,235,239,.86);box-shadow:0 4px 12px rgba(23,32,51,.04);backdrop-filter:blur(18px)}
.safe-hero,.profile-hero,.login-hero,.page-hero,.risk-hero,.elder-hero{background:linear-gradient(135deg,#fff 0%,#fff6f0 100%)!important;border-color:rgba(228,235,239,.92)!important;box-shadow:0 12px 26px rgba(23,32,51,.08)!important}
.setup-card,.status-card,.flow-card,.state-card,.quick-card,.watch-card,.section-card,.hardware-card,.notice-card,.login-card,.tip-card,.chart-card,.privacy-doc,.logo-area,.profile-edit-card,.trial-strip,.contact-card,.h5-user-device,.metric{background:rgba(255,255,255,.96)!important;border-color:rgba(228,235,239,.92)!important;box-shadow:0 10px 24px rgba(23,32,51,.07)!important}
button[data-handler],.home-actions button,.elder-actions button,.save-profile{box-shadow:0 10px 22px rgba(217,130,107,.16)!important}
button:active,.h5-tab:active{transform:scale(.985);opacity:.92}
.h5-tabbar{bottom:12px;width:calc(min(390px,100vw) - 28px);height:68px;background:rgba(255,255,255,.96)!important;border-color:rgba(228,235,239,.95)!important;box-shadow:0 16px 34px rgba(23,32,51,.1)!important;border-radius:22px}
.h5-tab{color:#7a8795!important;font-weight:850}
.h5-tab.active{background:#fff4ee!important;color:#243044!important}
.h5-page-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.h5-page-nav button{border:0;border-radius:999px;background:rgba(255,255,255,.94);box-shadow:0 8px 22px rgba(31,41,55,.08);padding:8px 14px;color:#263448;font-weight:800;font-size:14px}
.h5-page-nav .home{color:#df7f69}
.h5-toast{background:#243044}

.h5-shell{padding-bottom:0!important}
.h5-miniapp-page .container,.h5-miniapp-page .page{min-height:auto!important;padding-bottom:calc(90px + env(safe-area-inset-bottom,0px))!important}
.h5-page[data-route="pages/overview/overview"] .container,.h5-page[data-route="pages/family-home/family-home"] .container{padding-bottom:0!important}
.home-footer{min-height:auto!important;padding:12px 12px calc(90px + env(safe-area-inset-bottom,0px))!important}
.h5-page[data-route="pages/profile/profile"] .quick-entry-grid,.h5-page[data-route="pages/profile/profile"] .quick-grid{margin-bottom:10px!important}
.h5-page[data-route="pages/overview/overview"] .safe-smile-img{display:none}
.h5-page[data-route="pages/overview/overview"] .safe-home-hero.checked .safe-question-img{display:none!important}
.h5-page[data-route="pages/overview/overview"] .safe-home-hero.checked .safe-smile-img{display:block!important}
.h5-miniapp-page .top-bar .logo-icon{background:linear-gradient(135deg,#E39176,#D9826B)!important;color:#fff!important}
.h5-miniapp-page .top-bar .logo-icon{background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important}
.h5-miniapp-page .logo-icon{background-position:center!important}
.h5-miniapp-page .logo-icon .logo-img{display:none!important}
.auth-page{position:relative;min-height:100vh;padding:0 20px 28px;overflow:hidden;background:linear-gradient(180deg,#fff7f1 0%,#f7faf8 58%,#fff 100%)}
.auth-ambient{position:absolute;border-radius:999px;filter:blur(4px);opacity:.5;pointer-events:none}
.auth-ambient-a{width:160px;height:160px;right:-52px;top:58px;background:#ffd8c8}
.auth-ambient-b{width:128px;height:128px;left:-48px;top:250px;background:#dff3ea}
.auth-header{position:relative;padding-top:54px;padding-bottom:22px;text-align:center}
.auth-header .logo-wrap{width:64px;height:64px;margin:0 auto 12px;border-radius:20px;background:linear-gradient(135deg,#ff9b7a,#d9826b);display:flex;align-items:center;justify-content:center;border:1px solid #f0ddd2;box-shadow:0 14px 30px rgba(217,130,107,.2)}
.auth-header .logo-icon{font-size:28px!important;color:#fff!important;font-weight:900}
.auth-header .title{font-size:24px;font-weight:900;color:#243044}
.auth-header .subtitle{font-size:13px;color:#667386;margin-top:8px}
.h5-auth-card{position:relative;padding:18px!important;border-radius:22px!important;background:rgba(255,255,255,.94)!important;border:1px solid #e4ebef!important;box-shadow:0 18px 42px rgba(23,32,51,.08)!important}
.auth-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:5px;border-radius:999px;background:#f3f7f6;border:1px solid #e4ebef;margin-bottom:16px}
.auth-tabs button{height:38px;min-height:38px!important;border-radius:999px!important;background:transparent!important;color:#667386!important;font-size:13px;font-weight:900;padding:0!important;box-shadow:none!important}
.auth-tabs button.active{background:#fff!important;color:#6e463a!important;box-shadow:0 5px 16px rgba(23,32,51,.08)!important}
.auth-input{width:100%;height:48px;margin-top:10px;padding:0 14px;border-radius:15px;border:1px solid #e4ebef;background:#fffdfc;color:#243044;font-weight:800}
.auth-code-row{display:grid;grid-template-columns:minmax(0,1fr) 108px;gap:8px;align-items:end}
.auth-code-btn{height:48px;min-height:48px!important;margin-top:10px;border-radius:15px!important;background:#fff6f0!important;color:#6e463a!important;font-size:13px;font-weight:900;padding:0 8px!important;border:1px solid #e4ebef!important}
.auth-submit{margin-top:14px!important;background:#d9826b!important;box-shadow:0 10px 24px rgba(217,130,107,.22)!important}
.auth-wx-btn{background:#22c66f!important;color:#fff!important;border-radius:999px!important;margin-top:0!important}
.auth-divider{height:42px;display:flex;align-items:center;justify-content:center;color:#b8ada7;font-size:12px}
.auth-divider:before,.auth-divider:after{content:"";height:1px;background:#e4ebef;flex:1}.auth-divider span{padding:0 12px}
.auth-code-btn:disabled{opacity:.65}
