/* Lusty Looters admin v481: remove landing heroes and retain consistent page frames. */

*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip !important;
}

body.ll-admin-shell main,
body.admin-home-page main,
body.admin-store-page main,
body.admin-orders-page main,
body.admin-subscriptions-page main,
body.ll-feedback-admin-theme main,
body.rcon-home-identical main,
body.connected-home-identical main,
body.banner-admin-page main,
body.admin-security main,
body.admin-staff-ids-page main {
  min-width: 0 !important;
  max-width: 100% !important;
}

body.ll-admin-shell main > *,
body.admin-store-page main > *,
body.admin-orders-page main > *,
body.admin-subscriptions-page main > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

img,
video,
canvas,
svg,
iframe {
  max-width: 100%;
}

input,
select,
textarea,
button {
  min-width: 0;
  max-width: 100%;
}

pre,
code {
  max-width: 100%;
  overflow-wrap: anywhere;
}

dialog,
[role="dialog"],
.modal,
.modal-card,
.content-card {
  max-width: calc(100vw - 28px);
}

/*
  Admin pages are working tools, not public landing pages. Remove every known
  full-size logo/title/description masthead while retaining the page's real
  dashboard, summary cards, filters, forms and action controls.
*/
html body.ll-admin-shell .ll-admin-page-masthead,
html body.ll-admin-shell .ll-admin-home-masthead,
html body.ll-admin-shell .admin-feedback-hero,
html body.ll-admin-shell .ll-page-hero,
html body.ll-admin-shell .rcon-admin-hero,
html body.ll-admin-shell > section.hero,
html body.ll-admin-shell > header.hero,
html body.ll-admin-shell main > section.hero,
html body.ll-admin-shell main > header.hero,
html body.ll-admin-shell main.page > section.hero,
html body.ll-admin-shell main.shell > section.hero,
html body.ll-admin-shell main.llp-page > section.hero,
html body.ll-feedback-admin-theme .admin-feedback-hero,
html body.admin-orders-page .ll-page-hero,
html body.admin-subscriptions-page .ll-page-hero,
html body.rcon-home-identical .rcon-admin-hero,
html body.banner-admin-page .rcon-admin-hero {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  inline-size: 0 !important;
  height: 0 !important;
  block-size: 0 !important;
  min-width: 0 !important;
  min-inline-size: 0 !important;
  min-height: 0 !important;
  min-block-size: 0 !important;
  max-width: 0 !important;
  max-inline-size: 0 !important;
  max-height: 0 !important;
  max-block-size: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Store Manager v470 must remain a contained two-region layout. */
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #store-manager-panel.admin-store-main,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #store-manager-panel > .wrap,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-shell,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-page,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-header,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-tabs,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-workspace,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-catalogue,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-product-area,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .manager-products-table {
  min-width: 0 !important;
  max-width: 100% !important;
  transform: none !important;
  zoom: 1 !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #store-manager-panel > .wrap {
  width: 100% !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #item-list.store-v470-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-auto-flow: row !important;
  grid-auto-columns: minmax(0, 1fr) !important;
  overflow: hidden !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #item-list.store-v470-grid > *,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-product-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-card-top,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-card-main,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-card-badges,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-card-bottom {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-thumb {
  flex: 0 0 48px !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  overflow: hidden !important;
  contain: strict !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-thumb img {
  position: static !important;
  display: block !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 0 !important;
  max-width: 48px !important;
  min-height: 0 !important;
  max-height: 48px !important;
  margin: 0 !important;
  object-fit: cover !important;
  transform: none !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-card-actions {
  min-width: 0 !important;
  max-width: 100% !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-card-actions button {
  flex: 1 1 62px !important;
  min-width: 0 !important;
}

html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-product-card h3,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-card-sub,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-card-desc,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-badge,
html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-type {
  overflow-wrap: anywhere !important;
}

@media (min-width: 981px) {
  :root {
    --store470-sidebar: var(--ll-admin-sidebar-w, 250px);
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) {
    padding-left: var(--ll-admin-sidebar-w, 250px) !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #store-manager-panel.admin-store-main {
    width: calc(100vw - var(--ll-admin-sidebar-w, 250px)) !important;
    max-width: calc(100vw - var(--ll-admin-sidebar-w, 250px)) !important;
    margin: 0 !important;
    padding: clamp(20px, 2.5vw, 38px) clamp(18px, 3vw, 48px) 86px !important;
  }
}

@media (min-width: 981px) and (max-width: 1440px) {
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-workspace {
    grid-template-columns: 1fr !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-sidebar {
    position: static !important;
    top: auto !important;
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #item-list.store-v470-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1120px) {
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-header,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-catalogue-head {
    grid-template-columns: 1fr !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-primary-actions,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-tab-actions {
    justify-content: flex-start !important;
  }
}

@media (max-width: 980px) {
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) {
    width: 100% !important;
    padding-left: 0 !important;
    padding-bottom: 88px !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #store-manager-panel.admin-store-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 18px 16px 28px !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-workspace,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: 1fr !important;
    position: static !important;
    top: auto !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #item-list.store-v470-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .ll-stripe-mode-panel {
    position: fixed !important;
    inset: 14px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 28px) !important;
    overflow: auto !important;
  }
}

@media (max-width: 680px) {
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #store-manager-panel.admin-store-main {
    padding-inline: 12px !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-header,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-tabs,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-catalogue-head {
    padding: 15px !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-stats,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) #item-list.store-v470-grid {
    grid-template-columns: 1fr !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-primary-actions,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-tab-actions,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .manager-control-tabs {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: 1fr !important;
  }

  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-primary-actions > *,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-tab-actions > *,
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .manager-control-tabs > * {
    width: 100% !important;
  }
}

@media (max-height: 760px) and (min-width: 681px) {
  html body.store-manager-v470.admin-store-page:not(.admin-store-item-page) .store-v470-sidebar {
    position: static !important;
    top: auto !important;
  }
}

/* Shared containment for every page using the admin sidebar. */
:is(
  body.ll-admin-shell,
  body.admin-home-page,
  body.admin-store-page,
  body.admin-orders-page,
  body.admin-subscriptions-page,
  body.ll-feedback-admin-theme,
  body.rcon-home-identical,
  body.connected-home-identical,
  body.banner-admin-page,
  body.admin-security,
  body.admin-staff-ids-page,
  body.staff-admin-editor-page,
  body.admin-delivery-servers-page
) {
  inline-size: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  overflow-x: hidden !important;
}

/* Keep every page clear of the top edge without changing the sidebar position. */
body.ll-admin-shell > main,
body.ll-admin-shell > .rcon-page-shell > main,
body.ll-admin-shell > .page-shell > main {
  padding-block-start: clamp(22px, 1.8vw, 30px) !important;
}

/*
  Remove the retired masthead compensation everywhere. The shared v421 rule
  applied -150px to page roots and several nested wrappers after the mastheads
  were hidden, which could leave summary cards and toolbars above the viewport.
*/
html body.ll-admin-shell > main,
html body.ll-admin-shell > .rcon-page-shell > main,
html body.ll-admin-shell > .page-shell > main,
html body.ll-admin-shell .admin-main,
html body.ll-admin-shell .admin-store-main,
html body.ll-admin-shell .rcon-dashboard-content,
html body.ll-admin-shell .connected-shell,
html body.ll-admin-shell .players-main,
html body.ll-admin-shell .llp-page,
html body.ll-admin-shell .llp-shell,
html body.ll-admin-shell .death-dashboard,
html body.ll-admin-shell .banner-admin-main,
html body.ll-admin-shell .banner-manager-content,
html body.ll-admin-shell .security-main,
html body.ll-admin-shell .staff-admin-page,
html body.ll-admin-shell .delivery-main,
html body.ll-admin-shell .admin-orders-section,
html body.ll-admin-shell .admin-subscriptions-section,
html body.ll-admin-shell .admin-store-main > .wrap,
html body.ll-admin-shell .admin-orders-section .wrap,
html body.ll-admin-shell .admin-subscriptions-section .wrap,
html body.ll-admin-shell .banner-admin-main .wrap,
html body.ll-admin-shell .security-main .wrap,
html body.ll-admin-shell .death-main,
html body.ll-admin-shell.admin-home-page .dashboard-main {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  top: auto !important;
}

/* Every root page starts below a visible strip of starfield. */
html body.ll-admin-shell > main,
html body.ll-admin-shell > .rcon-page-shell > main,
html body.ll-admin-shell > .page-shell > main,
html body.ll-admin-shell.admin-orders-page > .wrap,
html body.ll-admin-shell.admin-subscriptions-page > .wrap {
  padding-top: clamp(22px, 1.8vw, 30px) !important;
  padding-block-start: clamp(22px, 1.8vw, 30px) !important;
}

@media (max-width: 980px) {
  html body.ll-admin-shell > main,
  html body.ll-admin-shell > .rcon-page-shell > main,
  html body.ll-admin-shell > .page-shell > main,
  html body.ll-admin-shell.admin-orders-page > .wrap,
  html body.ll-admin-shell.admin-subscriptions-page > .wrap {
    padding-top: 18px !important;
    padding-block-start: 18px !important;
  }
}

/*
  Use the successful RCON frame everywhere:
  1500px maximum content width, 24px desktop edges before the max-width
  takes over, and 14px edges on compact screens. This changes only the
  outer page frame; each page keeps its own cards, grids, and controls.
*/
:root {
  --ll-admin-frame-max: 1500px;
  --ll-admin-frame-gutter: 48px;
  --ll-admin-frame-gutter-compact: 28px;
}

html body.ll-admin-shell .dashboard-main,
html body.ll-admin-shell .admin-main,
html body.ll-admin-shell .staff-admin-page,
html body.ll-admin-shell .rcon-dashboard-content,
html body.ll-admin-shell .llp-shell,
html body.ll-admin-shell .delivery-main,
html body.ll-admin-shell .banner-admin-main,
html body.ll-admin-shell .banner-manager-content,
html body.ll-admin-shell .security-main,
html body.ll-admin-shell main.page,
html body.ll-admin-shell main.shell,
html body.ll-admin-shell .death-main,
html body.ll-admin-shell .death-dashboard,
html body.ll-admin-shell .page-shell,
html body.ll-admin-shell > .wrap,
html body.ll-admin-shell .admin-orders-section > .wrap,
html body.ll-admin-shell .admin-subscriptions-section > .wrap,
html body.ll-admin-shell #store-manager-panel.admin-store-main {
  box-sizing: border-box !important;
  width: min(
    var(--ll-admin-frame-max),
    calc(100% - var(--ll-admin-frame-gutter))
  ) !important;
  inline-size: min(
    var(--ll-admin-frame-max),
    calc(100% - var(--ll-admin-frame-gutter))
  ) !important;
  max-width: var(--ll-admin-frame-max) !important;
  max-inline-size: var(--ll-admin-frame-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-inline: auto !important;
}

/*
  These older pages carried their own additional horizontal main padding.
  The shared frame now owns that spacing so their visible content edges line
  up with RCON instead of being inset a second time.
*/
html body.ll-admin-shell #store-manager-panel.admin-store-main,
html body.ll-admin-shell main.page,
html body.ll-admin-shell main.shell,
html body.ll-admin-shell .admin-main,
html body.ll-admin-shell .delivery-main {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-inline: 0 !important;
}

@media (max-width: 980px) {
  html body.ll-admin-shell .dashboard-main,
  html body.ll-admin-shell .admin-main,
  html body.ll-admin-shell .staff-admin-page,
  html body.ll-admin-shell .rcon-dashboard-content,
  html body.ll-admin-shell .llp-shell,
  html body.ll-admin-shell .delivery-main,
  html body.ll-admin-shell .banner-admin-main,
  html body.ll-admin-shell .banner-manager-content,
  html body.ll-admin-shell .security-main,
  html body.ll-admin-shell main.page,
  html body.ll-admin-shell main.shell,
  html body.ll-admin-shell .death-main,
  html body.ll-admin-shell .death-dashboard,
  html body.ll-admin-shell .page-shell,
  html body.ll-admin-shell > .wrap,
  html body.ll-admin-shell .admin-orders-section > .wrap,
  html body.ll-admin-shell .admin-subscriptions-section > .wrap,
  html body.ll-admin-shell #store-manager-panel.admin-store-main {
    width: calc(100% - var(--ll-admin-frame-gutter-compact)) !important;
    inline-size: calc(
      100% - var(--ll-admin-frame-gutter-compact)
    ) !important;
    max-width: var(--ll-admin-frame-max) !important;
    max-inline-size: var(--ll-admin-frame-max) !important;
  }
}

/*
  RCON used to receive the shared -150px masthead compensation twice:
  once on main and once on .rcon-dashboard-content. With the masthead removed,
  that pushed the statistics cards above the viewport. Keep the original RCON
  layout, but start it inside the page with a normal starfield gap.
*/
body.rcon-home-identical.ll-admin-shell > .rcon-page-shell > main.main {
  margin-block-start: 0 !important;
  margin-top: 0 !important;
  padding-block-start: clamp(22px, 1.8vw, 30px) !important;
  top: auto !important;
  transform: none !important;
}

body.rcon-home-identical.ll-admin-shell .rcon-dashboard-content {
  margin: 0 auto 48px !important;
  padding-block-start: 0 !important;
  top: auto !important;
  transform: none !important;
}

body.rcon-home-identical.ll-admin-shell
  .rcon-dashboard-content
  > .top-stats {
  margin-block-start: 0 !important;
  top: auto !important;
  transform: none !important;
}

/*
  Restore a guaranteed RCON starfield. The generated #starfield remains active,
  and this CSS layer supplies the same sparse stars even if its script is late.
  All page-level wrappers stay transparent; individual cards keep their styling.
*/
html body.rcon-home-identical.ll-admin-shell {
  background: #03060d !important;
}

body.rcon-home-identical.ll-admin-shell #starfield {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: transparent !important;
  pointer-events: none !important;
}

body.rcon-home-identical.ll-admin-shell #starfield .star {
  display: block !important;
  visibility: visible !important;
}

body.rcon-home-identical.ll-admin-shell > .rcon-page-shell {
  position: relative !important;
  z-index: 1 !important;
  min-height: 100dvh !important;
  background: transparent !important;
  isolation: isolate;
}

body.rcon-home-identical.ll-admin-shell > .rcon-page-shell::before {
  content: "" !important;
  display: block !important;
  visibility: visible !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  opacity: .72 !important;
  pointer-events: none !important;
  background-color: transparent !important;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .78) 0 1px, transparent 1.45px),
    radial-gradient(circle, rgba(95, 161, 255, .66) 0 1px, transparent 1.55px),
    radial-gradient(circle, rgba(126, 193, 255, .42) 0 .8px, transparent 1.35px) !important;
  background-size: 337px 223px, 491px 307px, 683px 419px !important;
  background-position: 19px 31px, 147px 83px, 283px 167px !important;
}

