.helper-carousel{position:relative;margin:0 -20px}
.carousel-stage{position:relative;height:326px;overflow:hidden;touch-action:pan-y;user-select:none;isolation:isolate;outline-offset:-4px}
.helper-slide{position:absolute;left:calc(50% - 88px);top:24px;width:176px;height:302px;padding:0;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;background:transparent;border:0;border-radius:0;box-shadow:none;transform-origin:center 72%;will-change:transform;touch-action:pan-y;overflow:visible}
.helper-slide:focus-visible{outline:2px solid var(--accent);outline-offset:0;border-radius:16px}
.character-rig{position:relative;width:176px;height:260px;display:block;flex:none;pointer-events:none;transform-origin:50% 92%}
.helper-character{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;transform-origin:50% 92%}
.helper-name{font-size:21px;line-height:26px;letter-spacing:-.4px;font-weight:650}
.helper-role{font-size:12px;line-height:18px;font-weight:450;color:var(--muted)}
.helper-slide:not(.is-center) .helper-name{font-size:18px}
.helper-slide.is-center .character-rig{animation:companion-breathe 4.8s ease-in-out infinite}
.helper-slide.is-nodding .helper-character{animation:companion-nod 760ms ease-in-out}
.helper-slide.is-greeting .character-rig{animation:companion-wave 720ms ease-in-out}
.greeting-bubble{position:relative;z-index:20;max-width:calc(100% - 40px);width:max-content;min-height:70px;margin:0 auto 12px;display:flex;align-items:center;padding:8px 12px;border:0;border-radius:14px 14px 14px 4px;background:var(--surface);box-shadow:0 4px 18px #234e4210;color:var(--accent);font-size:12px;line-height:18px;pointer-events:none}
/* Место приветствия сохраняется после анимации: персонажи не подпрыгивают. */
.greeting-bubble[hidden]{display:flex!important;visibility:hidden}
.carousel-pagination{height:44px;display:flex;align-items:center;justify-content:center;gap:0}
.carousel-dot{border:0;display:grid;place-items:center;width:44px;height:44px;min-width:44px;padding:8px 12px;background:transparent}
.carousel-dot span{height:5px;width:5px;border-radius:8px;background:#c3cfcb;transition:width .2s ease,background .2s ease}
.carousel-dot[aria-pressed=true] span{width:18px;background:var(--accent)}
@keyframes companion-breathe{0%,100%{transform:translateY(0) rotate(-.4deg) scale(1)}50%{transform:translateY(-3px) rotate(.4deg) scale(1.009)}}
@keyframes companion-nod{0%,100%{transform:rotate(0)}40%{transform:rotate(2deg) translateY(2px)}70%{transform:rotate(-1deg)}}
@keyframes companion-wave{0%,100%{transform:rotate(0)}25%{transform:rotate(-2deg) translateY(-3px)}65%{transform:rotate(1.5deg)}}
@media(prefers-reduced-motion:reduce){.helper-character,.character-rig{animation:none!important;transform:none!important}.helper-slide{will-change:auto}.carousel-dot span{transition:none}}
/* Кнопка — отдельная строка над меню; прокручивается только содержимое. */
#home{grid-template-rows:calc(56px + env(safe-area-inset-top)) minmax(0,1fr) auto calc(68px + env(safe-area-inset-bottom));--home-character-height:clamp(126px,calc(var(--app-height,100dvh) - 480px),234px)}
#home .screen-content{min-height:0;gap:12px;padding:12px max(20px,env(safe-area-inset-right)) 12px max(20px,env(safe-area-inset-left));overflow-y:auto;scroll-padding-block:12px;-webkit-overflow-scrolling:touch}
/* Сплошная полоса скрывает край прокручиваемых карточек над кнопкой. */
#home .home-action{position:relative;z-index:1;padding:48px max(20px,env(safe-area-inset-right)) 12px max(20px,env(safe-area-inset-left));background:var(--ground);box-shadow:none}
#home .home-action .primary{min-height:48px;padding:8px 12px}
#home .helper-carousel{margin:0 -20px;background:transparent;border:0}
#home .helper-slide{min-height:44px;min-width:44px}
#home .carousel-stage{height:calc(var(--home-character-height) + 66px)}
#home .helper-slide{height:calc(var(--home-character-height) + 42px)}
#home .character-rig{height:var(--home-character-height)}
#home .home-details{display:flex;flex-direction:column;gap:12px}
#home .helper-focus{color:var(--muted);text-align:center;font-size:14px;margin:0}
#home .home-links{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#home .home-links a{min-height:44px;padding:8px 12px;display:flex;align-items:center;justify-content:center;font-size:14px}
#home .heading{display:flex;align-items:center;justify-content:space-between}
#home .team-caption{font-size:12px;color:var(--muted)}
#role-avatar,.role-option img,.assistant-avatar,.assistant-row img{border:0!important;border-radius:0!important;background:transparent!important;object-fit:contain}

.role-choice img{background:transparent!important;border:0!important;border-radius:0!important;object-fit:contain}

.knowledge-helper{display:flex;align-items:center;gap:12px;margin:12px 0;color:var(--accent);font-size:14px}
.knowledge-helper img{width:44px;height:60px;object-fit:contain;border:0;border-radius:0;background:transparent;box-shadow:none}
