/* Forest Frontier v0.9.24 — real mobile viewport repair and checkpoint QA stock. */

body.theme-ashen .inventory-category-toolbar { display: block; }
body.theme-ashen .inventory-items-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(118px, 154px);
  align-items: center;
  gap: 8px;
}
body.theme-ashen .inventory-items-heading > small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.theme-ashen .inventory-items-heading .inventory-sort-compact {
  justify-self: end;
  width: 100%;
}
body.theme-ashen .inventory-category-scroll {
  width: 100%;
  box-sizing: border-box;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
}
body.theme-ashen .inventory-category-button { scroll-snap-align: start; }

@media (max-width: 759px) {
  @supports (height: 100dvh) {
    body.theme-ashen.screen-hero-active,
    body.theme-ashen.screen-inventory-active {
      height: 100dvh;
      min-height: 100dvh;
      overflow: hidden;
    }
    body.theme-ashen.screen-hero-active .app,
    body.theme-ashen.screen-inventory-active .app {
      height: 100dvh;
      max-height: 100dvh;
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-y: contain;
      box-sizing: border-box;
      padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 24px);
      scroll-padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 24px);
    }
  }

  body.theme-ashen.screen-inventory-active .inventory-screen-panel {
    min-height: calc(100dvh - 118px);
    padding: 7px 8px calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 20px);
  }
  body.theme-ashen.screen-inventory-active .inventory-title-row h2 { font-size: 23px; }
  body.theme-ashen.screen-inventory-active .inventory-mode-tabs { margin-bottom: 4px; }
  body.theme-ashen.screen-inventory-active .inventory-mode-tab { min-height: 33px; }
  body.theme-ashen.screen-inventory-active .inventory-category-toolbar { width: 100%; }
  body.theme-ashen.screen-inventory-active .inventory-category-scroll {
    gap: 3px;
    padding: 4px 16px 4px 4px;
  }
  body.theme-ashen.screen-inventory-active .inventory-category-button {
    flex: 0 0 46px;
    min-height: 38px;
  }
  body.theme-ashen.screen-inventory-active .inventory-category-button > span { font-size: 16px; }
  body.theme-ashen.screen-inventory-active .inventory-category-button small { font-size: 6.5px; }
  body.theme-ashen.screen-inventory-active .inventory-items-heading {
    grid-template-columns: auto minmax(0,1fr) 108px;
    gap: 5px;
    min-height: 35px;
    padding-inline: 2px;
  }
  body.theme-ashen.screen-inventory-active .inventory-items-heading > span { white-space: nowrap; }
  body.theme-ashen.screen-inventory-active .inventory-items-heading > small {
    font-size: 7px;
    text-align: right;
  }
  body.theme-ashen.screen-inventory-active .inventory-items-heading .inventory-sort-compact {
    padding: 2px;
    border-radius: 8px;
  }
  body.theme-ashen.screen-inventory-active .inventory-items-heading .inventory-sort-compact > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  body.theme-ashen.screen-inventory-active .inventory-items-heading .inventory-sort-compact select {
    min-height: 31px;
    padding: 4px 19px 4px 6px;
    font-size: 8px;
  }
  body.theme-ashen.screen-inventory-active .inventory-list-pane { gap: 5px; }
  body.theme-ashen.screen-inventory-active .inventory-inline-detail {
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 8px);
    max-height: min(74dvh, 620px);
  }
}

@media (max-width: 374px) {
  body.theme-ashen.screen-inventory-active .inventory-items-heading {
    grid-template-columns: auto minmax(0,1fr) 102px;
  }
  body.theme-ashen.screen-inventory-active .inventory-items-heading > small { display: none; }
  body.theme-ashen.screen-inventory-active .inventory-category-button { flex-basis: 45px; }
}
