.mochila-i01.screen {
  --i01-ink: #fff1d1;
  --i01-line: #9d8252;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
  gap: 0;
  color: var(--i01-ink);
  background: #243b32;
  font: 1rem/1.3 system-ui, sans-serif;
}
.mochila-i01 [hidden] { display: none !important; }
.mochila-i01 h1, .mochila-i01 h2 { margin: 0; color: #f4d695; font: bold 1.18em/1.12 Georgia, serif; }
.i01-head {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 44px;
  align-items: center;
  gap: 9px;
  padding: 4px 8px;
  border-bottom: 1px solid #7c6a44;
  background: #1c3028;
}
.mochila-i01 button, .mochila-i01 summary {
  min-width: 44px;
  min-height: 44px;
  font-size: inherit;
  line-height: 1.16;
  white-space: normal;
  overflow-wrap: anywhere;
}
.mochila-i01 :is(button, summary, .i01-scroll):focus-visible {
  outline: 2px solid #ffe2a1;
  outline-offset: -2px;
}
.i01-head button, .i01-panel header button {
  padding: 4px 7px;
  background: #293f34;
  color: #ffe4a7;
  border: 1px solid var(--i01-line);
  border-radius: 6px;
  font-weight: 700;
}
.i01-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.i01-stage picture, .i01-stage picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.i01-categorias {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: min(30rem, calc(100% - 16px));
  transform: translateX(-50%);
}
.i01-categorias .bagtabs { display: flex; flex-wrap: wrap; gap: 4px; border: 0; background: none; overflow: visible; }
.i01-categorias .bagtabs button {
  flex: 1 1 auto; padding: 7px; border: 1px solid var(--i01-line);
  border-radius: 7px; color: #f5deb0; background: #22392eea;
}
.i01-categorias .bagtabs button.active { background: #63502e; }
.i01-categorias .bagtabs i { font-size: .8em; display: inline-block; }
.i01-panel {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: min(35rem, calc(100% - 16px));
  max-height: calc(100% - 16px);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 4px;
  padding: 6px 9px;
  background: #1c3028;
  border: 1px solid var(--i01-line);
  border-radius: 8px;
  box-shadow: 0 4px 10px #101d16bd;
}
.i01-panel header { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.i01-panel header > div { display: flex; gap: 4px; flex: none; }
.i01-panel h2 { min-width: 0; overflow-wrap: anywhere; }
.i01-scroll.bag {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #b39256 #22352c;
  scrollbar-gutter: stable;
  padding: 2px 3px;
}
.i01-hint { margin: 0; color: #e0cb9d; font-size: .78em; }
.mochila-i01 .baggrid {
  grid-template-columns: repeat(auto-fill, minmax(52px,1fr));
  grid-auto-rows: minmax(54px,auto);
  max-height: none;
  overflow: visible;
}
.mochila-i01 .bcell { width: 100%; height: auto; aspect-ratio: auto; min-height: 54px; }
.mochila-i01 .bcell .bt,.mochila-i01 .bcell .bq,.mochila-i01 .bcell .bu { font-size: .78em; }
.mochila-i01 .bagbulk { margin-top: 7px; grid-template-columns: repeat(auto-fit,minmax(min(100%,11em),1fr)); }
.mochila-i01 .bagtools .chips { flex-wrap: wrap; }
.mochila-i01 .bagtools .chip { min-width: 44px; min-height: 44px; }
.mochila-i01 .bagtools .chip i { font-size: .8em; }
.mochila-i01 .bagdetail { padding: 0; max-height: none; border: 0; box-shadow: none; background: none; overflow: visible; }
.mochila-i01 .bdhead { grid-template-columns: 54px minmax(0,1fr); gap: 8px; align-items: start; }
.mochila-i01 .bdico { width: 54px; height: 54px; }
.mochila-i01 .bdhead b { font-size: 1.04em; overflow-wrap: anywhere; }
.mochila-i01 .bdhead small b { display: inline; font-size: inherit; }
.mochila-i01 .bdhead small, .mochila-i01 .hold, .mochila-i01 .bacts small, .mochila-i01 .bacts .note,
.mochila-i01 .bstats, .mochila-i01 .bstats small, .mochila-i01 .bstats .fx, .mochila-i01 .bcmp small,
.mochila-i01 .bcmp .crow, .mochila-i01 .bwho .lbl, .mochila-i01 .nofit summary { font-size: .9em; overflow-wrap: anywhere; }
.mochila-i01 .bstats small, .mochila-i01 .nofit summary { color: #b2b9a4; }
.mochila-i01 .axes { grid-template-columns: repeat(auto-fit,minmax(min(100%,6.2em),1fr)); }
.mochila-i01 .ax :is(b,small,em) { font-size: .8em; white-space: normal; overflow-wrap: anywhere; letter-spacing: 0; }
.mochila-i01 .whorow { flex-wrap: wrap; overflow: visible; }
.mochila-i01 .whob { flex-basis: max(70px,5em); max-width: 100%; }
.mochila-i01 .whob :is(small,.wslot,.d) { font-size: .74em; white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.mochila-i01 .bacts button { max-width: 100%; }
.mochila-i01 .i01-scroll p { margin: 0 0 .55em; }
body:has(#modal[open][data-i01-confirm]) .mochila-i01 .i01-panel { visibility: hidden; }
dialog#modal[open][data-i01-confirm] {
  display: grid;
  grid-template-rows: minmax(0,1fr) auto auto;
  width: min(34rem, calc(100vw - 16px));
  max-width: 544px;
  max-height: calc(100dvh - 16px);
  padding: 8px 10px;
  margin: auto;
  overflow: hidden;
  font: 1rem/1.28 system-ui,sans-serif;
  text-align: left;
}
dialog#modal[data-i01-confirm] #modalBody { min-height: 0; overflow: auto; scrollbar-color: #b39256 #22352c; scrollbar-gutter: stable; }
dialog#modal[data-i01-confirm] #modalBody:focus-visible { outline: 2px solid #ffe2a1; outline-offset: -2px; }
dialog#modal[data-i01-confirm] .modalbuttons { flex-wrap: wrap; max-height: 55dvh; overflow: auto; }
dialog#modal[data-i01-confirm] :is(p,small,.note,.delta) { font-size: .9em; overflow-wrap: anywhere; }
dialog#modal[data-i01-confirm] .i01-confirm-hint { margin: 4px 0; color: #e0cb9d; font-size: .78em; }
dialog#modal[data-i01-confirm] h2 { font-size: 1.18em; overflow-wrap: anywhere; }
dialog#modal[data-i01-confirm] button { min-width: 44px; min-height: 44px; font-size: inherit; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 480px) and (orientation: portrait) {
  .i01-panel { max-height: min(86%,calc(100% - 12px)); right: 6px; width: calc(100% - 12px); }
}
@media (max-width: 360px) {
  .i01-panel header { flex-wrap: wrap; }
  .i01-panel header > div { margin-inline-start: auto; }
}
@media (min-width: 550px) and (max-height: 380px) and (orientation: landscape) {
  .mochila-i01 { --i01-side: 172px; }
  .i01-stage picture img { object-position: center 58%; }
  .mochila-i01:has(.i01-panel:not([hidden])) { grid-template: minmax(0,1fr) / var(--i01-side) minmax(0,1fr); }
  .mochila-i01:has(.i01-panel:not([hidden])) .i01-head {
    grid-area: 1 / 1;
    z-index: 1;
    grid-template: auto auto / 44px minmax(44px,1fr);
    align-content: start;
    padding: 6px;
    gap: 6px;
  }
  .mochila-i01:has(.i01-panel:not([hidden])) .i01-head h1 { grid-area: 2 / 1 / 3 / -1; }
  .mochila-i01:has(.i01-panel:not([hidden])) #heroesHelp { justify-self: end; width: 44px; }
  .mochila-i01:has(.i01-panel:not([hidden])) .i01-stage { grid-area: 1 / 1 / 2 / -1; }
  .i01-panel { width: calc(100% - var(--i01-side) - 16px); }
}
