/* Entry alone scrolls above the canonical fixed Kaeris dock. Load after application.css. */
/* Dock clearance (CCC miniapp-access-gate-dock-clearance, 7 Oct 2026; owner capture: Mac Telegram 420×715 with a
 * ~655px webview). The canonical dock (sanctuary.css, read-only here) is 7px + a 70px rail + max(8px, bottom safe area)
 * and grows with enlarged text; Telegram may report its own insets through its SDK variables. The clearance is the
 * largest of those plus a breathing gap, so a focused or scrolled-to control never rests under the rail. */
:root { --entry-dock-clearance:max(8.5rem,calc(124px + env(safe-area-inset-bottom,0px)),calc(124px + var(--tg-safe-area-inset-bottom,0px) + var(--tg-content-safe-area-inset-bottom,0px))); }
.application-entry-host {
 height:100svh;
 height:100dvh;
 min-height:0;
 overflow-y:auto;
 overscroll-behavior-y:contain;
 padding-bottom:var(--entry-dock-clearance);
 scroll-padding-block:20px var(--entry-dock-clearance);
}
.application-entry-host .application-entry { min-height:100%; }
.application-entry-host :is(input,button,a) { scroll-margin-block:12px; }
/* The legal gate (and any notice page) is rendered into the document scroller, not the entry host: give that scroller
 * the same reveal margin so focus and scrollIntoView keep its Accept/Sign out controls above the rail. */
html:has(body > main.application-app > .application-notice) { scroll-padding-block:20px var(--entry-dock-clearance); }
main.application-app:has(> .application-notice) { padding-bottom:max(110px,7.5rem,var(--entry-dock-clearance)); }
main.application-app > .application-notice :is(input,button,a) { scroll-margin-block:12px; }
/* Short webviews (a desktop Telegram window, a phone with the keyboard open): the identity mark yields height so the
 * invitation, Continue and Check existing session sit above the dock at rest instead of only after a scroll. */
@media (max-height:820px) {
 :is(.application-entry-host,main.application-app) > .application-entry { padding-top:16px; }
 :is(.application-entry-host,main.application-app) > .application-entry .application-entry__identity { margin-bottom:14px; }
 :is(.application-entry-host,main.application-app) > .application-entry .application-entry__sigil { height:64px; margin-bottom:4px; }
 :is(.application-entry-host,main.application-app) > .application-entry .application-entry__sigil.is-motif { height:52px; width:52px; }
 :is(.application-entry-host,main.application-app) > .application-entry .application-entry__wordmark { width:min(180px,52vw); margin:6px auto 10px; }
 :is(.application-entry-host,main.application-app) > .application-entry .application-entry__copy { padding-block:26px; }
 :is(.application-entry-host,main.application-app) > .application-entry .application-entry__notice { margin-bottom:18px; }
}
@media (max-height:560px) {
 :is(.application-entry-host,main.application-app) > .application-entry .application-entry__sigil { display:none; }
 :is(.application-entry-host,main.application-app) > .application-entry .application-entry__wordmark { width:min(140px,40vw); margin-top:0; }
}
