/**
 * EstelSuite mobile layout: drawer nav + full-screen detail overlays (≤991.98px).
 */

/* ========== Drawer navigation ========== */
.suite-mobile-menu-btn {
  flex-shrink: 0;
  margin-right: 0.35rem;
}

.suite-mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.suite-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1045;
  width: min(18.5rem, 88vw);
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: rgba(12, 14, 16, 0.97);
  border-right: 1px solid rgba(117, 183, 152, 0.28);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  overflow: hidden;
}

body.suite-drawer-open .suite-mobile-drawer {
  transform: translateX(0);
}

.suite-mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.suite-mobile-drawer__brand {
  font-weight: 700;
  color: var(--accent-success, #22c55e);
  font-size: 1.05rem;
}

.suite-mobile-drawer__status {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.suite-mobile-drawer__status:empty {
  display: none;
}

.suite-mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.55rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.suite-mobile-drawer__link {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  padding: 0.65rem 0.75rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  cursor: pointer;
}

.suite-mobile-drawer__link:hover,
.suite-mobile-drawer__link:focus-visible {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(117, 183, 152, 0.25);
}

.suite-mobile-drawer__link.active {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(117, 183, 152, 0.45);
  color: #e6f2ea;
  font-weight: 600;
}

.suite-mobile-drawer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.suite-mobile-drawer__actions .btn {
  font-size: 0.75rem;
}

.suite-mobile-drawer__foot {
  padding: 0.65rem 0.75rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.suite-mobile-drawer__foot .suite-footer-inner {
  grid-template-columns: 1fr;
  text-align: center;
  gap: 0.45rem;
}

.suite-mobile-drawer__foot .suite-footer-legal {
  white-space: normal;
  justify-self: center;
}

/* ========== Full-screen detail overlay ========== */
.suite-overlay-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 14, 16, 0.96);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.suite-overlay-title {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.suite-detail-open {
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .suite-detail-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1060 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: rgba(10, 12, 14, 0.98) !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    animation: suite-overlay-in 0.22s ease;
  }

  .suite-detail-overlay > .portal-card,
  .suite-detail-overlay.welcome-detail-col > .welcome-detail-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0 0.65rem 0.75rem;
    margin: 0;
    height: 100%;
  }

  .ticket-detail-root.suite-detail-overlay .ticket-detail-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0 0.65rem 0.75rem;
  }

  .suite-detail-overlay .welcome-detail-body,
  .char-detail-root.suite-detail-overlay .char-detail-body,
  .media-detail-root.suite-detail-overlay .media-detail-body,
  .suite-detail-overlay.suite-md-detail {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .suite-detail-overlay .welcome-detail-card > .h6:first-of-type,
  .char-detail-root.suite-detail-overlay .char-detail-card > h4:first-of-type,
  .media-detail-root.suite-detail-overlay .media-preview-header,
  .ticket-detail-root.suite-detail-overlay .ticket-detail-card > .h6:first-of-type {
    display: none;
  }

  .char-detail-root.suite-detail-overlay > .portal-card,
  .char-detail-root.suite-detail-overlay .char-detail-body > .portal-card {
    flex: 1 1 auto;
    min-height: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0 0.65rem 0.75rem;
    margin: 0;
  }

  .media-detail-root.suite-detail-overlay {
    padding: 0 !important;
  }

  .media-detail-root.suite-detail-overlay .media-detail-body {
    padding: 0 0.65rem 0.75rem;
  }

  .ticket-detail-root.suite-detail-overlay {
    padding: 0 !important;
  }

  .ticket-detail-root.suite-detail-overlay .ticket-detail-card {
    flex-shrink: 0;
    margin-bottom: 0.5rem !important;
    background: transparent;
    border: none;
    padding: 0;
  }

  .ticket-detail-root.suite-detail-overlay #transcript-panel:not(.transcript-maximized) {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
    background: var(--portal-surface-solid);
  }

  .ticket-detail-root.suite-detail-overlay #transcript-panel .transcript-panel-header {
    flex-shrink: 0;
  }

  .ticket-detail-root.suite-detail-overlay #transcript-panel .transcript-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .ticket-detail-root.suite-detail-overlay #transcript-frame:not(.d-none) {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    border-radius: 0 0 0.5rem 0.5rem;
  }
}

