/**
 * AOS Shell — мобільний шар (підключай після основних стилей index).
 *
 * Верстка ≤48rem застосовується лише за шириною вікна (JS не обов’язковий).
 * JS (aos-shell-mobile.js) додає: кнопку ☰ у хедері, backdrop, блокування скролу
 * — клас html.awo-mobile-nav-open.
 *
 * Підключення (поруч із index.html, напр. public/mobile-style/):
 *   <link rel="stylesheet" href="mobile-style/aos-shell-mobile.css"/>
 *   <script defer src="mobile-style/aos-shell-mobile.js"></script>
 */

/* Кнопка з JS: на десктопі схована */
#awo-mobile-nav-open {
  display: none !important;
}

@media (max-width: 48rem) {
  :root {
    --awo-mobile-header-h: 3.25rem;
    --awo-mobile-ribbon-h: 2.5rem;
    --awo-mobile-nav-z: 500;
    --awo-mobile-backdrop-z: 499;
    --awo-mobile-sheet-z: 2000;
    --awo-mobile-apps-z: 1990;
    --awo-mobile-apps-scrim-z: 1985;
    --awo-mobile-right-panel-z: 480;
    /* Пошук: відступ зверху під дві смуги шапки + ribbon */
    --awo-mobile-cmd-chrome-offset: 5.85rem;
    /* Права панель: висота чорної шапки (два ряди toolbar) без safe-area */
    --awo-mobile-right-panel-below-header: 5.65rem;
    /* Верх панелі: одразу під шапкою, поверх ribbon */
    --awo-mobile-right-panel-top-offset: calc(
      env(safe-area-inset-top, 0px) +
      var(--awo-mobile-right-panel-below-header, 5.65rem)
    );
  }

  #awo-mobile-nav-open {
    display: inline-flex !important;
  }

  /* Safe area + один «екран» без гойдання shell по вертикалі */
  #app {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .awo-shell {
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }

  body {
    padding-bottom: env(safe-area-inset-bottom, 0);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .awo-main-zone {
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .awo-content-wrap,
  .awo-content-row {
    min-height: 0;
    overflow: hidden;
  }

  /* ========== Хедер (як у prototype/mobile-shell-prototypes): ряд 1 — ☰ · крихта · пошук · ⋯ · профіль; ряд 2 — алерти · роль · права панель ========== */
  #awo-toolbar.awo-header {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible;
    align-items: center;
    align-content: flex-start;
    flex-wrap: wrap;
    row-gap: 0;
    column-gap: 0.25rem;
  }

  .awo-header {
    min-height: 0;
    height: auto;
    /* index.html підключає цей файл ДО інлайн-<style>: там .awo-header { padding: 0 1rem } інакше перебиває мобільні відступи */
    padding: calc(env(safe-area-inset-top, 0px) + 0.2rem) 0.35rem 0 0.35rem !important;
    align-items: center;
    align-content: flex-start;
    flex-wrap: wrap;
    row-gap: 0;
    column-gap: 0.25rem;
    /* Вище типового module chrome (z-index ~100–500), нижче cmd/modal/sheet (900+) */
    z-index: 650;
    background: linear-gradient(180deg, #0c0c0c 0%, #000 55%);
    border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 0.0625rem 0 rgba(255, 255, 255, 0.04);
  }

  .awo-header-left {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    gap: 0.2rem;
    display: flex;
    align-items: center;
  }

  .awo-header-right {
    order: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.15rem;
  }

  /* Логотип AOS на телефоні не показуємо */
  #awo-header-logo {
    display: none !important;
  }

  /* Ряд 2: алерти · роль · права панель — прибрати «другий шар» з десктопного position:absolute */
  #awo-toolbar.awo-header > .awo-header-center,
  .awo-header-center {
    order: 3;
    display: flex !important;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    justify-content: center;
    align-items: center;
    padding: 0.18rem 0.3rem 0.28rem;
    margin: 0.08rem -0.35rem 0;
    border-top: 0.0625rem solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.35);
    pointer-events: auto !important;
    z-index: 2;
  }

  /*
    Просте і стабільне вирівнювання: кнопка лишається в потоці flex,
    але права колонка штовхається до краю через auto-margin.
  */
  #awo-toolbar.awo-header > .awo-header-center.awo-header-role-row {
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.1rem 0.28rem 0.3rem !important;
  }

  .awo-header-role-left,
  .awo-header-role-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-width: 0;
  }

  #awo-toolbar.awo-header > .awo-header-center.awo-header-role-row .awo-header-role-right {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    padding: 0 !important;
    justify-content: flex-end;
    pointer-events: auto;
  }

  #awo-toolbar.awo-header #awo-header-right-panel-toggle {
    position: relative !important;
    margin: 0 !important;
    transform: translateX(0.22rem) !important;
  }

  .awo-header-role-mid {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .awo-header-role-spacer {
    display: inline-block;
    width: 2.375rem;
    height: 1px;
  }

  .awo-header-center .awo-role-indicator {
    max-width: 100%;
  }

  .awo-header-center .awo-role-indicator-text {
    max-width: min(56vw, 14rem);
    text-align: center;
    font-size: 0.5625rem;
    color: #9ca3af;
  }

  .awo-header-center .awo-role-indicator-dot {
    flex-shrink: 0;
    width: 0.3rem;
    height: 0.3rem;
    background: #22c55e;
  }

  /* Компактніші кнопки в рядку ролі (як mock-nav-btn у прототипі) */
  .awo-header-role-row .awo-header-btn {
    min-width: 2rem;
    min-height: 2rem;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .awo-header-role-row .awo-header-btn .ti {
    font-size: 0.95rem;
    color: #b8b8b8;
  }

  .awo-header-role-row .awo-header-btn:active {
    background: rgba(255, 255, 255, 0.08);
  }

  .awo-header-center:empty {
    display: none !important;
  }

  /* Кнопка правої панелі в ribbon на телефоні прибрана — дублює шапку */
  #awo-ribbon-right-panel {
    display: none !important;
  }

  #awo-mobile-nav-open.awo-mobile-nav-open-btn {
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: #d4d4d8;
    border-radius: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 0;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none;
  }

  #awo-mobile-nav-open:active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  #awo-mobile-nav-open .ti {
    font-size: 1.0625rem;
    color: inherit;
    opacity: 1;
  }

  .awo-breadcrumbs {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9ca3af;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 0 0.1rem;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .awo-bc-item {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: none;
    color: inherit;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .awo-bc-item.current {
    max-width: 100%;
    color: #e5e7eb;
    cursor: default;
  }

  #awo-mobile-header-svc-toggle.awo-mobile-header-svc-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0;
    border: none;
    border-radius: 0.45rem;
    background: transparent;
    color: #a3a3a3;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none;
  }

  #awo-mobile-header-svc-toggle .ti {
    font-size: 1rem;
  }

  #awo-mobile-header-svc-toggle:active {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  #awo-mobile-header-svc-toggle[hidden] {
    display: none !important;
  }

  /* Sheet «Додатки» — пункти з #awo-header-top-panel-slot */
  .awo-mobile-apps-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--awo-mobile-apps-scrim-z);
    background: rgba(0, 0, 0, 0.4);
    -webkit-tap-highlight-color: transparent;
  }

  .awo-mobile-apps-sheet {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--awo-mobile-apps-z);
    max-height: min(88dvh, 100dvh - env(safe-area-inset-top, 0));
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -0.5rem 2rem rgba(0, 0, 0, 0.35);
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0);
    transform: translate3d(0, 105%, 0);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  html.awo-mobile-apps-open .awo-mobile-apps-scrim {
    display: block;
  }

  html.awo-mobile-apps-open .awo-mobile-apps-sheet {
    display: flex;
  }

  html.awo-mobile-apps-open--visible .awo-mobile-apps-sheet {
    transform: translate3d(0, 0, 0);
  }

  html.awo-mobile-apps-open body {
    overflow: hidden !important;
    touch-action: none;
  }

  .awo-mobile-apps-sheet__head {
    position: relative;
    flex-shrink: 0;
    padding: 0.35rem 2.5rem 0.5rem;
    border-bottom: 0.0625rem solid #e5e7eb;
    text-align: center;
  }

  .awo-mobile-apps-sheet__handle {
    width: 2.5rem;
    height: 0.3125rem;
    border-radius: 999px;
    background: #d1d5db;
    margin: 0 auto 0.35rem;
  }

  .awo-mobile-apps-sheet__title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
  }

  .awo-mobile-apps-sheet__x {
    position: absolute;
    right: 0.4rem;
    top: 0.3rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.5rem;
    background: #f3f4f6;
    color: #111827;
    font-size: 1.35rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .awo-mobile-apps-sheet__x:active {
    background: #e5e7eb;
  }

  .awo-mobile-apps-sheet__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0 0.75rem;
  }

  .awo-mobile-apps-sheet__empty {
    margin: 0;
    padding: 1.25rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #94a3b8;
  }

  .awo-mobile-apps-sheet__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    border-bottom: 0.0625rem solid #f1f5f9;
    background: #fff;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .awo-mobile-apps-sheet__row:active {
    background: #f8fafc;
  }

  .awo-mobile-apps-sheet__row:last-child {
    border-bottom: none;
  }

  .awo-mobile-apps-sheet__ico {
    flex-shrink: 0;
    width: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
  }

  .awo-mobile-apps-sheet__ico .ti {
    font-size: 1.0625rem;
  }

  .awo-mobile-apps-sheet__name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
  }

  /* Права панель — поверх контенту (не зсуває ряд) */
  .awo-content-row {
    position: relative;
  }

  #awo-right-panel {
    position: fixed !important;
    top: var(--awo-mobile-right-panel-top-offset);
    right: 0;
    bottom: env(safe-area-inset-bottom, 0);
    left: auto !important;
    height: calc(100dvh - var(--awo-mobile-right-panel-top-offset) - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - var(--awo-mobile-right-panel-top-offset) - env(safe-area-inset-bottom, 0px)) !important;
    width: 3.25rem !important;
    min-width: 3.25rem !important;
    max-width: 3.25rem !important;
    flex: none !important;
    margin: 0 !important;
    z-index: var(--awo-mobile-right-panel-z) !important;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.32s, opacity 0.2s !important;
    border-left: 0.0625rem solid #e5e7eb;
    box-shadow: -0.35rem 0 1.25rem rgba(0, 0, 0, 0.12);
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
  }

  #awo-right-panel.open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
  }

  #awo-right-panel .awo-right-panel-inner {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 0 !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Кнопка в шапці: без фону при відкритій панелі (закриття тільки нею) */
  html:has(#awo-right-panel.open) #awo-header-right-panel-toggle,
  html:has(#awo-right-panel.open) #awo-header-right-panel-toggle:hover,
  html:has(#awo-right-panel.open) #awo-header-right-panel-toggle:active {
    background: transparent !important;
    box-shadow: none !important;
  }

  .awo-header-right > .awo-header-btn {
    min-width: 2rem;
    min-height: 2rem;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .awo-header-right > .awo-header-btn .ti {
    font-size: 1rem;
    color: #a3a3a3;
  }

  .awo-header-avatar {
    min-width: 1.5rem;
    min-height: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.5rem;
    border-radius: 0.4rem;
  }

  .awo-header-avatar.awo-header-avatar--photo .awo-header-avatar-img {
    border-radius: 0.35rem;
  }

  .awo-header-sep {
    display: none;
  }

  /* Іконки TopPanel у шапці не показуємо — лише в sheet «Додатки» (JS) */
  #awo-header-top-panel-slot {
    display: none !important;
    flex: 0 0 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: none !important;
    justify-content: flex-end;
  }

  #awo-header-top-panel-slot .awo-header-btn {
    min-width: 2rem;
    min-height: 2rem;
    width: 2rem;
    height: 2rem;
  }

  /* ========== Рібон / вкладки — лише горизонтальний скрол, без «стрибання» вгору-вниз ========== */
  .awo-ribbon {
    position: relative;
    z-index: 620;
    min-height: var(--awo-mobile-ribbon-h);
    height: auto;
    max-height: 3rem;
    padding-left: 0.375rem;
    padding-right: env(safe-area-inset-right, 0.25rem);
    padding-bottom: 0.125rem;
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }

  .awo-ribbon-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    align-items: stretch;
    min-height: 0;
  }

  #awo-tab-bar {
    flex-wrap: nowrap;
    min-height: 0;
  }

  .awo-tab {
    height: 2.25rem;
    min-height: 2.25rem;
    min-width: 5.5rem;
    width: auto;
    max-width: 45vw;
    font-size: 0.625rem;
    padding: 0 0.5rem 0 0.625rem;
  }

  .awo-ribbon-btn {
    min-width: 2.5rem;
    min-height: 2.25rem;
    width: 2.5rem;
    height: 2.25rem;
  }

  /* ========== Ліва панель: повноекранний drawer + скрол пальцем ========== */
  #awo-side-menu.awo-sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    z-index: var(--awo-mobile-nav-z);
    flex: none !important;
    border-right: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.32s;
    -webkit-overflow-scrolling: touch;
    background: #050505 !important;
    box-sizing: border-box;
  }

  #awo-side-menu.awo-sidebar:not(.awo-sidebar-expanded) {
    transform: translate3d(-105%, 0, 0);
    visibility: hidden;
    pointer-events: none;
  }

  #awo-side-menu.awo-sidebar.awo-sidebar-expanded {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
    width: 100vw !important;
    min-width: 100% !important;
  }

  #awo-side-menu .awo-sidebar-nav-wrap {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  #awo-side-menu .awo-sidebar-burger-row {
    flex-shrink: 0;
    min-height: 3.25rem;
    padding: 0.35rem 1rem 0.5rem;
    margin-bottom: 0.25rem;
    border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.08);
  }

  #awo-side-menu .awo-sidebar-burger {
    min-width: 2.75rem;
    min-height: 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #f9fafb !important;
    border-radius: 0.5rem;
  }

  #awo-side-menu .awo-sidebar-burger:hover,
  #awo-side-menu .awo-sidebar-burger:active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
  }

  #awo-side-menu .awo-sidebar-burger .ti {
    font-size: 1.25rem;
    opacity: 1;
  }

  #awo-side-menu .awo-sidebar-expand-toggle {
    color: #9ca3af !important;
    font-size: 0.5625rem !important;
  }

  #awo-side-menu .awo-sidebar-text {
    color: #e5e7eb !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
  }

  #awo-side-menu .awo-sidebar-footer {
    flex-shrink: 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
  }

  .awo-sidebar-nav-item,
  .awo-sidebar-sub-item {
    min-height: 2.75rem;
  }

  /* Під меню: без сірої «плівки» — лише перехоплення тапу для закриття */
  .awo-mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--awo-mobile-backdrop-z);
    background: transparent;
    -webkit-tap-highlight-color: transparent;
  }

  html.awo-mobile-nav-open .awo-mobile-nav-backdrop {
    display: block;
  }

  html.awo-mobile-nav-open body {
    overflow: hidden !important;
    touch-action: none;
  }

  html.awo-mobile-nav-open .awo-shell {
    overflow: hidden;
  }

  /*
   * Попап налаштувань: у JS left рахується від правого краю сайдбара — на повному екрані він
   * опиняється за межами вьюпорта. Перекриваємо інлайн-стилі: нижній sheet + високий z-index.
   */
  .awo-settings-popup.visible {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    max-height: min(92vh, 100dvh - env(safe-area-inset-top, 0)) !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
    border-radius: 1rem 1rem 0 0 !important;
    transform: none !important;
    z-index: var(--awo-mobile-sheet-z) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: auto !important;
    box-shadow: 0 -0.5rem 2rem rgba(0, 0, 0, 0.45) !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Шапка sheet: ручка + закриття + свайп униз (обробляє JS) */
  .awo-mobile-sp-sheet-head {
    position: sticky;
    top: 0;
    z-index: 4;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 2.5rem 0.35rem 0.75rem;
    margin: 0;
    background: #fff;
    border-bottom: 0.0625rem solid #e5e7eb;
    border-radius: 1rem 1rem 0 0;
    touch-action: none;
  }

  .awo-mobile-sp-handle {
    width: 2.5rem;
    height: 0.3125rem;
    border-radius: 999px;
    background: #d1d5db;
    margin-bottom: 0.125rem;
  }

  .awo-mobile-sp-close {
    position: absolute;
    right: 0.5rem;
    top: 0.35rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.5rem;
    background: #f3f4f6;
    color: #111827;
    font-size: 1.35rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .awo-mobile-sp-close:active {
    background: #e5e7eb;
  }

  /* Заголовок уже в контенті; зверху лише ручка + × */
  .awo-settings-popup.visible .awo-sp-header {
    display: none !important;
  }

  .awo-settings-popup.visible .awo-sp-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 0.25rem;
  }

  .awo-profile-popup {
    z-index: var(--awo-mobile-sheet-z) !important;
    max-width: calc(100vw - 1rem) !important;
    touch-action: auto !important;
  }

  .awo-side-item-menu,
  .awo-popup-menu,
  .awo-tab-menu {
    z-index: var(--awo-mobile-sheet-z) !important;
  }

  /* Панель алертів — поверх контенту на весь екран */
  #awo-alerts-sidenav.open {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 520 !important;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: #fff !important;
    box-shadow: none !important;
  }

  #awo-alerts-sidenav .awo-alerts-inner {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100% !important;
  }

  #awo-alerts-sidenav .awo-alerts-list {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  /* Пошук (CmdPalette): прив’язка до верху — список результатів не «їде» під клавіатуру */
  #awo-cmd-overlay.awo-cmd-overlay {
    align-items: flex-start;
    justify-content: stretch;
    padding: calc(env(safe-area-inset-top, 0px) + var(--awo-mobile-cmd-chrome-offset, 5.85rem)) 0.5rem 0.5rem;
  }

  #awo-cmd-overlay .awo-cmd-box {
    width: 100%;
    max-width: none;
    margin: 0;
    max-height: min(88dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 0.75rem));
    display: flex;
    flex-direction: column;
  }

  #awo-cmd-overlay .awo-cmd-results {
    max-height: min(42vh, 240px);
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  /* ========== Логін ========== */
  #awo-login-screen {
    flex-direction: row !important;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    background: #000 !important;
    /* black-translucent + viewport-fit=cover: контент під статус-баром — відступи safe-area на контейнері */
    box-sizing: border-box;
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: constant(safe-area-inset-left);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: constant(safe-area-inset-right);
    padding-right: env(safe-area-inset-right, 0px);
  }

  /* На мобілці тільки форма, без лівого презентаційного блоку */
  #awo-login-screen .awo-login-left {
    display: none !important;
  }

  #awo-login-screen .awo-login-right {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    /* Не min-height: 100vh — під safe-area padding батьківського #awo-login-screen дає вертикальний скрол/обрізання */
    min-height: 0 !important;
    flex: 1 1 auto;
    align-self: stretch;
    border-left: none !important;
    border-top: none !important;
    background: #0a0a0a;
  }

  #awo-login-screen .awo-login-right-top {
    padding: 0.85rem 1.25rem 1rem;
    border-bottom: 0.0625rem solid #1a1a1a;
  }

  #awo-login-screen .awo-login-right-body {
    padding: 1.35rem 1.25rem 1.5rem;
    justify-content: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #awo-login-screen .awo-login-tabs {
    margin-bottom: 1.125rem;
  }

  #awo-login-screen .awo-login-right-body .sub {
    margin-bottom: 1.25rem;
  }

  #awo-login-screen .awo-login-right-body .field {
    margin-bottom: 1rem;
  }

  #awo-login-screen .awo-login-right-body .field input {
    min-height: 3.125rem;
    font-size: 1rem;
  }

  #awo-login-screen .awo-login-right-body .form-actions {
    margin-top: 0.25rem;
  }

  #awo-login-screen .awo-login-right-body .form-actions a {
    display: inline-block;
    font-size: 0.8125rem;
    color: #9ca3af;
    text-decoration: underline;
    text-underline-offset: 0.14rem;
  }

  #awo-login-screen .awo-login-btn-submit,
  #awo-login-screen .awo-login-btn-secondary {
    min-height: 3.25rem;
    border-radius: 0.75rem;
    font-size: 1rem;
  }

  #awo-login-screen .awo-forgot-methods-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  #awo-login-screen .awo-login-right-footer {
    padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }
}