body.rcon-home-identical.ll-admin-shell
  > .rcon-page-shell
  > main.main,
body.rcon-home-identical.ll-admin-shell .rcon-dashboard-content,
body.rcon-home-identical.ll-admin-shell .rcon-dashboard-content > .layout,
body.rcon-home-identical.ll-admin-shell
  .rcon-dashboard-content
  > .layout
  > div,
body.rcon-home-identical.ll-admin-shell
  .rcon-dashboard-content
  > .layout
  > aside {
  position: relative !important;
  z-index: 1 !important;
  background: transparent !important;
}

/*
  Page-level wrappers must not become giant background cards.
  Keep the starfield visible and leave card styling on the actual controls.
*/
body.connected-home-identical #onlinePlayers.llp-panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.connected-home-identical #onlinePlayers.llp-panel::before,
body.connected-home-identical #onlinePlayers.llp-panel::after {
  display: none !important;
  content: none !important;
}

body.connected-home-identical #onlinePlayers > .llp-panel-head {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.rcon-home-identical
  .rcon-dashboard-content
  > .layout
  > div:first-child
  > .panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.rcon-home-identical
  .rcon-dashboard-content
  > .layout
  > div:first-child
  > .panel::before,
body.rcon-home-identical
  .rcon-dashboard-content
  > .layout
  > div:first-child
  > .panel::after {
  display: none !important;
  content: none !important;
}

