/* страница живых блоков для «Что нового»: только раскладка, вид даёт сам компонент */
/* стили приложения запрещают передавать прокрутку наружу, а здесь над блоком должна листаться вся страница */
html, body { background: #000; overscroll-behavior: auto; }
html[data-view='chat'], html[data-view='chat'] body { height: auto; min-height: 0; overflow: visible; position: static; }
html[data-view='home'], html[data-view='home'] body, html[data-view='mascots'], html[data-view='mascots'] body { width: 100%; height: 100%; overflow: hidden; position: static; }
body.demo-page { display: block; margin: 0; }
.demo-page [hidden] { display: none !important; }

#demoHome { position: relative; inset: auto; width: 100%; height: 100%; margin: 0; overflow: hidden; background: #000; }
/* на узком экране приложение закрывает этот слой чёрным до готовности, здесь он не нужен */
.demo-page .main-panel::before, .demo-page .main-panel::after { display: none; }
#demoHome .home-stage { display: flex; padding: 16px 16px 20px; pointer-events: auto; }
#demoHome .home-tabs-slot { display: flex; justify-content: center; width: 100%; height: auto; }
#demoHome .ai-product-switch { position: relative; top: auto; left: auto; right: auto; width: auto; max-width: 100%; transform: none; translate: none; overflow-x: auto; scrollbar-width: none; }
#demoHome .ai-product-switch::-webkit-scrollbar { display: none; }
#demoHome .ai-product-switch .home-task { display: inline-flex; }
#demoHome .home-field-slot { display: flex; justify-content: center; }
#demoHome .composer-wrap { position: static; width: min(760px, 100%); padding: 0; transform: none; background: none; }
#demoHome #composer { min-height: 56px; }
#demoHome .home-hints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: min(760px, 100%); height: auto; margin-top: 18px; pointer-events: auto; }
#demoHome .home-column[hidden] { display: none; }
@media (max-width: 640px) {
  #demoHome .home-hints { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #demoHome .home-continue { display: none; }
  #demoHome .home-column:first-child { display: none; }
}

.demo-chat { padding: 2px; color: var(--text); }
.demo-tabs { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(440px, 100%); height: 44px; margin: 0 auto 16px; padding: 4px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); isolation: isolate; }
.demo-tab-pill { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); border-radius: 20px; background: var(--bg); box-shadow: 0 1px 4px #0002; }
.demo-tabs button { min-width: 0; padding: 0; border: 0; border-radius: 20px; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 550; cursor: pointer; transition: color .24s ease, scale .18s ease; }
.demo-tabs button[aria-selected='true'] { color: var(--text); }
.demo-tabs button:active { scale: .96; }
.demo-tabs button:focus-visible { outline: 2px solid var(--accent, #438dff); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .demo-tabs button:hover { color: var(--text); } }
.demo-thread { position: relative; box-sizing: border-box; padding: 18px; border: 1px solid rgb(255 255 255 / .1); border-radius: 20px; background: #141414; }
.demo-thread.is-moving { overflow: hidden; }
.demo-pane { display: flex; flex-direction: column; gap: 14px; }
.demo-pane.is-leaving { position: absolute; top: 18px; left: 18px; right: 18px; pointer-events: none; }
.demo-pane.is-waiting { visibility: hidden; }
/* на телефоне один палец листает страницу, карта двигается двумя */
.demo-thread .iui-map, .demo-thread .iui-map * { touch-action: pan-x pan-y !important; }
.demo-question { align-self: flex-end; max-width: 80%; padding: 10px 16px; border-radius: 20px; background: var(--user-bubble, #2a2a2a); font-size: 15px; line-height: 1.4; }
.demo-answer { margin: 0; font-size: 15px; line-height: 1.55; }

.demo-mascots { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; --mascot-ink: #000; }
.demo-mascot { position: absolute; left: var(--x); top: var(--y); display: grid; justify-items: center; gap: 12px; width: var(--s); padding: 0; border: 0; background: none; color: #86868b; font: inherit; cursor: pointer; transform: translate(-50%, -50%); -webkit-tap-highlight-color: transparent; }
.demo-mascot-rig { position: relative; display: block; width: var(--s); height: var(--s); transition: scale .18s ease; }
.demo-mascot:active .demo-mascot-rig { scale: .94; }
.demo-mascot:focus-visible { outline: 2px solid #fff; outline-offset: 6px; border-radius: 12px; }
.demo-mascot-name { font-size: 13px; line-height: 1.2; white-space: nowrap; transition: color .18s ease; }
@media (hover: hover) and (pointer: fine) { .demo-mascot:hover .demo-mascot-name { color: #f5f5f7; } }
@media (max-width: 520px) { .demo-mascot { left: var(--px); top: var(--py); width: var(--ps); } .demo-mascot-rig { width: var(--ps); height: var(--ps); } }

.demo-lightbox { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 24px; background: rgb(0 0 0 / .78); cursor: zoom-out; }
.demo-lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; object-fit: contain; }
