/* UCHEBKA mobile demo layout hotfix - scoped to original guest interface. */
@media (max-width: 1023px) {
  #root header.ui-surface {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    height: 60px;
    min-height: 60px;
    padding-inline: 12px !important;
    gap: 8px !important;
    box-sizing: border-box;
    overflow: visible;
  }
  #root header.ui-surface > div:first-child {
    flex: 0 1 auto !important;
    min-width: 0;
    max-width: calc(100vw - 158px);
    gap: 6px !important;
  }
  #root header.ui-surface > div:first-child > button {
    flex: 0 0 40px;
    width: 40px;
    height: 44px;
    padding: 8px !important;
    margin-left: -6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #root header.ui-surface > div:first-child > a {
    flex: 0 1 auto !important;
    min-width: 0;
    max-width: 148px;
    overflow: hidden;
  }
  #root header.ui-surface > div:first-child > a img,
  #root header.ui-surface > div:first-child > a svg {
    max-width: 100% !important;
    width: auto !important;
    max-height: 37px;
    object-fit: contain;
  }
  #root header.ui-surface > nav { display: none !important; }
  #root header.ui-surface > nav + div {
    display: none !important; /* desktop quick-actions are available in the menu */
  }
  #root header.ui-surface > div:last-child {
    flex: 0 0 auto !important;
    min-width: 0;
    margin-left: auto !important;
    gap: 7px !important;
    align-items: center;
    height: 48px;
  }
  #root header.ui-surface > div:last-child > a {
    display: none !important; /* chat is available from the navigation drawer */
  }
  #root header.ui-surface > div:last-child button {
    touch-action: manipulation;
  }
  #root header.ui-surface > div:last-child > div:last-child {
    min-width: 0;
    max-width: 88px;
  }
  #root aside.ui-panel.fixed {
    top: 60px !important;
    bottom: 0 !important;
    height: calc(100dvh - 60px) !important;
    max-height: calc(100dvh - 60px);
    box-sizing: border-box;
  }
  #root aside.ui-panel.fixed > nav {
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #root aside.ui-panel.fixed > div:last-child {
    padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    flex-shrink: 0;
  }
  #synthetic-demo-strip {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 9px;
    width: auto !important;
    max-width: none !important;
    left: 12px !important;
    right: 12px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
    padding: 10px 12px 12px !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.28) !important;
  }
  #synthetic-demo-strip .synthetic-demo-title {
    grid-column: 1 / -1;
    text-align: center;
    white-space: normal !important;
    font-size: 11px !important;
    line-height: 1.35;
    letter-spacing: .01em;
  }
  #synthetic-demo-strip select {
    grid-column: 1;
    width: 100%;
    max-width: none !important;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0 12px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }
  #synthetic-demo-strip a {
    grid-column: 2;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 12px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    white-space: nowrap;
  }
  body {
    padding-bottom: calc(124px + env(safe-area-inset-bottom)) !important;
  }
}
@media (max-width: 359px) {
  #root header.ui-surface { padding-inline: 8px !important; gap: 5px !important; }
  #root header.ui-surface > div:first-child > a { max-width: 115px; }
  #root header.ui-surface > div:last-child { gap: 4px !important; }
  #root header.ui-surface > div:last-child > div:nth-last-child(2) { display: none; }
  #synthetic-demo-strip { left: 8px !important; right: 8px !important; gap: 6px; }
  #synthetic-demo-strip a { font-size: 11px !important; padding-inline: 9px !important; }
}
