/* Digits only (0–9), from a serif that draws them level: Georgia has only old-style figures (1 and 2 below 8, 5 dips), and lining-nums does not change that. */
@font-face{font-family:babu-digits;src:local('Noto Serif'),local('NotoSerif-Regular'),local('Times New Roman'),local('TimesNewRomanPSMT'),local('Liberation Serif'),local('DejaVu Serif');unicode-range:U+0030-0039}
:root{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#243c33;background:#f5f3ed;font-synthesis:none;--green:#205b46;--ink:#243c33;--muted:#758077;--line:#e1e5dc;--paper:#fffef9;--soft:#edf3e9;--danger:#a74135}
*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button,a,input,textarea{ -webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}a{color:inherit}svg{width:20px;height:20px;flex:none}h1,h2,h3,p{margin:0}h1,h2{font-family:Georgia,'Times New Roman',serif;font-weight:400;letter-spacing:-.035em}h1{font-size:44px;line-height:1.12}h2{font-size:30px}h3{font-size:18px;font-weight:650}p{line-height:1.6}small{font-size:12px}.muted{color:var(--muted)}.eyebrow{font-size:11px;font-weight:700;letter-spacing:.15em;text-transform:uppercase}.button{border:1px solid var(--line);background:white;color:var(--ink);border-radius:12px;min-height:43px;padding:10px 16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:13px;font-weight:600;text-decoration:none;white-space:normal}.button:hover{background:#f1f4ed;border-color:#bdcbbf}.button.primary{background:var(--green);color:white;border-color:var(--green)}.button.primary:hover{background:#174b38}.button.quiet{background:transparent;border-color:transparent}.button.danger{color:var(--danger)}.button.icon-button{width:40px;min-height:40px;padding:8px;border-color:transparent;background:transparent}.button.icon-button:hover{background:#edf1e8}.button:focus-visible,a:focus-visible{outline:3px solid #8dcbb1;outline-offset:3px}input:focus,textarea:focus{outline:2px solid #75a88b;outline-offset:2px}.brand{display:inline-flex;align-items:center;gap:9px;text-decoration:none;font-size:30px;font-weight:700;letter-spacing:-1.5px}.brand-mark{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:11px;background:#dce9c9;color:#205b46}.brand-mark svg{width:23px;height:23px}.layout{min-height:100dvh;display:grid;grid-template-columns:208px 1fr}.sidebar{background:#1b4839;color:#f0f1df;padding:36px 26px;display:flex;flex-direction:column;gap:42px}.sidebar .brand{color:#fffef5}.side-nav{display:flex;align-items:center;gap:10px;padding:12px;border-radius:10px;background:#2d5948;font-size:14px}.sidebar-note{margin-top:auto;font-size:13px;color:#c2d1bf}.sidebar-note p{margin:12px 0}.version{font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:#a6bda9}.portal-main{padding:42px 6%;max-width:1500px;width:100%;margin:auto}.portal-top{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:46px}.portal-top .eyebrow{color:var(--muted)}.portal-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:28px}.portal-heading p{margin-top:12px;color:var(--muted);max-width:530px;font-size:15px}.tag{display:inline-flex;align-items:center;gap:6px;font-size:11px;border-radius:6px;padding:6px 9px;background:#e7ecde;color:#52634c;font-weight:600;white-space:nowrap}.room-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(275px,1fr));gap:20px}.room-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:24px;display:flex;flex-direction:column;gap:20px;min-height:260px;transition:box-shadow .2s,transform .2s}.room-card:hover{box-shadow:0 10px 32px #2440310a;transform:translateY(-2px)}.room-card-top{display:flex;align-items:center;justify-content:space-between}.room-card h2{font-size:27px;overflow-wrap:anywhere}.room-card p{font-size:13px;color:var(--muted);margin-top:8px}.room-card-footer{display:flex;align-items:center;justify-content:space-between;margin-top:auto;border-top:1px solid var(--line);padding-top:18px}.avatar{display:inline-flex;width:38px;height:38px;border-radius:50%;align-items:center;justify-content:center;background:#e5dcc6;color:#5d523c;font-family:Georgia,serif;font-size:18px;flex:none}.avatar.large{width:56px;height:56px;font-size:26px}.tone-1{background:#e4d6c0;color:#735b3c}.tone-2{background:#dfe8d4;color:#49613b}.tone-3{background:#dce4ee;color:#4a6078}.tone-4{background:#edddd6;color:#885f51}.avatar-stack{display:flex;padding-left:0}.avatar-stack .avatar+.avatar{margin-left:-8px;outline:3px solid var(--paper)}.empty-room{grid-column:1/-1;display:flex;align-items:center;gap:36px;padding:46px;background:var(--paper);border:1px solid var(--line);border-radius:20px}.empty-illustration{position:relative;display:flex;align-items:center;justify-content:center;width:140px;height:140px;border-radius:50%;background:#edf2e4;flex:none}.empty-illustration svg{width:52px;height:52px;transform:rotate(-12deg);color:#609371}.empty-room p{max-width:400px;color:var(--muted);margin:14px 0 22px}.info-row{display:grid;grid-template-columns:repeat(3,1fr);gap:26px;margin-top:52px;border-top:1px solid var(--line);padding-top:24px}.info-row strong{display:block;font-size:13px;margin:12px 0 6px}.info-row p{font-size:12px;color:var(--muted)}.info-row svg{color:#739276}.loading-page{display:grid;place-content:center;min-height:70dvh;color:var(--muted);padding:32px}.error{color:var(--danger);font-size:13px;line-height:1.6}.error:not(:empty){background:#fbefeb;padding:10px 14px;border-radius:9px}.modal{border:1px solid var(--line);border-radius:22px;padding:28px;width:min(520px,calc(100vw - 28px));max-height:90dvh;color:var(--ink);background:var(--paper);box-shadow:0 24px 100px #142f3426}.modal::backdrop{background:#172e2859;backdrop-filter:blur(3px)}.modal-heading{display:flex;justify-content:space-between;align-items:start;gap:15px;margin-bottom:23px}.modal-heading h2{font-size:30px}.modal p{font-size:14px;color:var(--muted);margin-bottom:18px}.field{display:flex;flex-direction:column;gap:8px;margin:16px 0;font-size:13px;font-weight:600}.field input,.field textarea,.copy-link{width:100%;border:1px solid #d7ded3;border-radius:10px;padding:12px 14px;color:var(--ink);background:white;line-height:1.4}.field textarea{resize:vertical;min-height:110px}.person-row{display:flex;align-items:center;gap:8px;margin:10px 0}.person-row .field{flex:1;margin:0}.modal-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.form-section{border-top:1px solid var(--line);padding-top:14px;margin-top:20px}.form-section h3{font-size:14px}.helper{font-size:12px;color:var(--muted);line-height:1.6}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:100;background:#203d31;color:#fffef7;border-radius:12px;box-shadow:0 5px 25px #0002;padding:13px 22px;font-size:13px;max-width:90vw;text-align:center}.toast[hidden],[hidden]{display:none!important}
/* The room contains independent, scrollable copies of the same client. */
.stand-page{min-height:100dvh}.stand-top{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 32px;border-bottom:1px solid var(--line);background:var(--paper)}.stand-nav{display:flex;align-items:center;gap:24px}.stand-actions{display:flex;gap:8px}.stand-intro{display:flex;justify-content:space-between;gap:20px;align-items:end;padding:28px 32px 22px}.stand-intro h1{font-size:34px}.stand-intro p{font-size:13px;color:var(--muted);margin-top:8px}.scenario{display:flex;gap:14px;align-items:center;padding:13px 20px;margin:0 32px 20px;background:#e9edde;border-radius:10px;color:#526044;font-size:12px}.scenario strong{font-size:12px;white-space:nowrap}.screen-grid{display:grid;grid-template-columns:repeat(3,minmax(310px,1fr));gap:18px;padding:0 32px 26px;align-items:start;overflow-x:auto}.screen-card{border:1px solid #d9dfd3;border-radius:17px;background:var(--paper);overflow:hidden;box-shadow:0 6px 16px #223b2d06;min-width:0}.screen-card-head{display:flex;align-items:center;gap:9px;padding:12px 13px;border-bottom:1px solid var(--line);background:#eeeee5}.screen-card-head .avatar{width:32px;height:32px;font-size:16px}.screen-person{flex:1;min-width:0}.screen-person strong{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.screen-person small{color:var(--muted);font-size:10px}.screen-card iframe{width:100%;height:clamp(550px,calc(100dvh - 275px),800px);border:0;display:block;background:var(--paper)}.stand-foot{padding:0 32px 24px;color:var(--muted);font-size:12px}.share-person{display:flex;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}.share-person .screen-person{min-width:80px}.stand-error{margin:0 32px 16px}.room-offline{background:#fbefeb;color:var(--danger)}
/* The messenger is designed for both an iframe and its own browser tab. */
html{height:100%}.chat-page{background:#eeefe7;height:100%;box-sizing:border-box}.chat-page #app{height:100%;max-width:780px;margin:auto;background:var(--paper);display:flex;flex-direction:column;position:relative}.chat-header{display:flex;align-items:center;gap:10px;padding:18px 20px;border-bottom:1px solid var(--line);background:var(--paper);flex:none}.chat-header h1{font-family:inherit;font-size:16px;letter-spacing:-.02em;font-weight:650;overflow-wrap:anywhere}.chat-header p{font-size:11px;color:var(--muted);line-height:1.4;margin-top:4px}.chat-header-main{flex:1;min-width:0}.connection{display:inline-flex;align-items:center;gap:5px;font-size:10px;color:#668261;white-space:nowrap}.connection::before{content:'';width:6px;height:6px;background:#6e9d70;border-radius:50%}.connection.offline{color:var(--danger)}.connection.offline::before{background:#b66b5c}.chat-context{padding:10px 20px;background:#f3f4ed;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:10px;color:var(--muted);flex:none}.chat-context button{font-size:11px;padding:0;border:0;background:transparent;color:#6f7967}.chat-scroll{flex:1;min-height:0;overflow-y:auto;padding:22px 18px;scrollbar-width:thin;scrollbar-color:#c3cdbb transparent}.messages{display:flex;flex-direction:column;gap:17px}.chat-date{text-align:center;color:#8b9486;font-size:10px;text-transform:uppercase;letter-spacing:.1em;margin-bottom:20px}.message{max-width:91%;align-self:flex-start;min-width:150px}.message.own{align-self:flex-end}.message-author{font-size:11px;color:#7a8375;margin:0 4px 6px;display:flex;gap:5px;align-items:center}.message-bubble{padding:13px 15px;border:1px solid #e6e8dd;border-radius:3px 15px 15px 15px;background:#f2f1e9}.own .message-bubble{background:#e6efdf;border-color:#dce7d4;border-radius:15px 3px 15px 15px}.message-text{font-size:14px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.message-meta{display:flex;gap:7px;align-items:center;justify-content:flex-end;color:#7d8775;font-size:10px;margin-top:8px;flex-wrap:wrap}.message-meta svg{width:12px;height:12px}.message-actions{display:flex;justify-content:flex-end;gap:0;margin-top:1px}.message-actions .button{width:29px;min-height:26px;padding:5px;color:#9ba293}.message-actions svg{width:13px;height:13px}.message-actions button:hover{color:var(--ink)}.reaction{font-size:11px;color:#507444;padding:7px 9px;background:#eff5e8;border-radius:8px;margin-top:7px;line-height:1.5}.reaction.callback{color:#896b34;background:#faf2de}.message.deleted{opacity:.65}.deleted .message-text{font-style:italic}.compose{padding:13px 16px 16px;border-top:1px solid var(--line);background:var(--paper);flex:none}.compose-box{display:flex;gap:10px;align-items:flex-end;border:1px solid #dbe1d4;border-radius:13px;background:white;padding:7px}.compose textarea{flex:1;resize:none;min-width:0;border:0;min-height:42px;max-height:120px;background:transparent;line-height:1.5;font-size:14px;padding:10px}.compose textarea:focus{outline:0}.compose .send-button{width:42px;height:42px;padding:8px;min-height:42px;border-radius:9px}.compose-hint{display:flex;justify-content:space-between;gap:12px;font-size:10px;color:#909886;padding:8px 3px 0}.chat-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:250px;padding:20px;color:var(--muted);gap:13px}.chat-empty svg{width:34px;height:34px;color:#8ba07a}.chat-empty h2{font-size:26px;color:var(--ink)}.chat-empty p{font-size:13px;max-width:260px}.call-request{border:1px solid #e9dbb7;background:#fcf6e6;border-radius:12px;padding:13px 14px;margin:0 0 20px;display:flex;flex-direction:column;gap:8px;font-size:12px}.call-request.resolved{background:#edf3e8;border-color:#dce6d5}.call-request strong{font-size:13px}.call-request p{font-size:11px;color:#877548}.call-request .button{min-height:34px;font-size:11px;background:#fffaf0;align-self:flex-start}.new-banner{display:flex;align-items:center;justify-content:center;width:100%;padding:10px;background:#e1edd6;border:0;font-size:12px;color:#3b5c33;flex:none}.pending{opacity:.7}.pending-error{color:var(--danger)}
/* Elder surface: fewer controls, larger messages and persistent feedback. */
.elder .chat-header{padding:19px 20px}.elder .chat-header h1{font-size:19px}.elder .chat-header p{font-size:12px}.elder .chat-scroll{padding:20px 16px}.elder .message{width:100%;max-width:100%;align-self:stretch}.elder .messages{gap:18px}.elder .message-bubble{background:#fffdf4;border-radius:15px;border:1px solid #e1e4d5;padding:18px;cursor:pointer}.elder .message.unread .message-bubble{background:#eaf2df;border-color:#bfd4ae}.elder .message-author{font-size:15px;margin-bottom:9px;color:#526246}.elder .message-text{font-family:Georgia,'Times New Roman',serif;font-size:27px;line-height:1.4;letter-spacing:-.015em}.elder .message-meta{font-size:12px;justify-content:flex-start;margin-top:13px}.elder .reaction{font-size:15px;padding:12px}.elder .message-actions{justify-content:stretch;gap:8px;margin-top:12px}.elder .message-actions .button{height:auto;width:auto;flex:1;padding:13px 8px;min-height:53px;font-size:14px;color:var(--green);border:1px solid #cdd9c3;background:#f8fcf2;border-radius:12px}.elder .message-actions .button.primary{background:var(--green);color:white}.elder .message-actions svg{width:18px;height:18px}.elder-footer{padding:13px 16px;border-top:1px solid var(--line);background:var(--paper);flex:none}.elder-footer .button{width:100%;font-size:18px;min-height:58px;border-radius:14px}.elder-footer .helper{text-align:center;font-size:11px;margin-top:8px}.elder .call-request{font-size:16px}.elder .call-request strong{font-size:18px}.elder .call-request p{font-size:14px}.elder .chat-empty h2{font-size:34px}.elder .chat-empty p{font-size:18px}.focus-message{width:min(680px,calc(100vw - 20px));padding:24px;max-height:95dvh}.focus-message .focus-text{font-family:Georgia,serif;font-size:clamp(28px,4vw,42px);line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;margin:18px 0}.focus-message .focus-meta{font-size:14px;color:var(--muted);line-height:1.7}.focus-message .focus-actions{display:flex;gap:10px;margin-top:24px}.focus-message .focus-actions .button{flex:1;font-size:18px;min-height:62px}.focus-message .reaction{font-size:18px}.focus-message details{font-size:14px;line-height:1.6;margin:20px 0;color:var(--muted)}.focus-message details p{font-size:22px;color:var(--ink);white-space:pre-wrap}.focus-message .new-notice{background:#eaf1df;font-size:15px;padding:12px;border-radius:10px;margin-top:15px;color:#45683c}.elder-welcome{background:#d8eac6;position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:23px;padding:30px;text-align:center}.elder-welcome h2{font-size:43px}.elder-welcome p{font-size:20px;max-width:320px}.elder-welcome svg{width:64px;height:64px;color:#527a42}.elder-welcome .button{min-height:66px;font-size:21px;width:100%;max-width:360px}.elder-welcome small{color:#698057;font-size:13px}
@media(min-width:900px){.chat-page:not(.embedded){padding:24px}.chat-page:not(.embedded) #app{height:100%;border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:0 12px 48px #1b3b2910}.chat-page:not(.embedded) .chat-scroll{padding:28px 32px}.chat-page:not(.embedded) .message-text{font-size:17px}.chat-page.elder:not(.embedded) .message-text{font-size:32px}.chat-page:not(.embedded) .compose{padding:18px 26px}}
@media(max-width:900px){.layout{grid-template-columns:1fr}.sidebar{padding:17px 22px;flex-direction:row;align-items:center;gap:24px}.sidebar .brand{font-size:27px}.sidebar-note,.version{display:none}.side-nav{margin-left:auto}.portal-main{padding:30px 24px}.portal-top{margin-bottom:30px}.screen-grid{grid-template-columns:repeat(3,340px);padding:0 18px 20px;gap:14px}.stand-top{padding:16px 18px;flex-wrap:wrap}.stand-intro{padding:23px 18px 18px;align-items:start;flex-direction:column}.scenario{margin:0 18px 18px;flex-wrap:wrap;gap:6px}.stand-foot{padding:0 18px 20px}.stand-error{margin:0 18px 16px}.stand-nav{gap:10px}}
@media(max-width:520px){h1{font-size:36px}.portal-heading{align-items:start;flex-direction:column}.portal-main{padding:24px 18px}.portal-top{margin-bottom:25px}.empty-room{padding:28px;flex-direction:column;text-align:center;gap:22px}.empty-illustration{width:100px;height:100px}.info-row{grid-template-columns:1fr;gap:20px;margin-top:30px}.info-row strong{margin:0 0 4px}.info-row>div{position:relative;padding-left:34px}.info-row svg{position:absolute;left:0;top:0}.stand-top .brand{font-size:26px}.stand-actions .button{font-size:11px;padding:9px 10px;min-height:38px}.stand-intro h1{font-size:30px}.chat-header{padding:15px}.chat-header .avatar{width:34px;height:34px}.modal{padding:22px}.modal h2{font-size:26px}.focus-message .focus-actions{flex-direction:column}.focus-message .focus-actions .button{flex:auto}.focus-message .focus-text{font-size:30px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Inline calendar dates and readable left/right family conversations. */
.chat-page:not(.elder) .message{max-width:84%;margin-right:32px;align-self:flex-start}.chat-page:not(.elder) .message.own{margin-right:0;margin-left:32px;align-self:flex-end}.chat-page:not(.elder) .own .message-author{justify-content:flex-end}.chat-page:not(.elder) .message-bubble{box-shadow:0 2px 4px #213b2c04}.inline-date{background:#dceacd;color:#294f32;border-radius:5px;padding:1px 4px;box-decoration-break:clone;-webkit-box-decoration-break:clone}.today-strip{font-size:12px;text-align:center;padding:9px 15px;color:#536847;border-bottom:1px solid var(--line);flex:none}.elder .today-strip{font-size:16px;padding:12px}.date-editor{padding-top:5px}.date-editor>.button{font-size:12px;min-height:33px;padding:5px 8px}.date-editor-chips{display:flex;flex-wrap:wrap;gap:3px}.date-editor-chips .button{font-size:11px;padding:4px 7px;min-height:28px;background:#edf3e6}.date-preview{font-size:12px;color:#52614a;line-height:1.8;max-height:90px;overflow:auto;padding:8px 3px}.field select{max-width:100%;border:1px solid #d7ded3;border-radius:10px;padding:12px;color:var(--ink);background:white}.date-picker input{min-width:0}.date-picker-preview{margin:20px 0!important;padding:14px;background:#e8f0dd;border-radius:10px;color:var(--green)!important}.time-zone-choice{font-size:12px;color:var(--muted);margin:12px 0}.upcoming{margin-bottom:22px}.upcoming h2{font-size:19px;margin-bottom:9px}.plan-card{width:100%;display:flex;gap:10px;align-items:flex-start;text-align:left;border:1px solid #dbe3cf;background:#f1f5e8;border-radius:12px;padding:12px;margin:6px 0;color:var(--ink);font-size:12px}.plan-card>span{min-width:0}.plan-card strong{display:block;font-size:13px;margin-bottom:5px}.plan-card span span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:50ch}.elder .upcoming h2{font-size:23px}.elder .plan-card strong{font-size:17px}.elder .plan-card{font-size:15px}.elder .plan-card span span{max-width:22ch}
/* A deliberate answer is required before media starts on the elder screen. */
.chat-context #video-call-button{font-size:12px;color:var(--green);min-height:35px;padding:5px 8px}.elder .chat-context #video-call-button{font-size:15px;min-height:44px}.call-person{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line)}.call-person strong,.call-person small{display:block}.call-person small{margin-top:5px;color:var(--muted)}.video-call{width:min(760px,calc(100vw - 20px));padding:20px}.video-call .modal-heading{margin-bottom:14px}.call-videos{position:relative;min-height:230px;background:#183c2f;border-radius:15px;overflow:hidden}.call-remote{display:block;width:100%;max-height:55dvh;min-height:230px;object-fit:contain}.call-self{position:absolute;bottom:12px;right:12px;width:30%;min-width:96px;max-width:190px;border-radius:10px;overflow:hidden;background:#2b5645}.call-local{display:block;width:100%;max-height:120px;object-fit:contain;transform:scaleX(-1)}.call-local.synthetic{transform:none}.call-self>span,.call-peer-label{display:block;font-size:11px;padding:5px 8px;color:#fff;background:#122e28d9;overflow-wrap:anywhere}.call-peer-label{position:absolute;left:8px;top:8px;border-radius:6px;max-width:90%}.call-videos>.button{position:absolute;left:15px;bottom:15px}.video-call .call-status{margin:15px 0;text-align:center;color:var(--ink);font-size:17px}.video-call .call-received{font-size:12px;text-align:center;margin:12px 0;color:var(--muted)}.call-controls{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.call-controls .button{flex:1;min-width:110px;min-height:48px}.elder .call-controls .button{font-size:20px;min-height:64px}.elder .video-call .call-status{font-size:23px}
.media-source-picker{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:16px 0;min-width:0}.media-source-picker legend{font-size:14px;font-weight:600;padding:0 6px}.media-source-picker .field{margin:0 0 12px}.media-source-picker select{width:100%;min-width:0;font-size:14px}.source-preview{display:grid;grid-template-columns:36px minmax(0,1fr);gap:4px 12px;align-items:center;border-radius:9px;padding:12px;color:#fff}.source-preview svg{grid-row:span 2;width:32px;height:32px}.source-preview strong{overflow-wrap:anywhere}.source-preview small{font-size:11px;line-height:1.5}.microphone-choice{display:flex;align-items:center;gap:10px;font-size:14px;min-height:48px;margin:7px 0;cursor:pointer}.microphone-choice input{width:20px;height:20px;flex:none;accent-color:var(--green)}.modal .source-hint{font-size:12px;margin:4px 0 12px;line-height:1.6}.camera-devices{font-size:12px;color:var(--muted)}.camera-devices summary{cursor:pointer}.camera-devices small{display:block;line-height:1.6;margin:6px 0}.camera-devices .button{font-size:12px;padding:8px 0}.elder .media-source-picker legend,.elder .media-source-picker select,.elder .microphone-choice{font-size:17px}.elder .source-hint{font-size:15px}.elder .call-received{font-size:14px}
.group-call .group-videos{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;padding:12px}.group-call .call-self{position:relative;margin:12px 12px 12px auto;bottom:auto;right:auto}.group-peer{min-width:0;border-radius:10px;overflow:hidden;background:#234c3e;color:#fff}.group-peer .call-remote{min-height:120px;max-height:32dvh}.group-peer strong,.group-peer small{display:block;padding:4px 10px}.group-peer small{padding-bottom:10px;opacity:.8}.group-call-choice{margin-bottom:12px}

/* roles, speaking frames, simulator voice */
.screen-card-head.role-admin .avatar{box-shadow:0 0 0 2px var(--green,#2f6f4f)}
.family-list{display:flex;flex-direction:column;gap:6px}.family-list .share-person{gap:10px;flex-wrap:wrap}.family-list select{min-height:36px;padding:4px 8px}
.family-add{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:end;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.family-modal{width:min(640px,calc(100vw - 20px))}
.voice-box{margin:10px 0}.voice-form{display:flex;gap:8px}.voice-form input{flex:1;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;font-size:16px}.voice-box small{display:block;margin-top:6px}
.group-peer,.call-videos,.call-self{transition:box-shadow .15s,outline-color .15s;outline:3px solid transparent;outline-offset:-3px}
.group-peer.speaking,.call-videos.speaking,.call-self.speaking{outline-color:#ffd34d;box-shadow:0 0 0 3px #ffd34d,0 0 18px #ffd34d99}
.group-peer.speaking strong::after,.call-self.speaking>span::after{content:' · говорит';color:#ffd34d}
.invite-row{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.listen-box{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}.listen-box select{min-height:36px;padding:4px 8px}
.elder .video-call .call-status{line-height:1.3}
.conversation-strip{display:flex;gap:6px;overflow-x:auto;padding:8px 12px;border-bottom:1px solid var(--line);background:#fff;scrollbar-width:thin}
.conversation-chip{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
.conversation-chip.active{background:var(--green,#2f6f4f);color:#fff;border-color:transparent}.conversation-chip .unread{min-width:18px;padding:0 5px;border-radius:9px;background:#d9534f;color:#fff;font-size:11px;line-height:18px;text-align:center}
.elder .conversation-chip{min-height:52px;font-size:19px;padding:8px 18px}.elder .conversation-strip{padding:10px 14px}
.member-choice{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}.member-choice input{width:20px;height:20px}
.invite-notes{font-size:13px;color:var(--muted);margin:4px 0 8px;text-align:center}
/* In-kiosk WebView (ui sets html.kiosk after onPageFinished): the chat fills the whole tablet, no centred card. */
html.kiosk .chat-page{padding:0}html.kiosk .chat-page #app{max-width:none;border:0;border-radius:0;box-shadow:none}

/* Elder home: one big tile per person; the tile says what is new from them. */
.elder-home{height:100%;display:flex;flex-direction:column;background:#eef2e6}
.home-head{display:flex;align-items:center;gap:16px;padding:12px 22px;border-bottom:1px solid var(--line);background:var(--paper);flex:none}
.home-name{font-family:Georgia,'Times New Roman',serif;font-size:24px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.elder-home .today-strip{border:0;padding:0;font-size:18px;color:#4a5f42;white-space:nowrap}
.tiles{flex:1;display:grid;gap:14px;padding:16px;grid-template-columns:repeat(2,1fr);grid-auto-rows:1fr;min-height:0}
.tiles[data-grid="4"]{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}
.tiles[data-grid="6"]{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(3,1fr)}
.tile.empty{background:transparent;border:2px dashed #d3dbc9}
.tiles-editor{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}.tiles-editor h3{margin-bottom:6px}.slot-rows{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:10px}.slot-row{display:flex;align-items:center;gap:8px}.slot-row select{flex:1;min-width:0;border:1px solid #d7ded3;border-radius:10px;padding:10px;background:white}.slot-number{width:28px;height:28px;border-radius:50%;background:#e8eee0;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:650}
.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border:2px solid #d7dfcd;border-radius:22px;background:var(--paper);color:var(--ink);padding:18px;font:inherit;min-height:120px;min-width:0}
.tile-name{font-family:Georgia,'Times New Roman',serif;font-size:clamp(34px,7vw,64px);line-height:1.1;text-align:center;overflow-wrap:anywhere}
.tile-status{font-size:clamp(16px,2.6vw,24px);color:#5b6b52;min-height:1.4em;text-align:center}
.tile.new{background:#e4f0d6;border-color:#8fb877}.tile.new .tile-status{color:#2f5a2a;font-weight:650}
.tile.waiting{background:#fff3d6;border-color:#ddb35d}.tile.waiting .tile-status{color:#7a5a12}
.tile.answered{background:#e9eef5;border-color:#a9b9d1}
/* Person screen: «Назад», the name, «Позвонить», then their messages as cards. */
.elder-person{height:100%;display:flex;flex-direction:column;position:relative}
/* «Назад» on the left, the person's name in the middle of the row, bold and dark. */
.person-head{display:grid;grid-template-columns:1fr minmax(0,auto) 1fr;align-items:center;gap:16px;padding:10px 16px;border-bottom:1px solid #d6e2c9;background:#eef4e6;flex:none}
.person-head>.button.back{justify-self:start}.person-head>.connection{justify-self:end}
.person-head h1{min-width:0;text-align:center;font-family:inherit;font-size:clamp(34px,6vw,52px);font-weight:800;letter-spacing:-.01em;color:#16301a;overflow-wrap:anywhere}
.button.back{min-height:64px;font-size:22px;padding:10px 22px 10px 16px;border-radius:16px;background:#e8eee0;border:1px solid #cfd8c4;color:var(--ink)}
.button.back svg{width:28px;height:28px}
.person-actions{display:flex;gap:12px;padding:12px 16px;background:var(--paper);border-bottom:1px solid var(--line);flex:none}
.person-actions .button{flex:1;min-width:0;min-height:72px;font-size:26px;border-radius:18px}
.person-hint{padding:8px 16px;text-align:center}.elder .error:empty{display:none}
.person-actions .button svg{width:30px;height:30px}
.simple-call .call-status{font-size:22px}.simple-call .call-controls .button{min-height:64px;font-size:22px}
/* Address book dialog */
.address-book .field select{width:100%}
.address-rows{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.address-row .field input{width:100%}

/* Elder type on the tablet: a capital letter is at least 7 mm high. SM-T825 =
   1024 CSS px across 197 mm (0.19 mm/px); cap height ≈ 0.72 em (Inter) or
   0.69 em (Georgia), so nothing the elder reads is below 52 px / 54 px. */
.chat-page.elder.big{--big:52px;--big-serif:54px;--big-line:1.25}
.chat-page.elder.big .home-head{flex-wrap:wrap;gap:6px 18px;padding:14px 22px}
.chat-page.elder.big .home-name{display:none}
.chat-page.elder.big .today-strip{font-size:var(--big);line-height:var(--big-line);white-space:normal;flex:1}
/* Her screen: nothing while connected; after 2 min without the server a
   small grey dot and «нет связи» in the corner of the top line. Nothing red,
   nothing blinks (chat.js showConnection). */
.chat-page.elder .connection:not(.offline){display:none}
.chat-page.elder .connection.offline{color:#8a8f86;font-size:15px;gap:7px;font-weight:400}
.chat-page.elder .connection.offline::before{background:#a9aea5;width:9px;height:9px}
.chat-page.elder.big .tiles{gap:16px;padding:16px}
.chat-page.elder.big .tile-name{font-size:clamp(64px,9vw,84px)}
.chat-page.elder.big .tile-status{font-size:var(--big);line-height:var(--big-line)}
.chat-page.elder.big .person-head{gap:14px;padding:10px 14px}
.chat-page.elder.big .person-head h1{font-size:68px;line-height:1.1}
.chat-page.elder.big .button.back{font-size:var(--big);min-height:80px;padding:8px 22px 8px 14px}.chat-page.elder.big .button.back svg{width:40px;height:40px}
.chat-page.elder.big .person-actions .button{font-size:var(--big);min-height:88px}.chat-page.elder.big .person-actions .button svg{width:44px;height:44px}
.chat-page.elder.big .chat-scroll{padding:16px}
.chat-page.elder.big .message-author{font-size:var(--big);line-height:var(--big-line);margin-bottom:10px}
.chat-page.elder.big .message-bubble{padding:20px}
.chat-page.elder.big .message-text{font-size:var(--big-serif);line-height:var(--big-line)}
.chat-page.elder.big .message-meta{font-size:var(--big);line-height:var(--big-line);margin-top:14px}
.chat-page.elder.big .reaction{font-size:var(--big);line-height:var(--big-line);padding:14px 18px}.chat-page.elder.big .reaction svg{width:40px;height:40px}
.chat-page.elder.big .message-actions .button{font-size:var(--big);min-height:88px;padding:10px 14px}.chat-page.elder.big .message-actions svg{width:40px;height:40px}
.chat-page.elder.big .call-request{font-size:var(--big);line-height:var(--big-line);padding:18px}
.chat-page.elder.big .call-request strong,.chat-page.elder.big .call-request p{font-size:var(--big);line-height:var(--big-line)}
.chat-page.elder.big .elder-footer .button{font-size:var(--big);min-height:88px}.chat-page.elder.big .elder-footer .button svg{width:40px;height:40px}
.chat-page.elder.big .elder-footer .helper{font-size:var(--big);line-height:var(--big-line);margin-top:10px}
.chat-page.elder.big .chat-empty h2{font-size:var(--big-serif)}.chat-page.elder.big .chat-empty p{font-size:var(--big);line-height:var(--big-line);max-width:none}
.chat-page.elder.big .new-banner{font-size:var(--big);line-height:var(--big-line);padding:16px}
.chat-page.elder.big .upcoming h2{font-size:var(--big-serif)}.chat-page.elder.big .plan-card,.chat-page.elder.big .plan-card strong{font-size:var(--big);line-height:var(--big-line)}
.chat-page.elder.big .chat-date{font-size:var(--big)}
.chat-page.elder.big .error{font-size:var(--big);line-height:var(--big-line)}
.chat-page.elder.big .focus-message h2,.chat-page.elder.big .video-call h2{font-size:var(--big-serif)}
.chat-page.elder.big .focus-meta{font-size:var(--big);line-height:var(--big-line)}
.chat-page.elder.big .focus-text{font-size:var(--big-serif);line-height:var(--big-line)}
.chat-page.elder.big .focus-actions .button,.chat-page.elder.big .call-controls .button{font-size:var(--big);min-height:88px}
.chat-page.elder.big details summary,.chat-page.elder.big details p,.chat-page.elder.big .new-notice{font-size:var(--big);line-height:var(--big-line)}
.chat-page.elder.big .call-status,.chat-page.elder.big .call-received,.chat-page.elder.big .call-peer-label,.chat-page.elder.big .call-self span{font-size:var(--big);line-height:var(--big-line)}
.chat-page.elder.big .toast{font-size:var(--big);line-height:var(--big-line);padding:18px 24px}
.chat-page.elder.big dialog .icon-button{width:88px;height:88px;min-height:88px}.chat-page.elder.big dialog .icon-button svg{width:44px;height:44px}
.call-mode{display:flex;gap:8px;margin-bottom:12px}.call-mode label{flex:1;display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:14px;cursor:pointer}.call-mode label:has(input:checked){background:var(--green);color:#fff;border-color:transparent}
.chat-page.elder.big .message-author{display:none}
.chat-page.elder.big .person-actions .button{font-size:var(--big);line-height:1.1;white-space:normal;padding:8px 10px}
.tile.missed{background:#fbe6e0;border-color:#d9a08f}.tile.missed .tile-status{color:#8a3b2a;font-weight:650}
.call-request.missed{background:#fbe6e0;border-color:#e6b9ab}.call-request.missed strong{color:#7a2f20}.call-request.missed.resolved{background:#f3efe9;border-color:#e1e5dc}.call-request.missed.resolved strong{color:var(--muted)}
.invite-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:10px}.invite-title{font-size:12px;color:var(--muted);margin-right:4px}
.call-videos.duo .group-videos{grid-template-columns:1fr}.call-videos.duo .group-peer video{max-height:60vh}
.chat-page.elder.big .invite-title{font-size:var(--big)}.chat-page.elder.big .invite-row .button{font-size:var(--big);min-height:80px}.chat-page.elder.big .invite-notes{font-size:var(--big)}
/* Elder call screen (tablet 952×768 next to the brightness slider): the
   dialog fills the screen, the video takes what is left, and the name,
   status, «Добавить» row and «Завершить» are always visible — no scroll. */
.chat-page.elder.big .video-call{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:8px 14px 12px;display:flex;flex-direction:column;gap:8px;box-sizing:border-box;overflow:hidden}
.chat-page.elder.big .video-call .modal-heading{margin-bottom:0;flex:none;align-items:center}
.chat-page.elder.big .video-call .modal-heading h2{font-size:48px;line-height:1.1}
.chat-page.elder.big .video-call .call-videos{flex:1;min-height:120px;display:block;position:relative;background:#183c2f}
.chat-page.elder.big .video-call .group-videos{height:100%;padding:0;gap:8px;grid-auto-rows:1fr;grid-template-columns:repeat(auto-fit,minmax(45%,1fr))}
.chat-page.elder.big .video-call .call-videos.duo .group-videos{grid-template-columns:1fr}
.chat-page.elder.big .video-call .group-peer{display:flex;flex-direction:column;min-height:0;position:relative}
.chat-page.elder.big .video-call .group-peer .call-remote{flex:1;min-height:0;max-height:none;height:100%;width:100%;object-fit:cover}
.chat-page.elder.big .video-call .group-peer strong{position:absolute;left:10px;top:8px;font-size:28px;padding:4px 12px;border-radius:8px}
.chat-page.elder.big .video-call .group-peer small{display:none}
.chat-page.elder.big .video-call .call-self{position:absolute;right:10px;bottom:10px;margin:0;width:22%;max-width:220px;min-width:120px}
.chat-page.elder.big .video-call .call-self>span{font-size:22px}
.chat-page.elder.big .video-call .call-local{max-height:none}
.chat-page.elder.big .video-call .call-status{margin:0;font-size:var(--big);line-height:1.15;flex:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-page.elder.big .video-call .call-received{display:none}
.chat-page.elder.big .video-call .media-source-picker{flex:none;max-height:40%;overflow:auto}
.chat-page.elder.big .video-call .invite-row{flex:none;flex-wrap:nowrap;overflow-x:auto;gap:8px;margin:0;scrollbar-width:none}
.chat-page.elder.big .video-call .invite-row .button{flex:none;min-height:64px;font-size:34px;padding:6px 16px}
.chat-page.elder.big .video-call .invite-title{font-size:30px;white-space:nowrap}
.chat-page.elder.big .video-call .invite-notes{flex:none;font-size:30px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-page.elder.big .video-call .voice-box{flex:none}
.chat-page.elder.big .video-call .call-controls{flex:none;flex-wrap:nowrap;gap:10px}
.chat-page.elder.big .video-call .call-controls .button{min-height:88px;font-size:var(--big);min-width:0;flex:1}
/* The elder does not manage tracks: only answer / decline / end. */
.chat-page.elder.big .video-call .call-controls .button:not(.primary):not(.danger){display:none}
/* Six tiles on 952×768: ~215 px per tile, so the name shrinks a little and the status stays one short line. */
.tile{overflow:hidden}
.tiles[data-grid="6"]{gap:12px;padding:12px}
.tiles[data-grid="6"] .tile{padding:8px 14px;gap:4px}
.chat-page.elder.big .tiles[data-grid="6"] .tile-name{font-size:60px;line-height:1.05}
.chat-page.elder.big .tile-status{line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
/* Elder's day (scenarios §5): the top line, statuses in two short lines, the calm screen,
   the own request with «Не надо», calls and requests by day, the offline note.
   Checked at 880×768 (the WebView between the brightness and volume strips). */
.home-line{flex:1;min-width:0;font-family:Georgia,'Times New Roman',serif;font-size:26px;color:#3f5a37}
.home-line.news{color:#2f5a2a;font-weight:650}
.chat-page.elder.big .home-head{flex-wrap:nowrap;align-items:center}
.chat-page.elder.big .home-line{font-size:var(--big);line-height:1.15;overflow-wrap:anywhere}
.chat-page.elder.big .today-strip{flex:none;white-space:nowrap}
.tile-status{display:flex;flex-direction:column;align-items:center}
.chat-page.elder.big .tile-status{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.08}
.status-line,.status-detail{display:block;max-width:100%}
.tile.highlight{border-width:5px;box-shadow:0 0 0 5px #b9dc9c}
.tile.online .tile-status{color:#2f6a3a}
.tile.busy{background:#f1ede4}.tile.quiet{background:#eceef3}.tile.quiet .tile-status{color:#4e5a73}
.tile.talked .tile-status{color:#4a5f42}
.chat-page.elder.big .tiles[data-grid="6"] .tile{justify-content:center;gap:2px}
.chat-page.elder.big .tiles[data-grid="6"] .tile-status{font-size:var(--big)}
.request-hint{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 16px;background:#fff3d6;border-bottom:1px solid #e7cf94;flex:none}
.request-hint .request-text{flex:1;min-width:0;color:#6d4f0c;font-weight:600}
.chat-page.elder.big .request-hint{font-size:var(--big);line-height:1.15;padding:10px 16px}
.chat-page.elder.big .request-hint .button{font-size:var(--big);min-height:80px;padding:6px 18px;border:2px solid #c9a24c;background:#fffaf0}
/* The calm screen is a soft warm green (old kiosk palette: green-100/200), dark green type. */
.calm{position:fixed;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:radial-gradient(ellipse at 50% 38%,#cfe8bf 0%,#b8dfa7 55%,#a6d492 100%);color:#1e3a12;text-align:center;padding:24px;cursor:pointer}
.calm[hidden]{display:none}
.calm-clock{font-family:babu-digits,Georgia,'Times New Roman',serif;font-size:min(28vw,220px);line-height:1;letter-spacing:-4px}
.calm-date{font-family:babu-digits,Georgia,'Times New Roman',serif;font-size:54px;color:#2d4a1f}
.calm-line{font-family:Georgia,'Times New Roman',serif;font-size:54px;font-style:italic}
.calm-hint{font-size:40px;color:#4e7d3f;margin-top:24px}
.day-event{display:flex;gap:14px;align-items:baseline;padding:10px 14px;border-radius:14px;background:#f1f4ec;color:#3f5037}
.day-event.talk{background:#e9f2e1}.day-event.no-talk{background:#fbeee9}.day-event.request{background:#fff7e4}
.day-event-time{font-weight:650;flex:none}
.chat-page.elder.big .day-event{font-size:var(--big);line-height:1.2;padding:14px 18px}
.chat-date{align-self:center;color:var(--muted);font-weight:650;font-size:13px;padding:4px 0}
.problems{background:#fbe6e0;color:#7a2f22;padding:8px 20px;font-size:14px;flex:none}.problems p{margin:2px 0}
.call-request.withdrawn{opacity:.8}
.hours-row{display:flex;gap:14px}.hours-row .field{flex:1}.hours-row select{width:100%;padding:10px;border:1px solid #d7ded3;border-radius:10px;background:white}
.video-call.call-unavailable .call-status{white-space:normal!important}

/* Organizer admin: left menu Семьи / Люди / Устройства / Система; a family
   page with its own section menu. Phone: menus become scrolling strips. */
.admin-nav{display:flex;flex-direction:column;gap:4px}.admin-nav .side-nav{background:transparent;color:#d8e2d2;text-decoration:none}.admin-nav .side-nav:hover{background:#25503f}.admin-nav .side-nav.active{background:#2d5948;color:#fffef5}
.admin-main{padding:36px 4%;max-width:1440px;width:100%;margin:0 auto;min-width:0}
.admin-main>h1{margin-bottom:18px}
.family-state{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}.family-state li{display:flex;align-items:center;gap:8px}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#c5ccc0;flex:none;margin-right:2px}.dot.on,.state-ok .dot{background:#4f9a5c}.state-off .dot{background:#c7704f}.state-off{color:#8a4d38}.state-warn{color:#8a6a1c}.state-warn .dot{background:#ddb35d}
.family-card{min-height:0}.room-card.compact{min-height:0;gap:12px}.room-card.compact h2{font-size:23px}
.family-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.back-link{padding-left:0}
.family-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid var(--line)}.family-title h1{font-size:40px}.family-title .family-state{flex-direction:row;flex-wrap:wrap;gap:6px 18px;margin:0}
.family-grid{display:grid;grid-template-columns:190px minmax(0,1fr);gap:30px;align-items:start}
.family-tabs{display:flex;flex-direction:column;gap:2px;position:sticky;top:16px}.family-tabs a{text-decoration:none;padding:10px 12px;border-radius:9px;font-size:14px;color:#44574c}.family-tabs a:hover{background:#ebefe4}.family-tabs a.active{background:var(--green);color:#fff;font-weight:600}
.admin-section h2{font-size:32px;margin-bottom:6px}.section-intro{max-width:760px;font-size:13px;margin-bottom:20px}.section-actions{margin-top:18px}
.person-list{display:flex;flex-direction:column;gap:10px}
.person-card{display:grid;grid-template-columns:minmax(220px,1fr) 170px minmax(0,1.7fr);gap:6px 18px;align-items:center;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:14px 16px}
.person-list:not(.global) .person-main,.person-list:not(.global) .person-role{grid-row:span 2}.person-list:not(.global) .person-tools{grid-column:3}
.person-list.global .person-card{grid-template-columns:minmax(220px,1.2fr) minmax(0,2fr) auto}
.person-card.role-elder{border-color:#cbdcb8;background:#f6f9ef}
.person-main{display:flex;align-items:center;gap:12px;min-width:0}.person-names{min-width:0}.person-full{display:block;font-size:15px;overflow-wrap:anywhere}.person-names small{color:var(--muted)}
img.avatar.photo{object-fit:cover;padding:0}
.person-role select,.admin-section select{border:1px solid #d7ded3;border-radius:10px;padding:9px 10px;background:#fff;color:var(--ink);font:inherit;font-size:13px;max-width:100%}
.person-link,.person-tools,.person-families{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.person-link .button,.person-tools .button{min-height:36px;padding:7px 11px;font-size:12px}
.tag.warn{background:#fbecd9;color:#8a5a1c}.tag.role-elder{background:#e3eed5}.tag.role-admin{background:#dfe9f0;color:#3b556a}.person-families .tag{text-decoration:none}
.modal.wide{width:min(620px,calc(100vw - 28px))}.button.danger-fill{background:var(--danger);border-color:var(--danger)}
.segmented{display:inline-flex;border:1px solid var(--line);border-radius:11px;padding:3px;gap:3px;background:#f0f2ea}.segmented button{border:0;background:transparent;border-radius:8px;padding:8px 12px;font-size:13px;color:var(--ink)}.segmented button[aria-checked="true"]{background:#fff;box-shadow:0 1px 3px #0001;font-weight:600}
.person-fields{display:flex;flex-direction:column;align-items:stretch;gap:0}.person-fields .field{margin:10px 0}
.photo-row{display:flex;align-items:center;gap:10px;margin:8px 0}.photo-row input[type=file]{display:none}.photo-preview img,.photo-preview>span{width:56px;height:56px;border-radius:50%;object-fit:cover;display:inline-flex;align-items:center;justify-content:center;background:#eef0e8;font-size:10px;text-align:center}
/* Names matrix: a table on a computer (rows line up on one column template). */
.names-scroll{overflow-x:auto;padding-bottom:8px}
.names-matrix{--first:210px;display:flex;flex-direction:column;gap:6px;min-width:calc(var(--first) + var(--cols) * 128px)}
.names-head,.names-row{display:grid;grid-template-columns:var(--first) repeat(var(--cols),minmax(118px,1fr));gap:6px;align-items:center}
.names-head{font-size:12px;font-weight:650;color:#4f5f55;padding:0 0 4px}.names-corner{font-weight:400;color:var(--muted);font-size:11px}.names-col{padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.names-col.role-elder{color:var(--green)}
.names-row{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:6px}
.names-row.role-elder{background:#eef5e3;border-color:#bcd3a4;box-shadow:inset 4px 0 0 var(--green)}
.names-cells{display:contents}
.names-viewer{display:flex;align-items:center;gap:9px;border:0;background:transparent;text-align:left;padding:4px;color:var(--ink);cursor:default;min-width:0}.names-viewer strong{display:block;font-size:13px}.names-viewer small{color:var(--muted);font-size:11px}.names-viewer .avatar{width:32px;height:32px;font-size:15px}
.names-legend{display:flex;flex-wrap:wrap;align-items:center;gap:3px 6px;margin:0 0 4px;font-size:11.5px;color:var(--muted);max-width:900px}
.names-legend svg{width:14px;height:14px;vertical-align:-3px;flex:none}
.names-cell{display:flex;flex-direction:column;gap:3px}.names-cell-title{display:none}
.names-cell-body{display:flex;align-items:center;gap:6px}
.names-cell-edit{position:relative;flex:1;min-width:0}
.names-cell input{width:100%;border:1px solid #d7ded3;border-radius:9px;padding:9px 10px;background:#fff;color:var(--ink);font-size:14px}.names-cell input::placeholder{color:#a3aba0}
.names-row.role-elder .names-cell input{font-size:16px;font-weight:600}
.names-cell.self{text-align:center;color:#b6bdb2;display:block}
/* Under the input, never over the name: the default name stays fully readable. */
.names-cell-hint{display:flex;align-items:center;gap:4px;margin:3px 0 0 2px;pointer-events:none;color:#9aa39a}
.names-cell-hint[hidden]{display:none}
.names-cell-hint svg{width:13px;height:13px}
.names-default-tag{font-size:10px;line-height:1.6;background:#eef1eb;border-radius:6px;padding:1px 5px;color:#7b857c;white-space:nowrap}
.contact-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid #d7ded3;border-radius:8px;background:#fff;color:#6c7a6d;cursor:pointer;padding:0}
.contact-toggle svg{width:15px;height:15px}
.contact-toggle[aria-pressed="false"]{color:var(--danger);border-color:#e3b8ab;background:#fbefeb}
.names-cell-hidden-note{display:none;font-size:11px;color:var(--danger)}
.names-cell.hidden-contact .names-cell-title,.names-cell.hidden-contact .names-cell-edit{opacity:.5;text-decoration:line-through}
.names-cell.hidden-contact .names-cell-edit{display:none}
.names-cell.hidden-contact .names-cell-hidden-note{display:inline;text-decoration:none}
.names-cell.saving .names-cell-edit input{border-color:#ddb35d}.names-cell.saved .names-cell-edit input{border-color:#7fb08a}.names-cell.saved .names-cell-edit::after{content:'✓';position:absolute;right:9px;top:50%;transform:translateY(-50%);color:#4f9a5c;font-size:13px}.names-cell.error .names-cell-edit input{border-color:var(--danger);background:#fbefeb}
.names-preview{grid-column:1/-1;padding:4px 4px 6px calc(var(--first) + 6px)}
/* Tile preview = a small tablet, 1024×768 scaled to 320×240: 22 px rails, the home line, tiles 2 per row in 2 or 3 rows (as .tiles on the tablet). */
.tablet-mini{display:flex;width:332px;max-width:100%;height:auto;aspect-ratio:332/252;border:6px solid #1d2420;border-radius:12px;background:#f4f2ec;box-sizing:border-box;overflow:hidden;flex:none;min-width:0}
.tablet-mini .mini-rail{width:22px;flex:none;margin:3px;border-radius:9px;background:#2a231c}
.mini-screen{flex:1;min-width:0;display:flex;flex-direction:column}
.mini-head{font-family:Georgia,serif;font-size:12px;color:#3f5a37;padding:5px 8px;border-bottom:1px solid #e1e5dc;background:#fffef9;flex:none}
.tiles-preview{flex:1;min-height:0;display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);gap:5px;padding:5px;background:#eef2e6}.tiles-preview[data-grid="6"]{grid-template-rows:repeat(3,1fr);gap:4px;padding:4px}.tiles-preview.loading{font-size:12px;color:var(--muted);width:auto;display:block}
.mini-tile{display:flex;align-items:center;justify-content:center;background:var(--paper);border:1px solid #cfd8c4;border-radius:6px;padding:2px 4px;min-width:0;min-height:0}.mini-tile-name{font-family:Georgia,serif;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tiles-preview[data-grid="6"] .mini-tile-name{font-size:13px}.mini-tile.empty{background:transparent;border-style:dashed;color:#9aa596;font-size:11px}
.elder-screen{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:16px 18px;margin-bottom:14px}.elder-screen-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.elder-screen-body{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}.elder-screen-body>div:first-child{flex:1 1 300px;min-width:0}.elder-screen-body>*{min-width:0;max-width:100%}.elder-screen .field select{width:100%}
.admin-table{width:100%;border-collapse:collapse;font-size:13px;background:var(--paper);border:1px solid var(--line);border-radius:12px;overflow:hidden}.admin-table th,.admin-table td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line)}.admin-table th{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);background:#f3f4ed}.admin-table .tag{margin-left:6px}
.placeholder{border:1px dashed #c8d1c1;border-radius:14px;padding:18px;margin-top:16px;background:#fbfbf6}.placeholder p{font-size:13px;color:var(--muted);margin:6px 0 10px;max-width:680px}
.message-log{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.message-log li{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:10px 14px}.message-log li.deleted{opacity:.6}.message-log-head{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap;font-size:13px}.message-log-head small{margin-left:auto}.message-log p{font-size:14px;margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.requests-box{background:#fcf6e6;border:1px solid #e9dbb7;border-radius:12px;padding:12px 16px;margin-bottom:14px}.requests-box p{font-size:13px}
.rules-form{max-width:760px}.rules-form fieldset{border:1px solid var(--line);border-radius:14px;padding:12px 16px 14px;margin:0 0 14px;background:var(--paper)}.rules-form legend{font-weight:650;font-size:14px;padding:0 6px}
.choice{display:flex;gap:10px;align-items:flex-start;padding:10px 4px;border-bottom:1px solid var(--line);cursor:pointer}.choice:last-of-type{border-bottom:0}.choice input{margin-top:3px;width:18px;height:18px;accent-color:var(--green);flex:none}.choice strong{display:block;font-size:14px}.choice small{display:block;color:var(--muted);font-size:12px;line-height:1.5;margin-top:3px}
.trusted-box{margin-top:8px!important;background:#f4f7ee!important}.quiet-times{display:flex;gap:12px}.quiet-times .field{margin:6px 0}.rules-form .modal-footer{align-items:center;justify-content:space-between}.rules-form .field input{max-width:280px}.rules-form fieldset>small.helper{display:block;margin-top:8px}.rules-form fieldset>select{min-width:220px}
.system-facts{display:grid;grid-template-columns:max-content 1fr;gap:10px 20px;font-size:14px}.system-facts dt{color:var(--muted)}.system-facts dd{margin:0}
@media(max-width:900px){
  .admin-layout{grid-template-rows:auto 1fr}.admin-layout .sidebar{gap:14px;overflow-x:auto}.admin-nav{flex-direction:row;margin-left:auto}.admin-nav .side-nav{padding:9px 10px;margin:0;white-space:nowrap}
  .admin-main{padding:22px 16px}
  .family-grid{grid-template-columns:1fr;gap:14px}
  .family-tabs{flex-direction:row;overflow-x:auto;position:static;padding-bottom:4px;scrollbar-width:thin;margin:0 -16px;padding-left:16px;padding-right:16px}.family-tabs a{white-space:nowrap;border:1px solid var(--line);background:#fff;padding:8px 12px;font-size:13px}
  .person-card,.person-list.global .person-card{grid-template-columns:1fr}.person-list:not(.global) .person-main,.person-list:not(.global) .person-role{grid-row:auto}.person-list:not(.global) .person-tools{grid-column:auto}
  .elder-screen-body{flex-direction:column}
}
@media(max-width:760px){
  .admin-layout .sidebar{padding:10px 12px;gap:8px}.admin-layout .brand{font-size:0;gap:0}.admin-nav{gap:2px}.admin-nav .side-nav svg{display:none}.admin-nav .side-nav{font-size:13px;padding:8px 9px}
  .family-title h1{font-size:30px}.admin-section h2{font-size:26px}
  .family-top .button{min-height:38px;font-size:12px}
  /* Names on a phone: each row «Как видит …» opens into one field per person. */
  .names-scroll{overflow:visible}.names-matrix{min-width:0}.names-head{display:none}
  .names-row{display:block;padding:0}.names-viewer{width:100%;padding:12px;cursor:pointer}.names-viewer::after{content:'▾';margin-left:auto;color:var(--muted);transition:transform .15s}.names-row.open .names-viewer::after{transform:rotate(180deg)}
  .names-cells{display:none}.names-row.open .names-cells{display:flex;flex-direction:column;gap:10px;padding:0 12px 12px}
  .names-cell-title{display:flex;justify-content:space-between;font-size:13px;font-weight:600;margin-bottom:5px}.names-cell-title small{color:var(--muted);font-weight:400}
  .names-cell.self{display:none}
  .names-preview{display:none;padding:0 12px 12px}.names-row.open .names-preview{display:block}

  .person-fields{grid-template-columns:1fr}
  .admin-table{font-size:12px}.admin-table th,.admin-table td{padding:8px}
}
.push-offer{margin:10px 16px 0;padding:14px 16px;border:1px solid #cfe0c3;background:#eef5e6;border-radius:14px;display:flex;flex-direction:column;gap:6px;flex:none}.push-offer strong{font-size:14px;color:var(--ink)}.push-offer p{font-size:12px;line-height:1.5;color:#52614a}.push-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}.push-actions .button{min-height:44px;font-size:13px}
/* Админка → Устройства (admin.js devicesPage). */
.device-family{margin:18px 0}.device-family-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}.device-family-head h2{font-size:24px;flex:1;min-width:160px}
/* Brightness and volume rails drawn by the elder's kiosk page (rails.js, §8): 72 px each side, in the top layer. */
html.web-rails body,html.kiosk.web-rails .chat-page{padding:0 72px}
.web-rails-layer{position:fixed;inset:0;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;overflow:visible;pointer-events:none;z-index:2147483000;display:block;color:#fff}
/* The SVG is redrawn on every move; the touch must start on a node that stays (the rail),
   or Chrome WebView sends the rest of the touch to a detached node and takes the gesture (tablet, 23.09). */
.web-rail svg,.web-rail .rail-art{pointer-events:none}
.web-rail{position:fixed;top:0;bottom:0;width:72px;padding:8px;background:#f4f2ec;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;outline:none;cursor:pointer}
.web-rail.left{left:0}.web-rail.right{right:0}
.web-rail .rail-track{width:56px;height:100%}.web-rail svg.rail-art{display:block;width:56px;height:100%}
.rail-label{animation:rail-blink .5s ease-in-out infinite alternate}@keyframes rail-blink{to{opacity:.55}}
.rail-badge{position:fixed;height:96px;display:flex;align-items:center;gap:12px;padding:0 20px;border-radius:24px;background:#2a231c;color:#fff;font-size:60px;font-weight:700;pointer-events:none;box-shadow:0 8px 30px #0005;white-space:nowrap}
.rail-badge.left{left:80px}.rail-badge.right{right:80px}.rail-badge.silent{font-size:44px}.rail-badge svg{width:56px;height:56px}
.rail-hint{position:fixed;left:50%;top:40%;transform:translate(-50%,-50%);background:#2a231cf2;color:#fff;font-size:40px;font-weight:700;padding:24px 36px;border-radius:24px;pointer-events:none;white-space:nowrap}
html.web-rails .chat-page.elder.big .video-call{width:calc(100vw - 144px);max-width:calc(100vw - 144px);margin:0 72px}
/* «Всё спокойно» → «Закрыть»: to the calm screen, large, on the right of the line. */
.button.to-calm{min-height:64px;font-size:22px;padding:10px 22px;border-radius:16px;background:#2e6b50;border:1px solid #2e6b50;color:#fdf8e8;margin-left:auto}.button.to-calm svg{width:28px;height:28px}
.chat-page.elder.big .button.to-calm{font-size:var(--big);min-height:80px;padding:8px 26px}.chat-page.elder.big .button.to-calm svg{width:40px;height:40px}
/* On the calm screen the rails' edges are green too; the family may hide them there (screen options). */
html.calm-on .web-rail{background:#6da85a}
html.calm-on.calm-no-rails .web-rails-layer>.web-rail,html.calm-on.calm-no-rails .web-rails-layer>.rail-badge{display:none}
/* The browser model's dim film on the calm screen (rails.js): over everything, rails too; touches go through. */
.calm-film{position:fixed;inset:0;background:#000;pointer-events:none}
.calm-option{display:flex;gap:10px;align-items:flex-start;margin:16px 0;font-size:13px;font-weight:600;line-height:1.5}.calm-option input{margin-top:3px;width:18px;height:18px;flex:none}
/* «Подключения» (connections.js): live clients and the connection journal. */
.conn-body{background:var(--paper);min-height:100vh}.conn-page{max-width:1180px;margin:0 auto;padding:28px 24px}.conn-page h1{margin-bottom:18px}
.connections{display:flex;flex-direction:column;gap:26px}.conn-section h2{font-size:20px;margin-bottom:6px}.conn-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.conn-status{font-size:12px}.conn-live td{vertical-align:top}.conn-live small{font-size:11px}.conn-live-tag{margin-left:6px;font-size:10px}
.conn-live tr.conn-warn td{background:#fbf3e4}.admin-table code,.conn-feed code{font-size:11px;background:#f1f2ec;padding:1px 5px;border-radius:4px;white-space:nowrap}
.conn-filters{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 10px}.conn-filters input:not([type=checkbox]),.conn-filters select{min-width:160px}.conn-pings{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.conn-feed{list-style:none;margin:0;padding:0;max-height:60vh;overflow-y:auto;border:1px solid var(--line);border-radius:10px}
.conn-event{display:flex;gap:10px;flex-wrap:wrap;align-items:baseline;padding:7px 12px;border-bottom:1px solid var(--line);font-size:13px}
.conn-event time{font-variant-numeric:tabular-nums;color:var(--muted);min-width:64px}.conn-event.bad strong{color:var(--danger)}.conn-event.good strong{color:#4f7a45}
.elder-screen-state{display:block;color:#4f7a45}.elder-screen-state.off{color:#9a6a33}
/* Georgia draws old-style figures (1 and 2 below 8): the elder's clocks, dates and times use lining, even-width digits. */
.chat-page.elder,.calm,.calm-clock,.calm-date,.today-strip,.home-head,.tile-status,.day-event,.request-hint,.rail-badge{font-variant-numeric:lining-nums tabular-nums}
/* Person card (connections.js personCard): devices, the link, sessions of a day with their story. */
.conn-tabs{display:flex;gap:6px;margin:-6px 0 18px}.conn-tabs a{padding:7px 14px;border-radius:999px;border:1px solid var(--line);color:var(--muted);text-decoration:none;font-size:13px}.conn-tabs a.active{background:#e6efdf;color:var(--ink);border-color:#cfe0c6}
.person-picker{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.person-pick{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--line);border-radius:10px;text-decoration:none;color:var(--ink);font-size:13px;background:var(--paper)}.person-pick.active{border-color:#8fb57f;background:#eef5e8}
.person-card-view{display:flex;flex-direction:column;gap:22px}.person-card-view h3{font-size:16px;margin-bottom:4px}
.person-links{display:flex;flex-direction:column;gap:8px}.person-link{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.session-day{font-size:13px;color:var(--muted);display:flex;gap:6px;align-items:center}
.session-list{display:flex;flex-direction:column;gap:6px}
.session{border:1px solid var(--line);border-radius:10px;background:var(--paper)}.session.online{border-color:#bcd5b0}
.session summary{display:flex;gap:10px;flex-wrap:wrap;align-items:baseline;padding:9px 12px;cursor:pointer;font-size:13px}
.session summary time{font-variant-numeric:tabular-nums;color:var(--muted)}.session-state{display:inline-flex;gap:5px;align-items:center;color:var(--muted)}.session-state.on{color:#4f7a45}
.session-story{list-style:none;margin:0;padding:4px 14px 8px 14px;border-top:1px solid var(--line)}.session-story li{display:flex;gap:12px;padding:3px 0;font-size:13px}
.session-story time{font-variant-numeric:tabular-nums;color:var(--muted);min-width:64px}
.story-lost span{color:var(--danger)}.story-back span{color:#4f7a45}.story-open span,.story-closed span{font-weight:600}.story-reload span{color:#8a6a2c}.story-admin span{color:#6b4c8a}.story-view span{color:var(--muted)}
.session-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:0 14px 12px}
.conn-feed-title{font-size:20px;margin:6px 0 -14px}
.modal.names-dialog{width:min(1100px,calc(100vw - 28px))}.modal.rules-dialog{width:min(720px,calc(100vw - 28px))}
/* Settings apply status (applied.js): saved → sent → applied on the tablet at 14:02:11. */
.apply-status{display:flex;flex-direction:column;gap:3px;margin-top:10px;font-size:12px;color:var(--muted)}
.apply-line{display:flex;align-items:center;gap:6px}.apply-line.done{color:#4f7a45}.apply-line.done .dot{background:#4f9a5c}
.apply-line.sent .dot{background:#ddb35d}.apply-line.waiting{color:#9a6a33}.apply-line.waiting .dot{background:#c7704f}
.names-applied{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap;margin:0 0 10px;font-size:12px}.names-applied .apply-status{margin:0}
.new-link-modal .copy-link{width:100%;font-size:12px}.link-qr{display:flex;justify-content:center;margin:12px 0}.link-qr svg{width:220px;height:220px}
/* The calm screen's sound sign (calm-sound): large, still, never blinking; the family may hide it. The rails' «Тихо» stops blinking here too. */
.calm-sound{display:flex;align-items:center;gap:18px;font-family:Georgia,'Times New Roman',serif;font-size:48px;color:#1e3a12;background:#ffffff55;border-radius:28px;padding:10px 28px}
.calm-sound[data-state=normal]{background:transparent;opacity:.55;padding:0}
.calm-sound svg{width:72px;height:72px;flex:none}
html.calm-no-sound .calm-sound{display:none}
html.calm-on .rail-label{animation:none}
.calm-options .calm-option{margin:10px 0}
/* The calm screen is one screen: without rails no side columns at all (no padding), and whatever might peek through is the calm colour. */
html.calm-on.calm-no-rails body,html.calm-on.calm-no-rails.kiosk .chat-page{padding:0}
html.calm-on,html.calm-on body{background:#b8dfa7}
/* «Приложение для телефона»: QR на скачивание и шаги установки. */
.app-download{display:grid;grid-template-columns:168px minmax(0,1fr);gap:20px;align-items:start;margin:18px 0 8px;padding:18px;border-radius:16px;background:#eef5e6;border:1px solid #cfe0c3}
.app-download .qr{width:168px}.app-download .qr svg{width:100%;height:auto;display:block;background:#fff;border-radius:10px}
.app-download h2{font-size:24px;margin-bottom:6px}.app-download p{font-size:14px;color:#44563f;margin-bottom:10px}
.app-steps{margin:0 0 12px;padding-left:20px;font-size:14px;line-height:1.55;color:var(--ink)}.app-steps li{margin:4px 0}
.app-download .helper{display:block;margin-top:8px}
@media (max-width:600px){.app-download{grid-template-columns:1fr;padding:14px}.app-download .qr{width:150px;margin:auto}}
/* Chat «Кто в семье»: own devices, and the admin's way to «Управление семьёй». */
.family-manage{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 14px}
.my-devices{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}.my-devices h3{font-size:18px;margin-bottom:4px}
.my-devices .add-row{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.my-devices .app-download{grid-template-columns:132px minmax(0,1fr);gap:14px;padding:14px}.my-devices .app-download .qr{width:132px}.my-devices .app-download h2{font-size:19px}
@media (max-width:600px){.my-devices .app-download{grid-template-columns:1fr}.my-devices .app-download .qr{width:140px;margin:auto}}
.own-code{display:grid;grid-template-columns:200px minmax(0,1fr);gap:18px;align-items:center}.own-code .qr svg{width:100%;height:auto;display:block;background:#fff;border-radius:8px}
.own-code .code-digits{font-size:30px;font-weight:700;letter-spacing:.12em;font-variant-numeric:tabular-nums;margin-bottom:6px}.own-code small{display:block;margin-bottom:10px}
@media (max-width:560px){.own-code{grid-template-columns:1fr}.own-code .qr{width:200px;margin:auto}}
.family-name{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.person-link .tag.warn{white-space:normal}
/* The call's own screen before dialling (lobby) and devices in a call — relatives only, never the tablet. */
.call-lobby{width:min(640px,calc(100vw - 20px));padding:18px}
.lobby-preview{position:relative;background:#183c2f;border-radius:14px;overflow:hidden}
.call-local.lobby-video{max-height:min(48dvh,420px);width:100%;aspect-ratio:4/3;object-fit:cover;background:#183c2f}
.mic-level{height:8px;border-radius:4px;background:#ffffff40;overflow:hidden}.mic-level .level-bar{display:block;height:100%;width:0;background:#7ed957;transition:width .08s}
.lobby-preview .mic-level{position:absolute;left:14px;right:14px;bottom:12px}
.lobby-note{font-size:14px;margin:10px 0 4px;color:var(--ink)}
.lobby-people .call-person:last-of-type{border-bottom:0}.lobby-people .helper{font-size:12px;color:var(--muted);margin:4px 0 0}
.call-lobby .call-controls{margin-top:8px}
.speaker-choice{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin:4px 0 8px}.speaker-choice .field{flex:1 1 200px;margin:0}.speaker-choice .test-sound{min-height:44px;font-size:13px}
.call-self.camera-off .call-local{visibility:hidden;min-height:72px}
.call-self.camera-off::after{content:'Камера выключена';position:absolute;inset:0 0 24px;display:grid;place-items:center;color:#fff;font-size:12px;text-align:center;padding:4px}
.call-controls .button.off{background:#f3e3df;color:#8a2c1f;border-color:#e3c3bb}
.call-devices{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:12px 0;display:grid;gap:10px}.call-devices .field{margin:0}.call-devices select{width:100%;min-width:0}.call-devices .mic-level{background:#dfe6d6}
@media (max-width:480px){.call-lobby{padding:14px}.call-local.lobby-video{aspect-ratio:3/4;max-height:44dvh}.call-controls .button{min-width:0;flex:1 1 40%}}
@media (min-width:900px){.call-lobby{width:min(980px,calc(100vw - 40px))}.lobby-body{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:24px;align-items:start}.lobby-side .media-source-picker{margin-top:12px}.call-lobby>.call-controls{justify-content:flex-start}.call-lobby>.call-controls .button{flex:0 0 auto}}

/* Имя без анкеты (23.09): имя, карандаш рядом; фамилия и отчество — по желанию. */
.name-line{display:inline-flex;align-items:center;gap:4px;max-width:100%;min-width:0}.name-line strong{overflow-wrap:anywhere}
.name-line .name-edit{width:30px;height:30px;min-height:30px;padding:6px;flex:none;color:#8b9486;border-color:transparent;background:transparent}.name-line .name-edit:hover,.name-line .name-edit:focus-visible{color:var(--ink);background:#f0f2ea}
.person-fields .more-names{align-self:flex-start;min-height:32px;font-size:12px;margin:0 0 6px}.name-more{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
@media (max-width:520px){.name-more{grid-template-columns:1fr}}
/* Сохраняется само: «Сохраняем…» → «Сохранено». */
.save-state{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--muted)}.save-state svg{width:14px;height:14px}.save-state[data-state=saved]{color:#4f7a45}.save-state[data-state=failed]{color:var(--danger)}
.rules-status{position:sticky;bottom:0;z-index:2;margin-top:14px;padding:10px 0;min-height:40px;background:linear-gradient(transparent,var(--paper) 35%)}.rules-status .save-state:empty{display:none}.rules-status .save-state{background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:6px 12px}
/* «Просит перезвонить»: позвонить сразу или тихо отметить звонок по телефону. */
.request-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:6px}.call-request .request-actions .button.primary{background:var(--green);color:white}
.message .request-actions{justify-content:flex-end}.request-actions .button{min-height:34px;font-size:11px}
/* «Обо мне» (about-me.js): own avatar and «Вы — …» in the header open it; avatar palette tone-0…tone-7. */
.tone-5{background:#e9d9ea;color:#6e4d72}.tone-6{background:#d6e9e6;color:#39675f}.tone-7{background:#f1e2b8;color:#735f22}
.avatar.emoji{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:20px;line-height:1}.avatar.emoji.large{font-size:30px}
.me-button{border:0;background:transparent;padding:0;border-radius:50%;flex:none;display:inline-flex}.me-button:hover .avatar{box-shadow:0 0 0 3px #dfe8d4}
.me-line{border:0;background:transparent;padding:0;margin-top:4px;font-size:11px;line-height:1.4;color:var(--muted);text-align:left;display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.me-line:hover{color:var(--ink);text-decoration:underline}
.organizer-link{min-height:34px;padding:6px 10px;font-size:12px;flex:none}
.family-mine{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.about-modal{width:min(560px,calc(100vw - 28px))}
.about-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}.about-who{min-width:0}.about-who small{color:var(--muted);font-size:12px}
.about-name-row{display:flex;align-items:center;gap:2px}.about-name{font-size:20px;overflow-wrap:anywhere}
.about-organizer{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:12px 14px;border-radius:12px;background:#eef3e7;margin-bottom:14px}.about-organizer .helper{flex:1;min-width:180px}
.about-avatar{padding-top:14px;border-top:1px solid var(--line)}.about-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.about-avatar h3{font-size:18px}
.avatar-tones,.avatar-signs{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.avatar-choice{border:2px solid transparent;background:transparent;border-radius:50%;padding:2px;display:inline-flex;flex-direction:column;align-items:center;gap:2px}.avatar-choice.letter{border-radius:14px}.avatar-choice small{font-size:10px;color:var(--muted)}
.avatar-choice.chosen{border-color:var(--green,#2f6f4f)}.avatar-choice:hover{background:#f1f4ed}
.avatar-choice .avatar{width:36px;height:36px;font-size:17px}.avatar-choice .avatar.emoji{font-size:19px}
.conversation-chip .avatar{width:24px;height:24px;font-size:12px;margin-left:-6px}.conversation-chip .avatar.emoji{font-size:14px}
.elder .conversation-chip .avatar{width:34px;height:34px;font-size:17px}
@media(max-width:520px){.me-line{font-size:12px}.organizer-link{padding:6px 8px}.avatar-choice .avatar{width:34px;height:34px}}
/* «Приложение на телефон» row under the chat header and its window (about-me.js). */
.phone-offer{display:flex;align-items:center;gap:4px;margin:10px 16px 0;padding:4px 6px 4px 4px;border:1px solid #bcd8b0;background:#e6f2dc;border-radius:14px;flex:none}
.phone-offer-open{flex:1;min-width:0;display:flex;align-items:center;gap:12px;border:0;background:transparent;padding:10px 10px;text-align:left;color:var(--ink);border-radius:10px}.phone-offer-open:hover{background:#d9ebcc}
.phone-offer-open>svg:first-child{width:26px;height:26px;color:var(--green,#2f6f4f)}.phone-offer-open span{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.phone-offer-open strong{font-size:15px}.phone-offer-open small{font-size:12px;color:#52614a}
.phone-modal{width:min(640px,calc(100vw - 28px))}.phone-modal .app-download{grid-template-columns:150px minmax(0,1fr);gap:16px;padding:14px}.phone-modal .app-download .qr{width:150px}.phone-modal .app-download h2{font-size:20px}
.phone-sign-in{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.phone-sign-in h3{font-size:18px;margin-bottom:4px}.phone-sign-in .own-code{margin-top:10px}
@media(max-width:560px){.phone-modal .app-download{grid-template-columns:1fr}.phone-modal .app-download .qr{width:150px;margin:auto}}

/* «Я уже установил» hides the phone-app offer for good: a red frame says so (owner, 23.09). */
.installed-button{border:2px solid var(--danger,#c14848)!important;color:var(--danger,#c14848)}
/* The download QR carries a day ticket (a longer link): bigger, so a phone reads it from the screen. */
.app-download{grid-template-columns:minmax(0,220px) minmax(0,1fr)}
.app-download .app-qr .qr{width:100%;max-width:220px}
.app-download .app-qr .qr svg{width:100%;height:auto;display:block}
@media (max-width:640px){.app-download{grid-template-columns:1fr}.app-download .app-qr .qr{max-width:240px;margin:auto}}
/* In the «Приложение на телефон» window: the QR big and on top, the steps below. */
.phone-modal .app-download{grid-template-columns:1fr}
.phone-modal .app-download .app-qr .qr{width:240px;max-width:100%;margin:0 auto}
/* Night check 24.09: call buttons always in sight on a phone; «Добавить» folded; the incoming call says who, large. */
.video-call:not(.simple-call) .call-controls{position:sticky;bottom:-20px;z-index:3;background:var(--paper);margin:0 -4px;padding:10px 4px 14px;box-shadow:0 -10px 14px -12px #1a302633}
.video-call:not(.simple-call) .invite-row{flex-wrap:wrap;align-items:center}.invite-list{display:flex;flex-wrap:wrap;gap:6px;width:100%}.invite-toggle{font-size:13px}
.incoming-card{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px 0 8px;text-align:center}
.incoming-card .avatar.large{width:96px;height:96px;font-size:46px}
.incoming-name{font-family:Georgia,'Times New Roman',serif;font-size:32px;font-weight:400;line-height:1.15;overflow-wrap:anywhere}
.incoming-what{font-size:17px;color:var(--muted)}
.video-call.incoming .call-status,.video-call.incoming .call-received{display:none}
.chat-page.elder.big .video-call.incoming .incoming-card{flex:1;justify-content:center;gap:18px;padding:0}
.chat-page.elder.big .video-call.incoming .incoming-card .avatar.large{width:200px;height:200px;font-size:110px}
.chat-page.elder.big .video-call.incoming .incoming-name{font-size:72px}
.chat-page.elder.big .video-call.incoming .incoming-what{font-size:var(--big);color:var(--ink)}
.chat-page.elder.big .video-call.incoming .call-videos{display:none}
@media (max-width:480px){.video-call{padding:14px}.video-call:not(.simple-call) .call-controls{bottom:-14px}.video-call .call-remote{max-height:42dvh}.video-call .modal-heading{margin-bottom:8px}.video-call .modal-heading h2{font-size:24px}}
.chat-page.elder.big .video-call.incoming .modal-heading h2{visibility:hidden}
/* Incoming call, the browser refused sound before a click (ring.js). */
.ring-unmute{display:block;width:100%;margin:12px 0 0;padding:14px 16px;border:2px solid #d9b45a;border-radius:12px;background:#fff6dc;color:#5d4715;font-size:16px;font-weight:650;text-align:center}.ring-unmute:hover{background:#ffefc2}
.mini-tile.cinema{background:#26303a;border-color:#26303a;color:#fff}

/* The tablet's call window is not modal (calls.js): pinned over the page
   between the rails, above everything but the rails' own top layer. */
.video-call.simple-call[open]:not(:modal){position:fixed;inset:0;z-index:2147482000}
