/* Source: lib/constants/app_colors.dart, app_text_styles.dart and widgets/common/page_header.dart.
   Keep App rules scoped to the phone; workbench controls are not part of the App. */
.phone{--primary-dark:#155e5e;--text:#1a1a1a;--secondary:#666;--line:#e0e0e0;background:var(--page-bg,#f2f3f5);color:var(--text);height:844px}
#app{position:relative}.home-indicator{background:var(--page-bg,#f2f3f5)}
.phone .page-head h1{color:var(--text)}
.phone .source-page-header{padding:12px 16px;gap:16px;min-height:64px;margin-top:0}
.phone .source-page-header h1{font-size:20px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.phone .main-page-header h1{font-size:24px;font-weight:800}
.phone .back{border:1px solid #e0e0e0;border-radius:50%;width:40px;height:40px;flex:none;display:grid;place-items:center;padding:0;background:transparent;color:#1a1a1a}
.control-icon{display:block;width:24px;height:24px;flex:none}.back .control-icon{width:20px;height:20px}
.input-wrap{position:relative}.field-prefix{position:absolute;inset:0 auto 0 12px;display:flex;align-items:center;pointer-events:none}.field-prefix .icon{width:20px;height:20px}.with-prefix input{padding-left:48px}
.phone .password-wrap button{right:4px;top:0;height:100%;width:40px;display:grid;place-items:center;color:#ccc;padding:0}
.phone .password-wrap input{padding-right:44px}
.phone input::placeholder{color:#ccc;opacity:1}
/* Auth pages are stacks with floating controls, not a PageHeader plus body. */
.auth-floating{position:absolute;left:0;right:0;top:12px;display:flex;justify-content:space-between;align-items:start;padding:0 16px;pointer-events:none;z-index:2}
.auth-floating>*{pointer-events:auto}.auth-floating .auth-help{width:36px;height:36px;min-height:36px;padding:9px;border-radius:50%;background:white;box-shadow:0 2px 8px #00000014}.auth-help .icon{width:18px;height:18px}
.page-content.auth-screen{padding:45px 24px 36px;background:var(--page-bg);scrollbar-width:none}
.page-content::-webkit-scrollbar{width:0}
.auth-hero{text-align:center;margin-bottom:16px}.auth-wordmark{width:168px;height:56px;object-fit:contain;display:block;margin:0 auto}
.auth-hero h1{font-size:24px;color:#1a1a1a;line-height:1.4;margin:8px 0 0;font-weight:700}
.auth-hero p{font-size:15px;line-height:1.5;margin:8px 0 0}
.auth-card{background:#fff;border-radius:16px;padding:16px}
.auth-card .segmented{height:46px;margin:0 0 16px;padding:4px;border:1px solid #e0e0e0;border-radius:14px;gap:0;background:#fff}
.auth-card .segmented button{border-radius:10px;color:#1a1a1a;padding:0 4px;font-size:14px;font-weight:600}
.auth-card .segmented button.active{background:#155e5e;color:#fff;box-shadow:0 2px 8px #155e5e1f}
.auth-card .field{margin:0 0 10px}.auth-card .field>span{font-size:13px;font-weight:500;margin-bottom:8px;line-height:20px}
.auth-card .field input{height:56px;border:1px solid #ccc;border-radius:12px;font-size:16px;padding-top:16px;padding-bottom:16px}
.auth-secondary{margin-top:-4px;gap:8px;min-height:28px}.auth-secondary .check{font-size:14px;color:#666}.auth-secondary>.link{font-weight:600;white-space:nowrap}
.phone input[type=checkbox]{appearance:none;-webkit-appearance:none;display:inline-grid;place-items:center;width:18px;height:18px;border:1px solid #888;border-radius:2px;padding:0;margin:0;background:white;flex:none;vertical-align:middle}
.phone input[type=checkbox]:checked{background:#2d7a6e;border-color:#2d7a6e}.phone input[type=checkbox]:checked:after{content:'';width:11px;height:6px;border-left:2px solid white;border-bottom:2px solid white;transform:rotate(-45deg) translateY(-1px)}
.auth-card .legal{display:flex;align-items:center;gap:8px;margin:24px 0 12px;color:#666;font-size:12px;line-height:1.55;text-align:left}
.auth-card .legal>div{flex:1;min-width:0}.auth-card .legal button{font-size:12px;line-height:inherit;padding:0;text-decoration:underline;display:inline;color:#2d7a6e}
.auth-card .button[type=submit]{min-height:56px;margin:0;border-radius:12px;background:#155e5e;font-size:18px}
.login-screen form:not(:has([name=agree]:checked)) .button[type=submit]{background:#155e5e99}
.auth-code-toggle{text-align:center;margin-top:12px}.auth-code-toggle .button.link{font-weight:600;font-size:13px;padding:0;min-height:20px}
.auth-divider{display:flex;align-items:center;gap:16px;margin:24px 0 12px;color:#666;font-size:13px;line-height:20px}.auth-divider:before,.auth-divider:after{content:'';height:1px;background:#e0e0e0;flex:1}
.auth-social{display:flex;flex-direction:column;gap:12px;align-items:center;padding-top:12px}.social-circle{width:56px;height:56px;min-height:56px;border-radius:50%;padding:0;overflow:hidden;background:white;border:1.2px solid #e0e0e0}.social-circle .icon{width:56px;height:56px}
.social-label{width:260px;max-width:100%;min-height:44px;height:44px;border-radius:12px;border:1.2px solid #e0e0e0;background:#fff;color:#1a1a1a;font-size:13px;padding:0 16px}.social-label .icon{width:22px;height:22px}.social-label.apple{background:#000;color:#fff;border-color:#000}.social-label.apple .icon{filter:brightness(0) invert(1)}
.auth-options{border-top:1px solid #e0e0e0;margin-top:16px;padding-top:12px;text-align:center}.auth-options .button.link{font-weight:600;font-size:13px;padding:0}
.auth-signup{text-align:center;color:#666;font-size:13px;margin:12px 0 0}.auth-signup .link{font-weight:600}.auth-icp{height:26px;flex:none;display:flex;align-items:center;justify-content:center;font-size:12px;color:#bdbdbd;padding:0 0 4px;background:var(--page-bg)}
.register-screen .auth-hero{margin-bottom:24px}.register-screen .legal{margin-top:12px;align-items:start}.register-screen .field input{height:48px;font-size:14px}.register-screen .field{margin-bottom:12px}.auth-region{margin-top:20px}.auth-region .row-item{justify-content:center;border:0}.auth-region .grow{flex:initial}.auth-region strong,.auth-region small{font-size:12px}.auth-region .chevron{margin-left:0}
.reset-screen{padding-top:85px!important}.reset-key{width:100px;height:100px;display:grid;place-items:center;margin:0 auto 24px;background:#2d7a6e;border-radius:20px}.reset-key .icon{width:56px;height:56px}.reset-screen .auth-hero h1{font-size:20px}.reset-screen .auth-hero p{font-size:12px}.reset-screen .auth-hero{margin-bottom:32px}.reset-screen .auth-card{padding:24px;border-radius:20px}.reset-screen .field{margin-bottom:16px}.reset-screen .auth-signup{margin-top:32px}
/* AddDevicePage: 260 square, radius 28, 3px border; guide scanner has a different layout. */
.page-content.device-scan-page{padding:28px 24px 38px;scrollbar-width:none}.scan-title{text-align:center;font-size:16px;font-weight:400;color:#555;line-height:24px;margin:0 0 32px}
.scanner-viewport{position:relative;overflow:hidden;background:#26322f;margin:0 auto;display:grid;place-items:center;color:#fff;flex:none}
.device-scanner{width:260px;max-width:100%;aspect-ratio:1;border-radius:28px;border:3px solid #2d7a6e}
.scanner-beam{position:absolute;left:0;right:0;top:32%;height:3px;background:linear-gradient(90deg,transparent,#2d7a6ecc 30%,#2d7a6ecc 70%,transparent)}.scanner-error{padding:12px;font-size:13px;text-align:center}
.zoom-control{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #e6e8ea;border-radius:18px;padding:10px 14px;margin-top:14px;min-height:58px}
.zoom-control>.control-icon{width:18px;height:18px;color:#666}.zoom-control b{min-width:32px;font-size:11px;font-weight:700;text-align:right}
.zoom-control input{appearance:none;-webkit-appearance:none;border:0;height:4px;flex:1;min-width:0;margin:0 8px;padding:0;border-radius:4px;background:linear-gradient(to right,#2d7a6e var(--zoom),#e0e0e0 var(--zoom));cursor:pointer}
.zoom-control input::-webkit-slider-thumb{appearance:none;width:16px;height:16px;border-radius:50%;background:#2d7a6e;box-shadow:0 2px 3px #0002}.zoom-control input::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:50%;background:#2d7a6e}
.scan-caption{color:#999;text-align:center;font-size:12px;line-height:1.5;margin:20px 0 0}
.page-content.guide-scan-page{padding:57px 24px 60px}.guide-progress{display:flex;justify-content:center;gap:8px;margin:0 0 20px}.guide-progress i{width:24px;height:8px;border-radius:4px;background:#2d7a6e}.guide-progress i+i{width:8px;background:#e0e0e0}.guide-step{font-size:13px;color:#888;margin:0}.guide-scan-page h1{font-size:24px;margin:0 0 6px;color:#1a1a1a}.guide-subtitle{font-size:11px;color:#555;margin:0 0 16px}.scan-tip{display:flex;gap:12px;align-items:center;background:#eaf7f5;padding:16px;border-radius:12px;font-size:11px;color:#555;margin:0 0 16px}.scan-tip .icon{width:28px;height:28px}.guide-scanner{width:100%;aspect-ratio:1;border-radius:20px;background:#000}.guide-scan-page .scan-caption{margin-top:16px}
.review-controls{width:min(100%,390px);padding:10px;margin-top:12px;display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px dashed #8caaa1;border-radius:10px;font-size:11px;color:#52665b;background:#f9fbfa}.review-controls[hidden]{display:none}
@media(min-width:1500px){.phone{height:844px}}
@media(max-width:650px){.phone{height:844px;min-height:844px}.stage{overflow:visible}.workspace{height:auto}.auth-card .legal{overflow-wrap:anywhere}}
/* Round 2: source ChildSelector/NotificationBellButton and their actual callers.
   today:1617, photos:716, chat_history:626. Explore does not use ChildSelector. */
.phone .source-main-content{padding-top:0}
.source-main-head{display:flex;align-items:flex-start;gap:2px;padding:12px 24px 16px;margin:0 -16px}
.source-main-title{flex:1;min-width:0}.source-main-title h1{font-size:24px;line-height:1.3;font-weight:800;margin:0;color:#1a1a1a;overflow-wrap:anywhere}
.source-main-title p{margin:4px 0 0;font-size:14px;color:#757575;line-height:1.4;overflow-wrap:anywhere}
.child-selector{width:150px;flex:none;display:flex;align-items:center;padding:3px;border:1px solid #e0e0e0;border-radius:30px;background:#fff;gap:8px;height:44px}
.child-avatar{background:#b3d9f2;border-radius:50%;width:36px;height:36px;flex:none;display:grid;place-items:center}.child-avatar .avatar{width:18px;height:18px;background:none}
.child-selector strong{font-size:15px;line-height:1;font-weight:700;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.child-selector .dropdown-caret{width:18px;height:18px;flex:none;margin:0 8px 0 0;color:#616161;display:grid;place-items:center}.dropdown-caret .control-icon{width:18px;height:18px}
.notification-bell{position:relative;flex:none;width:40px;height:40px;padding:0;display:grid;place-items:center;border-radius:50%;background:#fff;border:1px solid #e0e0e0;box-shadow:0 2px 8px #00000014}
.notification-bell .icon{width:20px;height:20px}.notification-count{position:absolute;top:-2px;right:-2px;min-width:20px;padding:2px 5px;border:2px solid #fff;border-radius:12px;background:#e74c3c;color:#fff;font-size:10px;font-weight:700;line-height:1}
.child-menu-overlay{background:transparent;display:block;padding:0}.child-menu.dialog{position:absolute;width:180px;padding:4px;border-radius:12px;box-shadow:0 4px 12px #0003;overflow:auto}
.child-menu-item{display:flex;align-items:center;gap:10px;padding:6px 10px;width:100%;min-height:48px;text-align:left;border-radius:10px;font-size:14px}
.child-menu-item.selected{background:#edf7f3;color:#2d7a6e;font-weight:600}.child-menu-item .child-avatar{width:32px;height:32px;background:#e8f5e8}.child-menu-item .avatar{width:20px;height:20px}.child-menu-item>span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.child-menu-item b{width:20px;height:20px;display:grid;place-items:center;background:#2d7a6e;color:#fff;border-radius:50%}
.phone .source-explore-content{padding-top:0;background:white}.source-explore-head{position:relative;text-align:center;padding:12px 28px 10px;margin-bottom:12px;border-bottom:1px solid #e0e0e0}.source-explore-head h1{font-size:20px;margin:0}.source-explore-head p{font-size:14px;color:#666;margin:4px 0 0}.source-explore-head .explore-filter{position:absolute;right:0;top:12px;min-height:32px;width:32px;padding:6px;background:none;color:#666}
/* auth/login_help_sheet.dart, faq_sheet.dart, region_selection_sheet.dart.
   These are content sheets, not generic confirmation dialogs. */
.sheet .source-sheet{display:flex;flex-direction:column;padding:0;max-height:75%;overflow:hidden;border-radius:20px 20px 0 0;color:#1a1a1a}
.source-sheet header{flex:none;display:flex;align-items:center;padding:20px;border-bottom:1px solid #e0e0e0;gap:12px}
.source-sheet header h2{font-size:20px;font-weight:600;line-height:1.35;flex:1;margin:0}.source-sheet header button{font-size:24px;line-height:24px;width:24px;padding:0;flex:none}
.source-sheet-content{padding:20px;overflow:auto;min-height:0;font-size:14px;line-height:1.5;color:#666}.source-sheet-content>p{margin:0 0 24px}.source-sheet-content .button{margin:0}
.source-sheet .help-item{display:block;width:100%;background:none;border-radius:0;border-bottom:1px solid #e0e0e0;padding:20px 0;text-align:left;color:#1a1a1a;min-height:0;font-weight:400}
.source-sheet .help-item strong,.source-sheet .region-option strong{display:block;font-size:15px;font-weight:600;line-height:1.4}.source-sheet .help-item span,.source-sheet .region-option span{display:block;margin-top:8px;color:#666;font-size:14px;font-weight:400;line-height:1.5}
.source-sheet .help-intro+.help-item{padding-top:0}.source-sheet .help-item:nth-last-of-type(1){border-bottom:0;padding-bottom:0}
.source-sheet-content .source-sheet-note{background:#e8f5e8;padding:16px;border-radius:12px;margin:24px 0 0;font-size:12px;line-height:1.5}
.sheet .faq-sheet{height:85%;max-height:85%}.faq-sheet header,.region-sheet header{padding:16px 20px}
.faq-item{margin:0 0 24px}.faq-item:last-child{margin:0}.faq-item h3{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600;color:#1a1a1a;margin:0}.faq-item .icon{width:20px;height:20px}.faq-item p{margin:8px 0 0 28px}.faq-item .link{margin:8px 0 0 28px;text-align:left;font-size:14px;font-weight:600;color:#2d7a6e}
.sheet .region-sheet,.sheet .region-confirm-sheet{max-height:90%}.source-sheet .region-option{display:block;width:100%;background:#fff;padding:16px;border:1px solid #e0e0e0;border-radius:12px;color:#1a1a1a;text-align:left;margin:12px 0}
.source-sheet .region-option.selected{border:2px solid #2d7a6e;background:#f0f7f5}.region-option strong{display:flex!important;justify-content:space-between;gap:8px}.region-option small{font-size:14px;color:#2d7a6e}.region-sheet .source-sheet-note{font-size:14px;padding:12px;border-radius:8px;margin:16px 0}.region-confirm-sheet .button{height:48px;border-radius:8px;margin-top:12px}
/* device_settings_page.dart: identity and two telemetry rows share the gradient. */
.phone .device-settings-screen{padding-top:0;padding-bottom:100px}.device-settings-screen .device-hero{padding:20px;margin:0 0 28px;background:linear-gradient(135deg,#4dc9a0,#2ea87e);border-radius:16px;color:white}
.device-identity{display:flex;align-items:center;gap:16px}.device-icon{width:72px;height:72px;flex:none;display:grid;place-items:center;background:white;border-radius:16px}.device-icon .icon{width:36px;height:36px}.device-identity>div:last-child{min-width:0}.device-identity h2{font-size:18px;font-weight:600;margin:0;color:white;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.device-identity small{display:block;font-size:13px;color:#fffc;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.device-telemetry{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;margin-top:24px}.device-telemetry>div{display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0}.device-telemetry span{font-size:13px;color:#ffffffb3}.device-telemetry b{display:flex;align-items:center;gap:4px;font-size:15px;font-weight:600;min-width:0;white-space:nowrap}.device-telemetry .icon{width:16px;height:16px}.device-online i{width:10px;height:10px;border-radius:50%;background:#e8f5e8;flex:none}.device-online .offline{background:#ffffffb3}
.device-settings-screen .section-title{font-size:17px;font-weight:600;color:#1a1a1a;margin:0 8px 12px}.device-usage.card{padding:16px 20px;margin-bottom:28px}.device-usage .row-item{padding:0;border:0;min-height:32px}.device-usage .row-item strong{font-size:15px;font-weight:500}.device-unlimited{text-align:center;font-size:15px;color:#999;margin:8px 0 4px}.device-limit{text-align:center;margin-top:8px}.device-limit>strong{font-size:19px;color:#2d7a6e;font-weight:700}.device-limit input{width:100%;margin:12px 0 8px;padding:0;accent-color:#2d7a6e;height:20px;border:0}.device-limit .row{font-size:12px;color:#999}
.linked-child-card.card{display:flex;align-items:center;gap:8px;padding:16px;margin:0 0 20px}.linked-child-info{display:flex;align-items:center;gap:12px;min-width:0;flex:1;padding:0;text-align:left}.linked-avatar{width:52px;height:52px;display:grid;place-items:center;border-radius:50%;background:#e8f5e8;flex:none}.linked-avatar .avatar{width:32px;height:32px;background:none}.linked-child-info>span:last-child{min-width:0}.linked-child-info strong{font-size:15px;font-weight:600}.linked-child-info small{display:block;font-size:13px;color:#666;margin-top:2px}.change-child{padding:6px 10px;background:#e8f5e8;color:#2d7a6e;border-radius:8px;font-size:12px;font-weight:500;max-width:120px}.linked-child-card>.row-item{padding:4px 0;border:0;width:100%}.device-unlink.button{height:48px;border:1.5px solid #e53935;color:#e53935;background:transparent;border-radius:12px;margin:0 0 16px}.device-unlink-tip.card{display:flex;align-items:start;gap:10px;padding:14px 16px;border:1px solid #eee;border-radius:12px}.device-unlink-tip p{font-size:14px;color:#666;line-height:1.45;margin:0}

/* me_page.dart:952 has a compact region sheet, without auth help content. */
.me-region-sheet header{display:none}.sheet-handle{width:40px;height:4px;margin:0 auto 20px;background:#e0e0e0;border-radius:2px}

/* Round 3, user-requested H5 viewport rule: the shell owns the status bar.
   Do not add Flutter page-level 40/60px top offsets beneath that shell.
   Raw source topInset remains in visual-source.js for traceability only. */
.phone select{appearance:none;-webkit-appearance:none;padding-right:48px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:20px 20px;background-position:right 16px center}
.phone .dropdown-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px}.dropdown-trigger .control-icon{width:18px;height:18px;flex:none}.source-explore-head .explore-filter{display:grid;place-items:center}.explore-filter .control-icon{width:20px;height:20px}
@media(forced-colors:active){.phone select{appearance:auto;-webkit-appearance:auto;background-image:none}}