body.rcon-home-identical
  .rcon-dashboard-content
  > .layout
  > div:first-child
  > .panel
  > .panel-head {
  padding-inline: 4px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.rcon-home-identical
  .rcon-dashboard-content
  > .layout
  > div:first-child
  > .panel
  > .command-wrap {
  padding-inline: 0 !important;
}

:is(
  body.ll-admin-shell,
  body.admin-home-page,
  body.admin-store-page,
  body.admin-orders-page,
  body.admin-subscriptions-page,
  body.ll-feedback-admin-theme,
  body.rcon-home-identical,
  body.connected-home-identical,
  body.banner-admin-page,
  body.admin-security,
  body.admin-staff-ids-page,
  body.staff-admin-editor-page,
  body.admin-delivery-servers-page
) :where(main, section, article, aside, header, footer, nav, form, fieldset, details, div) {
  min-inline-size: 0;
}

body.ll-admin-shell > :not(nav.ll-admin-shared-sidebar):not(#starfield):not(script):not(style),
body.ll-admin-shell main,
body.ll-admin-shell .rcon-page-shell,
body.ll-admin-shell .llp-page,
body.ll-admin-shell .admin-store-main {
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
}

body.ll-admin-shell :where(
  .dashboard-main,
  .admin-main,
  .staff-admin-page,
  .rcon-dashboard-content,
  .llp-shell,
  .delivery-main,
  .banner-admin-main,
  .security-main,
  .death-main,
  .death-dashboard,
  .admin-orders-section > .wrap,
  .admin-subscriptions-section > .wrap,
  .footerbar
) {
  inline-size: min(
    var(--ll-admin-frame-max),
    calc(100% - var(--ll-admin-frame-gutter))
  ) !important;
  min-inline-size: 0 !important;
  max-inline-size: var(--ll-admin-frame-max) !important;
  margin-inline: auto !important;
}

body.ll-admin-shell :where(
  .dash-shell,
  .dash-grid,
  .dashboard-layout,
  .dash-panel,
  .table-shell,
  .players-shell,
  .players-list,
  .players-grid,
  .llp-panel,
  .llp-redesign,
  .connected-redesign,
  .llp-workspace,
  .connected-workspace,
  .llp-roster-panel,
  .connected-list-panel,
  .llp-roster-list,
  .connected-list,
  .rcon-page-shell,
  .layout,
  .panel,
  .command-wrap,
  .command-grid,
  .server-grid,
  .server-dropdowns,
  .death-overview,
  .death-list,
  .delivery-panel,
  .delivery-list,
  .delivery-row,
  .staff-shell,
  .staff-grid,
  .admin-order-grid,
  .admin-subscription-grid,
  .admin-editor-grid,
  .product-core-grid,
  .product-reference-core-grid,
  .editor-product-reference-grid,
  .command-workbench-layout,
  .manager-redesign-shell,
  .manager-redesign-workspace,
  .store-v470-page,
  .store-v470-workspace,
  .store-v470-product-area
) {
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
}

body.ll-admin-shell :where(
  .table-shell,
  .table-wrap,
  .data-table-wrap,
  .ll-table-body,
  .players-shell,
  .admin-order-lines,
  .admin-subscription-lines
) {
  max-inline-size: 100% !important;
  overflow-x: auto !important;
  overscroll-behavior-inline: contain;
}

body.ll-admin-shell table {
  max-inline-size: 100% !important;
}

body.ll-admin-shell :where(
  img,
  video,
  canvas,
  svg,
  iframe,
  object,
  embed
) {
  max-inline-size: 100% !important;
}

body.ll-admin-shell :where(
  h1,
  h2,
  h3,
  h4,
  p,
  span,
  strong,
  small,
  code,
  pre,
  td,
  th,
  label
) {
  overflow-wrap: anywhere;
}

body.ll-admin-shell :where(
  dialog,
  [role="dialog"],
  .modal,
  .modal-card,
  .duplicate-dialog,
  .field-manager-dialog,
  .player-command-result-card,
  .player-confirm-card
) {
  inline-size: min(760px, calc(100vw - 28px));
  max-inline-size: calc(100vw - 28px) !important;
  max-block-size: calc(100dvh - 28px) !important;
  overflow: auto !important;
}

/* Connected Players: preserve the cards while changing only how many fit per row. */
body.ll-admin-shell.connected-home-identical :where(.llp-shell, .llp-panel, #playersTableWrap) {
  inline-size: 100% !important;
  max-inline-size: 100% !important;
}

body.ll-admin-shell.connected-home-identical :where(.connected-overview, .llp-summary-grid) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)) !important;
}

