/* Правило продукта m8721: экран не прокручивается; длинные разделы разбиты на шаги. */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}.tape{height:var(--app-height,100dvh)}
.screen>.screen-content,.intro-screen>.screen-content{overflow:hidden!important;min-height:0;scroll-behavior:auto}
.screen.has-steps{grid-template-rows:calc(56px + env(safe-area-inset-top)) minmax(0,1fr) 60px calc(68px + env(safe-area-inset-bottom))}
[data-step-hidden]{display:none!important}.step-nav{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));background:var(--ground)}
.step-nav button{min-height:44px;min-width:44px;padding:8px 12px;font-size:14px}.step-nav .primary{line-height:20px}.step-count{font-size:13px;color:var(--muted);white-space:nowrap}.step-nav[hidden]{display:none!important}
button,a[href],input:not([type=file]),select,summary,[role=button]{min-height:44px;min-width:44px}button,a[href],input,textarea,small,.tab,.eyebrow,.status-badge,.text-button,.date-line,.helper-role,.subline,.status-text,.line-copy span,.demo-label,.demo-quota,.answer-time{font-size:max(13px,1em)}
.screen-content{gap:8px;padding:12px}.section-body{gap:12px}.section-filters{gap:8px}.filter-chip{font-size:13px;padding:8px 10px}.bottomnav .tab{font-size:13px;white-space:normal;line-height:17px;padding:4px 0}.topbar{gap:8px;padding-right:max(12px,env(safe-area-inset-right));padding-left:max(12px,env(safe-area-inset-left))}.context-link,.back-link{font-size:13px;padding:8px 12px}
.screen-content .intro-tools{margin-top:0}.section-body .more-link{min-height:64px}.intro-tour{margin:auto;width:min(390px,calc(100% - 24px));max-height:calc(var(--app-height,100dvh) - 24px);overflow:hidden;padding:12px;border-radius:20px}.intro-tour[open]{gap:8px}.intro-tour h2{font-size:24px}.intro-tour p{font-size:14px;line-height:20px}.intro-character{height:clamp(70px,calc(var(--app-height,100dvh) - 390px),210px);min-height:0;flex:0 1 auto}.intro-tour>.primary,.intro-tour>.text-button{min-height:44px;flex:none}
dialog:not(.intro-tour){overflow:hidden!important;max-height:calc(var(--app-height,100dvh) - 24px);padding:12px}dialog[open]:not(.intro-tour){display:flex!important;flex-direction:column;gap:0}.step-content{display:flex;flex-direction:column;gap:12px;overflow:hidden;min-height:0;max-height:calc(var(--app-height,100dvh) - 52px);flex:1 1 auto}dialog.has-steps .step-content{max-height:calc(var(--app-height,100dvh) - 112px)}dialog>.step-nav{padding:8px 0 0;flex:none}dialog .sheet-head{margin:0;position:static}.step-content h3{margin:0}.step-content .primary,.step-content .secondary{flex-shrink:0}
#chat .screen-content{overflow:hidden!important;gap:8px}#chat .conversation{overflow-y:auto;min-height:0;flex:1 1 auto!important;scroll-behavior:auto}#chat .chat-tools{flex:none}#chat .demo-quota{font-size:13px;line-height:18px}#chat .composer{min-height:56px;flex:none}#chat .attachment-pending{max-height:100px;overflow:hidden;flex:none}#chat .attachment-status{font-size:13px;line-height:18px;max-height:54px;overflow:hidden}#chat .suggestions button{font-size:13px;min-height:48px}#chat .chat-tools .text-button{font-size:13px}.assistant-welcome{font-size:14px}
@media(max-height:680px){.screen{grid-template-rows:calc(48px + env(safe-area-inset-top)) minmax(0,1fr) calc(60px + env(safe-area-inset-bottom))}.screen.has-steps{grid-template-rows:calc(48px + env(safe-area-inset-top)) minmax(0,1fr) 60px calc(60px + env(safe-area-inset-bottom))}#home{grid-template-rows:calc(48px + env(safe-area-inset-top)) minmax(0,1fr) auto calc(60px + env(safe-area-inset-bottom))}.bottomnav .tab{min-height:48px}.screen-content{padding-top:8px;padding-bottom:8px}.heading h1,.section-screen .heading h1{font-size:22px}#chat .role-button{min-height:52px}#chat .chat-tools{min-height:44px}.intro-tour h2{font-size:22px}.intro-character{height:clamp(70px,calc(var(--app-height,100dvh) - 420px),180px)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:0s!important;transition-duration:0s!important}}
/* Telegram: физические и внутренние отступы резервируются для всего пульта. */
:root{--domo-safe-top:max(env(safe-area-inset-top,0px),calc(var(--tg-safe-area-inset-top,0px) + var(--tg-content-safe-area-inset-top,0px)));--domo-safe-bottom:max(env(safe-area-inset-bottom,0px),calc(var(--tg-safe-area-inset-bottom,0px) + var(--tg-content-safe-area-inset-bottom,0px)));--domo-safe-left:max(env(safe-area-inset-left,0px),calc(var(--tg-safe-area-inset-left,0px) + var(--tg-content-safe-area-inset-left,0px)));--domo-safe-right:max(env(safe-area-inset-right,0px),calc(var(--tg-safe-area-inset-right,0px) + var(--tg-content-safe-area-inset-right,0px)));--domo-usable-height:calc(var(--app-height,100dvh) - var(--domo-safe-top) - var(--domo-safe-bottom))}
.screen,#home{height:var(--app-height,100dvh);min-height:0;padding:var(--domo-safe-top) var(--domo-safe-right) var(--domo-safe-bottom) var(--domo-safe-left);grid-template-rows:48px minmax(0,1fr) 64px}
.screen.has-steps{grid-template-rows:48px minmax(0,1fr) 60px 64px}
#home{grid-template-rows:48px minmax(0,1fr) auto 64px;--hero-height:clamp(44px,calc(var(--domo-usable-height) - 475px),350px)}
#home .home-action{background:var(--ground);padding:12px;position:relative;z-index:1;box-shadow:none}
.bottomnav{padding:4px 8px 6px;gap:0}.bottomnav .tab{font-size:13px;line-height:17px;min-height:44px;min-width:44px;letter-spacing:-.4px}.tab-symbol{font-size:22px;line-height:24px;height:24px}
.legacy-chat{display:none!important}.telegram-content{justify-content:center;gap:16px}.telegram-content h1,.telegram-content p{margin:0}.telegram-content h1{font-size:24px}
dialog{inset:var(--domo-safe-top) var(--domo-safe-right) var(--domo-safe-bottom) var(--domo-safe-left)}
dialog:not(.intro-tour),.intro-tour{max-height:calc(var(--domo-usable-height) - 24px)}
.step-content{max-height:calc(var(--domo-usable-height) - 52px)}dialog.has-steps .step-content{max-height:calc(var(--domo-usable-height) - 112px)}
.intro-character{height:clamp(60px,calc(var(--domo-usable-height) - 420px),210px)}
.compact-height #home{--hero-height:64px}.compact-height #home .heading{display:none}
#home .home-action{display:flex;align-items:center;gap:8px}#home .home-action>.primary{flex:1;min-width:0;width:auto}#home .home-action .intro-card{position:static;flex:none;width:44px;margin:0}.bottomnav .tab{white-space:nowrap}
/* Зоны соседних персонажей не перекрываются; рисунки сохраняют прежний размер. */
.hero-button{left:28px;width:120px}.hero-button .pose-stack{left:-28px;width:176px}
