/* v90: one visual language, without changing routes or presence. */
:root{--portal-phone-width:480px;--portal-card-width:360px;--portal-card-height:660px}
body a[href],body button{border-radius:12px!important;box-sizing:border-box;overflow-wrap:anywhere}
body a[href]{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 12px;min-height:44px;max-width:100%;border:1px solid #b4d0f5;background:#e8f2ff;color:#0646a6;text-decoration:none;line-height:1.35;font-weight:650}
body a[href]:hover{filter:brightness(.97)}
body :is(a,button):focus-visible{outline:3px solid #b90056;outline-offset:3px}
body a[href*="appointments"],body a[href*="reception"],body .offline,body .busy,body [data-ui-tone="wait"]{background:#fff4aa!important;color:#634900!important;border-color:#dcc66b!important}
body a[href*="message"],body a[href*="contactCabinet"],body a[href*="inbox"]{background:#fce5ef;color:#a30049;border-color:#edb3cc}
body a[href*="online"],body .online,body [data-ui-tone="online"]{background:#dcf7df!important;color:#14532d!important;border-color:#86c99a!important}
body a[href*="status=offline"],body .presence.offline,body .presence.busy{background:#fff4aa!important;color:#634900!important;border-color:#dcc66b!important}
body [data-ui-tone="end"],body [data-action="end"],body [data-action="cancel"],body [data-action="decline"],body #hangup,body #reject,body .portal-call-stop{background:#c62842!important;color:white!important;border:1px solid #a41d34!important}
body a.portal-brand{background:transparent;border-color:transparent;padding:0}
body a:has(>img:only-child){padding:4px}
body a[hidden],body button[hidden]{display:none!important}
body :is(a,button)[aria-disabled="true"],body button:disabled{opacity:.55}
body :is(.grid,.publications-grid):has(>.business-card),body :is(.grid,.publications-grid):has(>.publication-card),body .grid:has(>.demo-phone){grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--portal-card-width)),var(--portal-card-width)))!important;justify-content:center;align-items:start;gap:24px}
body :is(.business-card,.publication-card,.demo-phone){width:min(100%,var(--portal-card-width))!important;max-width:var(--portal-card-width)!important;height:var(--portal-card-height)!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-width:thin;border-radius:30px!important;margin-inline:auto;box-sizing:border-box}
body.phone-page main.phone-shell{max-width:var(--portal-phone-width)!important;height:min(820px,calc(100dvh - 48px));min-height:0}
body .phone-pane :is(.business-card,.publication-card){width:100%!important;max-width:none!important}
body .phone-tabs button{padding-inline:2px!important}
.portal-call-dialog{width:min(480px,calc(100% - 24px));max-height:85dvh;overflow:auto;border:2px solid #b8d7f4;border-radius:24px;padding:22px;background:#fffef4;color:#123b62}
.portal-call-dialog::backdrop{background:#06315a88}.portal-call-dialog button,.portal-call-dialog a{margin:6px 0;min-height:44px;padding:10px 14px}.portal-call-dialog article{border-top:1px solid #bed5ee;padding:12px 0}
@media(max-width:650px){body.phone-page main.phone-shell{max-width:none!important;height:100dvh;min-height:0}body a[href]{max-width:100%}}
@media(prefers-reduced-motion:reduce){body a,body button{transition:none!important}}
html body .business-card .card-actions>a.offline,html body .business-card .card-actions>a.busy,html body .publication-card>.actions>a.offline,html body .publication-card>.actions>a.busy,.polished .online-entry a.button[href*="status=offline"]{background:#fff4aa!important;color:#634900!important;border-color:#dcc66b!important}
html body a[data-page-unready],html body .portal-unready-note{background:#ffe7e7!important;color:#96283c!important;border:1px solid #efb3bb!important}
html body a[data-page-unready]::after{content:'Ще не готово';font-size:11px;display:inline-block;padding:3px 6px;border-radius:7px;background:#fff6f6;white-space:normal}