body.ll-admin-shell.connected-home-identical :where(.connected-list, .llp-roster-list) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
  inline-size: 100% !important;
  max-inline-size: 100% !important;
}

body.ll-admin-shell.connected-home-identical :where(.llp-player-card, .player-card) {
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
}

body.ll-admin-shell.connected-home-identical :where(.llp-card-top, .llp-card-name) {
  min-inline-size: 0 !important;
}

body.ll-admin-shell.connected-home-identical .llp-card-name {
  flex: 1 1 auto !important;
}

/* Dashboard and RCON grids adapt to the usable area beside the sidebar. */
body.ll-admin-shell .dash-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)) !important;
}

body.ll-admin-shell :where(.top-stats, .stats-strip, .admin-stats) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)) !important;
}

body.ll-admin-shell .command-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)) !important;
}

body.ll-admin-shell .server-dropdowns {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)) !important;
}

body.ll-admin-shell :where(.death-overview, .delivery-grid) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
}

/* Forms and editor panels are allowed to shrink instead of forcing the page wider. */
body.ll-admin-shell :where(
  input,
  select,
  textarea,
  button,
  .btn,
  .dash-btn,
  .dash-select
) {
  min-inline-size: 0;
  max-inline-size: 100%;
}

body.ll-admin-shell :where(
  .form-grid,
  .bulk-edit-grid,
  .bulk-scope-grid,
  .toggle-grid,
  .quick-choice-grid,
  .admin-recipe-grid,
  .admin-step-grid,
  .product-visibility-grid,
  .command-status-grid
) > * {
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
}

