/**
 * Мобильный hub /ege-{N}/ — без dock и trainer main, варианты + дашборд на весь экран.
 */

body[data-neuroege-hf-variant-list-only="1"] #task-mobile-dock,
body[data-neuroege-hf-variant-list-only="1"] [id$="-mobile-dock"],
body[data-neuroege-hf-variant-list-only="1"] .kumir-mobile-dock,
body[data-neuroege-hf-variant-list-only="1"] .task-mobile-dock,
body[data-neuroege-hf-variant-list-only="1"] .kumir-mobile-dock__panes {
  display: none !important;
}

@media (max-width: 768px) {
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .task-solve-page {
    grid-template-rows: minmax(0, 1fr) !important;
  }

  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .task-solve-main,
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .libreoffice-task9-col-resizer {
    display: none !important;
  }

  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .task-solve__right {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0;
    height: 100% !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
  }

  body.hf-mobile-list-hub .neuroege-hf-task-root,
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .neuroege-hf-task-root {
    padding-bottom: 0 !important;
  }

  body.hf-mobile-list-hub [id$="-mobile-dock"],
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    [id$="-mobile-dock"] {
    display: none !important;
  }

  body.task-mobile-mode.neuroege-hf-dashboard-page[data-neuroege-hf-variant-list-only="1"]
    #libreoffice-task9-statement-wrap,
  body.task-mobile-mode.neuroege-hf-dashboard-page[data-neuroege-hf-variant-list-only="1"]
    #task-answer-section {
    display: none !important;
  }

  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .ege-task1-variants-panel-head,
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]:not(.neuroege-task6-py-page):not(.neuroege-task6-kumir-page)
    .ege-task2-variants-panel-head,
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .ege-task3-variants-panel-head,
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .ege-task12-variants-panel-head,
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .ege-task18-variants-panel-head,
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .ege-task22-variants-panel-head,
  body.hf-mobile-list-hub .ege-task1-variants-panel-head,
  body.hf-mobile-list-hub:not(.neuroege-task6-py-page):not(.neuroege-task6-kumir-page)
    .ege-task2-variants-panel-head,
  body.hf-mobile-list-hub .ege-task3-variants-panel-head,
  body.hf-mobile-list-hub .ege-task12-variants-panel-head,
  body.hf-mobile-list-hub .ege-task18-variants-panel-head,
  body.hf-mobile-list-hub .ege-task22-variants-panel-head {
    display: none !important;
  }

  body.neuroege-task6-py-page.hf-mobile-list-hub.task-mobile-mode .ege-task2-variants-panel-head,
  body.neuroege-task6-py-page[data-neuroege-hf-variant-list-only="1"].task-mobile-mode
    .ege-task2-variants-panel-head,
  body.neuroege-task6-kumir-page.hf-mobile-list-hub.task-mobile-mode .ege-task2-variants-panel-head,
  body.neuroege-task6-kumir-page[data-neuroege-hf-variant-list-only="1"].task-mobile-mode
    .ege-task2-variants-panel-head {
    display: flex !important;
  }

  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .neuroege-progress-panel,
  body.hf-mobile-list-hub .neuroege-progress-panel {
    display: flex !important;
    flex-shrink: 0;
  }

  /* List hub: варианты на весь экран (перебивает task12/18/22 и ege_task2 mobile) */
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell #hf-variants-nav,
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-nav,
  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell #hf-variants-nav,
  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-nav,
  body.libreoffice-page-hf-task-list.task-mobile-mode.hf-variant-list-expanded[data-neuroege-hf-variant-list-only="1"]
    #hf-variants-nav {
    display: flex !important;
    flex-direction: column !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }

  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell--body,
  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell--body {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-nav__panel.variants-year__panel,
  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-nav__panel.variants-year__panel {
    flex: 0 0 auto !important;
    overflow: visible !important;
  }

  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    #hf-variants-panel-resizer,
  body.hf-mobile-list-hub.task-mobile-mode #hf-variants-panel-resizer {
    display: none !important;
  }

  body.libreoffice-page-task12.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .neuroege-hf-task-root,
  body.libreoffice-page-task18.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .neuroege-hf-task-root,
  body.libreoffice-page-task22.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .neuroege-hf-task-root,
  body.libreoffice-page-task26.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .neuroege-hf-task-root {
    padding-bottom: 0 !important;
  }

  /* List hub: в шапке только бейдж ЕГЭ N (как /ege-1/), без строки «Вариант» */
  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__variant-row,
  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__variant-row {
    display: none !important;
  }

  body.libreoffice-page-hf-task-list.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__head-main > .hf-variants-shell__head-center,
  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__head-main > .hf-variants-shell__head-center {
    cursor: default;
    pointer-events: none;
  }

  /* Мобильный header list-hub как /ege-1/ (task26 calc без ege-python-task-mobile) */
  body.hf-mobile-list-hub.task-mobile-mode .header--task-hf,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .header--task-hf,
  html.task-mobile-lite body.neuroege-hf-dashboard-page .header--task-hf {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  body.hf-mobile-list-hub.task-mobile-mode .neuroege-hf-task-root > .header--task-hf,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .neuroege-hf-task-root
    > .header--task-hf,
  html.task-mobile-lite body.neuroege-hf-dashboard-page .neuroege-hf-task-root > .header--task-hf {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  body.hf-mobile-list-hub.task-mobile-mode .header--task-hf .hf-task-layout-grid,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .header--task-hf
    .hf-task-layout-grid,
  html.task-mobile-lite body.neuroege-hf-dashboard-page .header--task-hf .hf-task-layout-grid {
    display: contents;
  }

  body.hf-mobile-list-hub.task-mobile-mode .header--task-hf .hf-task-layout-grid__left,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .header--task-hf
    .hf-task-layout-grid__left,
  html.task-mobile-lite body.neuroege-hf-dashboard-page .header--task-hf .hf-task-layout-grid__left {
    display: contents;
  }

  body.hf-mobile-list-hub.task-mobile-mode .header__task-command-back,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .header__task-command-back,
  html.task-mobile-lite body.neuroege-hf-dashboard-page .header__task-command-back {
    display: none !important;
  }

  body.hf-mobile-list-hub.task-mobile-mode #hf-variants-shell-head,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    #hf-variants-shell-head,
  html.task-mobile-lite body.neuroege-hf-dashboard-page #hf-variants-shell-head {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  body.hf-mobile-list-hub.task-mobile-mode .header--task-hf .hf-task-layout-grid__right--dual-toolbar,
  body.hf-mobile-list-hub.task-mobile-mode .header--task-hf .hf-task-layout-grid__right--account-only,
  body.hf-mobile-list-hub.task-mobile-mode .header--task-hf .hf-task-layout-grid__right,
  body.hf-mobile-list-hub.task-mobile-mode .header--task-hf .hf-task-layout-grid__split,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .header--task-hf
    .hf-task-layout-grid__right--dual-toolbar,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .header--task-hf
    .hf-task-layout-grid__right--account-only,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .header--task-hf
    .hf-task-layout-grid__right,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .header--task-hf
    .hf-task-layout-grid__split,
  html.task-mobile-lite body.neuroege-hf-dashboard-page .header--task-hf .hf-task-layout-grid__right {
    display: none !important;
  }

  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__titles--command .header__task-num-title,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__titles--command
    .header__task-num-title {
    display: none !important;
  }

  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__head-main,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__head-main,
  html.task-mobile-lite body.neuroege-hf-dashboard-page .hf-variants-shell__head-main {
    padding-left: max(0.35rem, env(safe-area-inset-left, 0px));
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__head-main > .hf-variants-shell__head-center,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__head-main
    > .hf-variants-shell__head-center,
  html.task-mobile-lite body.neuroege-hf-dashboard-page .hf-variants-shell__head-main > .hf-variants-shell__head-center {
    margin-left: 0.1rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__toggle,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__toggle,
  html.task-mobile-lite body.neuroege-hf-dashboard-page .hf-variants-shell__toggle {
    display: none !important;
  }

  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__exam-chip,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__exam-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-width: 0;
    margin-bottom: 0.06rem;
  }

  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__exam-badge,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__exam-badge {
    flex: 0 0 auto;
    padding: 0.14rem 0.38rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.14) 100%);
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a7f3d0;
    line-height: 1.1;
  }

  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__exam-num,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__exam-num {
    flex: 0 0 auto;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: rgba(236, 253, 245, 0.96);
    line-height: 1.1;
  }

  body.hf-mobile-list-hub.task-mobile-mode .ege-task1-header-burger-wrap,
  body.hf-mobile-list-hub.task-mobile-mode .hf-variants-shell__head-main > .ege-task1-header-burger,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .ege-task1-header-burger-wrap,
  body.neuroege-hf-dashboard-page.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .hf-variants-shell__head-main
    > .ege-task1-header-burger {
    display: inline-flex !important;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 0.2rem;
    margin-right: 0.35rem;
  }

  body.libreoffice-page-task26.hf-mobile-list-hub.task-mobile-mode .libreoffice-task3-page.task-solve-page,
  body.libreoffice-page-task26.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .libreoffice-task3-page.task-solve-page {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    column-gap: 0 !important;
    min-height: 0;
    overflow: hidden;
  }

  body.libreoffice-page-task26.hf-mobile-list-hub.task-mobile-mode .task-sidebar ~ .neuroege-hf-task-root,
  body.libreoffice-page-task26.task-mobile-mode[data-neuroege-hf-variant-list-only="1"]
    .task-sidebar
    ~ .neuroege-hf-task-root {
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