@keyframes suite-overlay-in {
  from {
    opacity: 0;
    transform: translateY(6%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Player dashboard mobile shell ========== */
@media (max-width: 991.98px) {
  html.suite-mobile .suite-mobile-menu-btn {
    display: inline-flex;
  }

  html.suite-mobile body.player-dashboard-page .portal-tabs {
    display: none !important;
  }

  body.player-dashboard-page > .suite-footer {
    display: none !important;
  }

  .suite-mobile-drawer__foot .suite-footer,
  .suite-mobile-drawer__foot .suite-footer--drawer {
    display: block !important;
    margin: 0 !important;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .suite-mobile-drawer__foot .container-fluid {
    padding: 0 !important;
  }

  html.suite-mobile body.player-dashboard-page .suite-topbar .navbar-brand {
    display: none !important;
  }

  html.suite-mobile body.player-dashboard-page .suite-topbar-status {
    display: none !important;
  }

  html.suite-mobile .suite-topbar .kofi-support,
  html.suite-mobile .suite-topbar .portal-tour-chip,
  html.suite-mobile .suite-topbar .vote-support {
    width: auto !important;
    max-width: 2.35rem;
    min-width: 2rem;
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
    justify-content: center;
  }

  html.suite-mobile .suite-topbar .kofi-support__label,
  html.suite-mobile .suite-topbar .portal-tour-chip__label-slot,
  html.suite-mobile .suite-topbar .vote-support__label,
  html.suite-mobile .suite-topbar .vote-support__label-slot {
    display: none !important;
  }

  html.suite-mobile .suite-topbar .kofi-support__track,
  html.suite-mobile .suite-topbar .portal-tour-chip__track,
  html.suite-mobile .suite-topbar .vote-support__track {
    gap: 0 !important;
    justify-content: center;
  }

  html.suite-mobile .suite-topbar .kofi-support--motion-squeeze,
  html.suite-mobile .suite-topbar .kofi-support--motion-stretch,
  html.suite-mobile .suite-topbar .portal-tour-chip--motion-squeeze,
  html.suite-mobile .suite-topbar .portal-tour-chip--motion-stretch,
  html.suite-mobile .suite-topbar .vote-support--motion-squeeze,
  html.suite-mobile .suite-topbar .vote-support--motion-stretch {
    animation: none !important;
  }

  html.suite-mobile body.player-dashboard-page .portal-shell {
    padding: 0.35rem 0.45rem 0.45rem !important;
  }

  html.suite-mobile body.player-dashboard-page:has(.portal-panel[data-panel="welcome"].active) {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  html.suite-mobile body.player-dashboard-page:has(.portal-panel[data-panel="welcome"].active) .portal-shell {
    overflow: visible;
  }

  html.suite-mobile body.player-dashboard-page .portal-panel.active {
    overflow: visible;
    min-height: 0;
  }

  html.suite-mobile body.player-dashboard-page .welcome-root {
    overflow: visible;
    min-height: auto;
  }
}

@media (min-width: 992px) {
  .suite-mobile-menu-btn,
  .suite-mobile-drawer,
  .suite-mobile-drawer-backdrop,
  .welcome-feed-tabs,
  .welcome-sidebar-section__foot,
  .welcome-detail-col .suite-overlay-header {
    display: none !important;
  }
}

/* ========== Welcome: tabs + single feed pane ========== */
.welcome-feed-tabs {
  display: none;
  flex-shrink: 0;
  gap: 0.28rem;
  padding: 0 0 0.42rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.welcome-feed-tabs::-webkit-scrollbar {
  display: none;
}

.welcome-feed-tab {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.32rem 0.62rem;
  cursor: pointer;
  white-space: nowrap;
}

.welcome-feed-tab.active {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(117, 183, 152, 0.45);
  color: #e6f2ea;
}

.welcome-feed-tab-dot {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.28rem;
  border-radius: 50%;
  background: #eab308;
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.65);
  vertical-align: middle;
}

@media (max-width: 991.98px) {
  html.suite-mobile .welcome-feed-tabs {
    display: flex;
    flex-wrap: wrap;
  }

  html.suite-mobile .welcome-sidebar-section--events.d-none.welcome-sidebar-section--feed-active,
  html.suite-mobile .welcome-sidebar-section--events.welcome-sidebar-section--feed-active {
    display: flex !important;
  }

  html.suite-mobile .welcome-sidebar-section--forecast.d-none.welcome-sidebar-section--feed-active,
  html.suite-mobile .welcome-sidebar-section--forecast.welcome-sidebar-section--feed-active {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
  }

  html.suite-mobile
    .welcome-sidebar-panel:has(.welcome-sidebar-section--forecast.welcome-sidebar-section--feed-active)
    .welcome-sidebar-feeds {
    display: none !important;
  }

  html.suite-mobile .welcome-sidebar-section--feed-active .welcome-sidebar-section__head {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }

  html.suite-mobile .welcome-feed-list .welcome-feed-empty {
    padding: 0.85rem 0.75rem;
    align-self: flex-start;
  }

  html.suite-mobile .welcome-more-ann--head {
    display: none !important;
  }

  html.suite-mobile .welcome-mobile-bar {
    display: none !important;
  }

  html.suite-mobile .welcome-columns {
    flex-direction: column;
  }

  html.suite-mobile .welcome-detail-col {
    display: none !important;
  }

  html.suite-mobile .welcome-detail-col.suite-detail-overlay {
    display: flex !important;
  }

  html.suite-mobile .welcome-sidebar {
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    max-height: none;
  }

  html.suite-mobile .welcome-sidebar-panel {
    min-height: calc(100dvh - 3.75rem);
    overflow: hidden;
  }

  html.suite-mobile .welcome-sidebar-feeds {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.suite-mobile .welcome-sidebar-section {
    display: none !important;
    flex: 1 1 auto !important;
    min-height: 0;
    padding: 0.35rem 0;
  }

  html.suite-mobile .welcome-sidebar-section.welcome-sidebar-section--feed-active {
    display: flex !important;
    flex-direction: column;
  }

  html.suite-mobile .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann {
    overflow: hidden;
  }

  html.suite-mobile .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann .welcome-sidebar-section__foot {
    display: flex;
    flex-shrink: 0;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding: 0.2rem 0.35rem 0;
  }

  html.suite-mobile .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann .welcome-more-ann--foot {
    color: #6ea8fe;
    text-decoration: none;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-more-ann--foot:hover,
  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-more-ann--foot:focus-visible {
    color: #9ec5fe;
    text-decoration: underline;
  }

  html.suite-mobile .welcome-sidebar-section--news-empty.welcome-sidebar-section--feed-active {
    display: flex !important;
  }

  html.suite-mobile .welcome-sidebar-section--feed-active .welcome-feed-list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Mobile announcements: 3 rows fill the tab; optional 4th when pane is tall enough. */
  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-feed-list .welcome-feed-row--compact {
    flex: 1 1 0 !important;
    min-height: 4.25rem;
    height: auto;
    max-height: none;
    overflow: hidden;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-feed-list .welcome-feed-row--compact[hidden] {
    display: none !important;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-feed-list .welcome-feed-row-inner {
    flex: 1 1 auto;
    height: auto;
    min-height: 4.25rem;
    container-type: normal;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-feed-list .welcome-feed-row-text {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
    gap: 0.08rem;
    height: 100%;
    min-height: 0;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-feed-list .welcome-feed-preview {
    align-self: stretch;
    min-height: 0;
    height: auto !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-feed-list {
    overflow-y: hidden;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-feed-list .welcome-sidebar-thumb {
    width: 4.25rem;
    height: 4.25rem;
    min-width: 4.25rem;
    min-height: 4.25rem;
    flex-shrink: 0;
    align-self: center;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active.welcome-sidebar-section--ann
    .welcome-feed-list .welcome-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-feed-row--compact:nth-child(5)),
  html.suite-mobile
    .welcome-sidebar-section--feed-active
    .welcome-feed-list:has(.welcome-event-row:nth-child(5)) {
    overflow-y: auto;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-feed-row--compact:nth-child(5))
    .welcome-feed-row--compact,
  html.suite-mobile
    .welcome-sidebar-section--feed-active
    .welcome-feed-list:has(.welcome-event-row:nth-child(5))
    .welcome-event-row {
    flex: 0 0 auto !important;
    min-height: 4.25rem;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-feed-row--compact, .welcome-event-row)
    .welcome-feed-row--compact,
  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-feed-row--compact, .welcome-event-row)
    .welcome-event-row {
    flex: 1 1 0 !important;
    min-height: 0;
    height: auto;
    overflow: hidden;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:not(:has(.welcome-feed-row--compact:nth-child(5)))
    .welcome-feed-list:not(:has(.welcome-event-row:nth-child(5)))
    .welcome-feed-row--compact,
  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:not(:has(.welcome-event-row:nth-child(5)))
    .welcome-event-row {
    flex: 1 1 0 !important;
    min-height: 0;
    height: auto;
    overflow: hidden;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-feed-row--compact, .welcome-event-row)
    .welcome-feed-row-inner {
    flex: 1 1 auto;
    height: auto;
    min-height: 4.25rem;
    container-type: normal;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-feed-row--compact, .welcome-event-row)
    .welcome-feed-row-text {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
    gap: 0.08rem;
    height: 100%;
    min-height: 0;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-feed-row--compact, .welcome-event-row)
    .welcome-feed-preview {
    align-self: stretch;
    min-height: 0;
    height: auto !important;
    -webkit-line-clamp: 12;
    line-clamp: 12;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-feed-row--compact, .welcome-event-row)
    .welcome-sidebar-thumb {
    width: 4.25rem;
    height: 4.25rem;
    min-width: 4.25rem;
    min-height: 4.25rem;
    flex-shrink: 0;
    align-self: center;
  }

  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-feed-row--compact, .welcome-event-row)
    .welcome-sidebar-thumb img,
  html.suite-mobile
    .welcome-sidebar-section--feed-active:not(.welcome-sidebar-section--ann)
    .welcome-feed-list:has(.welcome-event-row)
    .welcome-sidebar-thumb > .welcome-event-thumb--placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  html.suite-mobile .welcome-sidebar-section--feed-active .welcome-feed-list .welcome-feed-empty {
    flex: 1 1 auto;
    align-self: stretch;
    display: flex;
    align-items: center;
  }

  html.suite-mobile .welcome-sidebar-section--feed-active .welcome-feed-meta {
    flex-shrink: 0;
  }

  html.suite-mobile .welcome-detail-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ========== Master-detail sections ========== */
@media (max-width: 991.98px) {
  html.suite-mobile .suite-md-mobile-bar {
    display: none !important;
  }

  html.suite-mobile .suite-master-detail .suite-md-detail {
    display: none !important;
  }

  html.suite-mobile .suite-master-detail .suite-md-detail.suite-detail-overlay {
    display: flex !important;
    flex-direction: column;
  }

  html.suite-mobile .suite-master-detail .suite-md-list {
    display: block !important;
    width: 100%;
  }

  html.suite-mobile body.player-dashboard-page:has(.portal-panel[data-panel='tickets'].active) {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  html.suite-mobile body.player-dashboard-page:has(.portal-panel[data-panel='tickets'].active) .portal-shell {
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  html.suite-mobile [data-panel='tickets'].portal-panel.active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  html.suite-mobile .ticket-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.suite-mobile .ticket-layout > .col-lg-4 {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: none;
  }

  html.suite-mobile .ticket-sidebar-stack {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
  }

  html.suite-mobile .ticket-sidebar-stack > .portal-card {
    margin: 0 !important;
    flex-shrink: 0;
  }

  html.suite-mobile .ticket-sidebar-stack > .portal-card[data-tour='ticket-closed'] {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.suite-mobile .ticket-sidebar-stack > .portal-card[data-tour='ticket-closed'] .media-filter-details {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  html.suite-mobile
    .ticket-sidebar-stack
    > .portal-card[data-tour='ticket-closed']
    .media-filter-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.suite-mobile #tickets-closed-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.suite-mobile #tickets-open-list {
    max-height: min(38vh, 280px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.suite-mobile .ticket-detail-root:not(.suite-detail-overlay) #transcript-frame:not(.d-none) {
    min-height: 10rem;
    height: auto !important;
  }

  html.suite-mobile .chars-grid {
    grid-template-columns: 1fr;
  }

  html.suite-mobile [data-panel='characters'] .char-detail-root {
    display: none;
  }

  html.suite-mobile [data-panel='characters'] .char-detail-root.suite-detail-overlay {
    display: flex !important;
  }

  html.suite-mobile [data-panel='media'] .media-detail-root:not(.suite-detail-overlay) {
    display: none !important;
  }

  html.suite-mobile [data-panel='media'] .media-detail-root.suite-detail-overlay {
    display: flex !important;
  }

  html.suite-mobile [data-panel='media'] .col-lg-8 {
    display: none;
  }

  html.suite-mobile [data-panel='media'] .col-lg-8:has(.media-detail-root.suite-detail-overlay) {
    display: block;
  }

  html.suite-mobile [data-panel='tickets'] .ticket-detail-root:not(.suite-detail-overlay) {
    display: none !important;
  }

  html.suite-mobile [data-panel='tickets'] .ticket-detail-root.suite-detail-overlay {
    display: flex !important;
  }

  html.suite-mobile [data-panel='tickets'] .col-lg-8 {
    display: none;
  }

  html.suite-mobile [data-panel='tickets'] .col-lg-8:has(.ticket-detail-root.suite-detail-overlay) {
    display: block;
  }

  html.suite-mobile [data-panel='inkroknito'].portal-panel.active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  html.suite-mobile .inkro-root,
  html.suite-mobile .inkro-dm-layout,
  html.suite-mobile .inkro-ch-layout,
  html.suite-mobile .inkro-dm-layout > .col-lg-4,
  html.suite-mobile .inkro-ch-layout > .col-lg-4,
  html.suite-mobile .inkro-sidebar-stack {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.suite-mobile .inkro-dm-tabs,
  html.suite-mobile .inkro-ch-tabs {
    display: flex;
    flex-shrink: 0;
  }

  html.suite-mobile .inkro-subnav {
    margin-bottom: 0.65rem !important;
  }

  html.suite-mobile .inkro-dm-pane,
  html.suite-mobile .inkro-ch-pane {
    display: none !important;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  html.suite-mobile .inkro-dm-pane.is-active,
  html.suite-mobile .inkro-ch-pane.is-active {
    display: flex !important;
    flex-direction: column;
  }

  html.suite-mobile .inkro-dm-pane[data-inkro-dm-pane='active'] > .inkro-dm-pane-title,
  html.suite-mobile .inkro-dm-pane[data-inkro-dm-pane='ended'] > .inkro-dm-pane-title,
  html.suite-mobile .inkro-dm-pane[data-inkro-dm-pane='compose']:not(.inkro-settings-card) > .inkro-dm-pane-title,
  html.suite-mobile .inkro-ch-pane[data-inkro-ch-pane='authored'] > .inkro-ch-pane-title,
  html.suite-mobile .inkro-ch-pane[data-inkro-ch-pane='involved'] > .inkro-ch-pane-title,
  html.suite-mobile .inkro-ch-pane[data-inkro-ch-pane='compose']:not(.inkro-settings-card) > .inkro-ch-pane-title {
    display: none;
  }

  html.suite-mobile .inkro-dm-list,
  html.suite-mobile .inkro-ch-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.suite-mobile [data-panel='inkroknito'] .inkro-detail-col {
    display: none;
  }

  html.suite-mobile [data-panel='inkroknito'] .inkro-detail-col:has(.inkro-detail-root.suite-detail-overlay) {
    display: block;
  }

  html.suite-mobile [data-panel='inkroknito'] .inkro-detail-root:not(.suite-detail-overlay) {
    display: none !important;
  }

  html.suite-mobile [data-panel='inkroknito'] .inkro-detail-root.suite-detail-overlay {
    display: flex !important;
  }

  html.suite-mobile .inkro-detail-root.suite-detail-overlay .inkro-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0.65rem;
  }

  html.suite-mobile .inkro-detail-root.suite-detail-overlay .inkro-detail-heading {
    display: none;
  }

  html.suite-mobile .inkro-detail-root.suite-detail-overlay .inkro-detail-card {
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
    margin: 0;
  }

  html.suite-mobile .inkro-detail-root.suite-detail-overlay .inkro-thread {
    max-height: none;
  }

  html.suite-mobile .inkro-detail-root.suite-detail-overlay .inkro-detail-footer {
    flex-shrink: 0;
    margin-top: 0;
    padding: 0.75rem 0.65rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 12, 14, 0.98);
  }

  html.suite-mobile body.player-dashboard-page:has(.portal-panel[data-panel='services'].active) {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  html.suite-mobile body.player-dashboard-page:has(.portal-panel[data-panel='services'].active) .portal-shell {
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  html.suite-mobile [data-panel='services'].portal-panel.active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  html.suite-mobile .services-layout,
  html.suite-mobile .services-layout > .col-lg-4,
  html.suite-mobile .services-sidebar-stack {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.suite-mobile .services-guide-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.suite-mobile [data-panel='services'] .services-detail-col {
    display: none;
  }

  html.suite-mobile [data-panel='services'] .services-detail-col:has(.services-detail-root.suite-detail-overlay) {
    display: block;
  }

  html.suite-mobile [data-panel='services'] .services-detail-root:not(.suite-detail-overlay) {
    display: none !important;
  }

  html.suite-mobile [data-panel='services'] .services-detail-root.suite-detail-overlay {
    display: flex !important;
  }

  html.suite-mobile .services-detail-root.suite-detail-overlay .services-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0.65rem;
  }

  html.suite-mobile .services-detail-root.suite-detail-overlay .services-detail-heading {
    display: none;
  }

  html.suite-mobile .services-detail-root.suite-detail-overlay .services-detail-card {
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
    margin: 0;
  }

  html.suite-mobile .services-detail-root.suite-detail-overlay .services-detail-body--with-action {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }

  html.suite-mobile .services-detail-root.suite-detail-overlay .services-detail-body--with-action .services-detail-card {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0.65rem;
  }

  html.suite-mobile .services-detail-root.suite-detail-overlay .services-detail-footer {
    flex-shrink: 0;
    margin: 0;
    padding: 0 0.65rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    border: none;
    border-radius: 0;
    background: rgba(10, 12, 14, 0.98);
  }

  html.suite-mobile .services-detail-root.suite-detail-overlay .services-detail-footer .service-tab-link {
    border-radius: 0.5rem;
  }

  html.suite-mobile .media-preview-box img {
    max-height: min(40vh, 340px);
    object-fit: contain;
  }

  html.suite-mobile body.player-dashboard-page:has(.portal-panel[data-panel='lieferhamster'].active) {
    overflow: hidden;
  }

  html.suite-mobile .portal-panel[data-panel='lieferhamster'].active {
    overflow: hidden;
    min-height: 0;
  }

  html.suite-mobile #lh-root {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
}

/* ========== Lieferhamster: full-screen pane stack ========== */
@media (max-width: 991.98px) {
  html.suite-mobile .lh-shell {
    min-height: 0;
    max-height: calc(100dvh - 3.75rem);
    height: calc(100dvh - 3.75rem);
    position: relative;
    overflow: hidden;
    --lh-mobile-header-height: 8.5rem;
    display: flex;
    flex-direction: column;
  }

  html.suite-mobile .lh-header {
    position: sticky;
    top: 0;
    z-index: 1070;
    flex-shrink: 0;
    padding: 0.65rem 0.75rem;
    background: rgba(12, 14, 16, 0.98);
  }

  html.suite-mobile .lh-search-wrap {
    max-width: none;
    flex: 1 1 100%;
  }

  html.suite-mobile .lh-explorer {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  html.suite-mobile .lh-explorer .lh-pane {
    display: none;
    border-right: none;
    overflow: hidden;
  }

  html.suite-mobile .lh-explorer .lh-pane.is-hidden {
    display: none !important;
  }

  html.suite-mobile .lh-explorer .lh-pane.lh-pane-items.lh-pane-active:not(.is-hidden),
  html.suite-mobile .lh-explorer .lh-pane.lh-pane-nav.lh-pane-active:not(.is-hidden),
  html.suite-mobile .lh-explorer .lh-pane.lh-pane-list.lh-pane-active:not(.is-hidden) {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--lh-mobile-header-height);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1060;
    background: rgba(10, 12, 14, 0.98);
    animation: suite-overlay-in 0.22s ease;
    overflow: hidden;
  }

  html.suite-mobile .lh-explorer .lh-pane.lh-pane-active:not(.is-hidden) .lh-pane-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-gutter: auto;
  }

  html.suite-mobile .lh-explorer .lh-pane-list.lh-pane-active:not(.is-hidden) .lh-pane-body,
  html.suite-mobile .lh-explorer .lh-pane-items.lh-pane-active:not(.is-hidden) .lh-pane-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.suite-mobile .lh-explorer .lh-pane.lh-pane-detail.lh-pane-active:not(.is-hidden) {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(10, 12, 14, 0.98);
    animation: suite-overlay-in 0.22s ease;
    overflow: hidden;
  }

  html.suite-mobile .lh-explorer .lh-pane-detail.lh-pane-active:not(.is-hidden) .lh-pane-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.suite-mobile .lh-mobile-bar {
    display: none !important;
  }

  html.suite-mobile .lh-pane-mobile-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 14, 16, 0.96);
    flex-shrink: 0;
  }

  html.suite-mobile .lh-pane-mobile-bar.d-none {
    display: none !important;
  }

  html.suite-mobile .lh-pane-mobile-title {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.suite-mobile .lh-pane.lh-pane-active:not(.lh-pane-nav) .lh-pane-head {
    display: none;
  }

  html.suite-mobile .lh-pane-back {
    flex-shrink: 0;
    font-size: 0.82rem;
  }

  html.suite-mobile .lh-explorer[data-cols='3'] .lh-pane-detail,
  html.suite-mobile .lh-explorer[data-cols='4'] .lh-pane-detail {
    position: fixed;
    inset: 0;
    z-index: 1060;
  }
}

/* ========== Global / hub / admin ========== */
@media (max-width: 991.98px) {
  body:not(.module-page) {
    padding: 0;
  }

  body::before {
    background-attachment: scroll;
  }

  header.header .col-12.position-relative .position-absolute {
    position: static !important;
    width: 100%;
    margin: 0.75rem 0 0 !important;
    justify-content: center !important;
  }

  .hub-welcome {
    padding: 1.25rem 1rem;
  }

  .container.py-4,
  main.container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .card .list-group-item {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .suite-topbar {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }

  .suite-topbar .navbar-brand {
    font-size: 1rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 991.98px) {
  html.suite-touch .suite-mobile-drawer__link,
  html.suite-touch .welcome-feed-row--compact,
  html.suite-touch .ticket-row,
  html.suite-touch .lh-item-row {
    min-height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .suite-mobile-drawer,
  .suite-detail-overlay,
  .lh-explorer .lh-pane.lh-pane-active {
    animation: none;
    transition: none;
  }
}

/* Capacitor app: status bar / notch + navigation bar insets */
html[data-estel-client="app"] {
  --estel-safe-top: env(safe-area-inset-top, 0px);
  --estel-safe-right: env(safe-area-inset-right, 0px);
  --estel-safe-bottom: env(safe-area-inset-bottom, 0px);
  --estel-safe-left: env(safe-area-inset-left, 0px);
}

html[data-estel-client="app"] body {
  padding-top: var(--estel-safe-top);
  padding-bottom: var(--estel-safe-bottom);
  padding-left: var(--estel-safe-left);
  padding-right: var(--estel-safe-right);
  box-sizing: border-box;
}

html[data-estel-client="app"] .suite-topbar {
  margin-top: calc(-1 * var(--estel-safe-top));
  padding-top: calc(0.5rem + var(--estel-safe-top)) !important;
}

html[data-estel-client="app"] .portal-offline-banner {
  top: var(--estel-safe-top);
}

html[data-estel-client="app"] .suite-mobile-drawer {
  padding-top: var(--estel-safe-top);
  padding-bottom: var(--estel-safe-bottom);
}

html[data-estel-client="app"] .suite-mobile-drawer-backdrop {
  top: var(--estel-safe-top);
  bottom: var(--estel-safe-bottom);
}