@media (max-width: 1700px) and (min-width: 981px) {
  body.ll-admin-shell :where(.dashboard-layout, .layout) {
    grid-template-columns: 1fr !important;
  }

  body.ll-admin-shell .staff-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
  }

  body.ll-admin-shell .delivery-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.ll-admin-shell .death-entry-summary {
    grid-template-columns: 1fr !important;
  }

  body.ll-admin-shell.connected-home-identical .p257-head {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 1320px) {
  body.ll-admin-shell .staff-grid,
  body.ll-admin-shell :where(
    .admin-editor-grid,
    .command-workbench-layout,
    .product-core-grid,
    .product-reference-core-grid,
    .editor-product-reference-grid
  ) {
    grid-template-columns: 1fr !important;
  }

  body.ll-admin-shell .delivery-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.ll-admin-shell.connected-home-identical :where(.manual-banlist-row, .llp-toolbar) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.ll-admin-shell.connected-home-identical :where(.p257-panels, .p257-head-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  body.ll-admin-shell > main,
  body.ll-admin-shell > .rcon-page-shell > main,
  body.ll-admin-shell > .page-shell > main {
    padding-block-start: 18px !important;
  }

  body.ll-admin-shell :where(
    .dashboard-main,
    .admin-main,
    .admin-store-main,
    .staff-admin-page,
    .rcon-dashboard-content,
    .llp-shell,
    .delivery-main,
    .banner-admin-main,
    .security-main,
    .death-main,
    .death-dashboard,
    .admin-orders-section > .wrap,
    .admin-subscriptions-section > .wrap,
    .footerbar
  ) {
    inline-size: calc(
      100% - var(--ll-admin-frame-gutter-compact)
    ) !important;
    max-inline-size: var(--ll-admin-frame-max) !important;
  }

  body.ll-admin-shell.connected-home-identical :where(.manual-banlist-row, .llp-toolbar) {
    grid-template-columns: 1fr !important;
  }

  body.ll-admin-shell .delivery-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 680px) {
  body.ll-admin-shell.connected-home-identical :where(
    .connected-overview,
    .llp-summary-grid,
    .connected-list,
    .llp-roster-list,
    .llp-card-grid,
    .p257-panels,
    .p257-head-grid,
    .p257-panel-grid
  ) {
    grid-template-columns: 1fr !important;
  }

  body.ll-admin-shell :where(
    .dash-grid,
    .top-stats,
    .stats-strip,
    .admin-stats,
    .command-grid,
    .server-dropdowns,
    .death-overview,
    .delivery-grid,
    .staff-toolbar,
    .staff-stat-grid
  ) {
    grid-template-columns: 1fr !important;
  }

  body.ll-admin-shell :where(
    .panel-head,
    .llp-panel-head,
    .connected-list-head,
    .llp-roster-head,
    .delivery-head,
    .staff-hero,
    .staff-card-head
  ) {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
}
