/* Styles owned by the battle section. */
@media (max-width: 680px) {
.battle-switch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}
.battle-switch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 250px));
  justify-content: center;
  gap: 10px;
}

.active-battle-return {
  display: flex;
  justify-content: center;
  width: min(var(--content-width), 100%);
  margin: -8px auto 22px;
}
.active-battle-return-button {
  min-height: 48px;
  padding: 10px 24px;
  border-width: 2px;
  font-size: 16px;
  box-shadow: none;
}
.battle-mobile-tabs {
  display: none;
}
.battle-mobile-tab {
  box-shadow: none;
}
.battle-mobile-tab:hover:not(:disabled) {
  transform: none;
  filter: none;
}
.battle-inventory-panel {
  width: min(var(--section-width), 100%);
  justify-self: center;
  min-height: 410px;
  padding: 22px;
}
.battle-inventory-mobile-stack {
  display: none;
}
.battle-inventory-item-readonly {
  cursor: default;
}
.battle-opponent-inventory-panel .stack-title {
  margin: 0 0 16px;
  text-align: center;
}
.battle-move-preview {
  cursor: default;
  pointer-events: none;
}
.battle-layout {
  display: grid;
  gap: 20px;
  width: min(var(--box-layout-width), 100%);
  margin-inline: auto;
  --battle-stage-min-height: 514px;
  --battle-roster-card-min-height: 0px;
  --pokemon-center-card-width: 250px;
}
.battle-start-panel {
  display: grid;
  gap: 8px;
}
.battle-start-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.battle-stage {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.82fr);
  justify-content: center;
  align-items: stretch;
  width: 100%;
}
.battle-field-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 25px;
  min-width: 0;
  min-height: var(--battle-stage-min-height);
  padding: 14px;
}
.battle-rosters {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  align-items: stretch;
  width: 100%;
}
.battle-field-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.battle-field-slot-label {
  margin: 0;
  font-size: 15px;
  text-align: center;
}
.battle-info-card {
  width: 100%;
  min-width: 0;
  height: var(--battle-stage-min-height);
  overflow: hidden;
}
.battle-stage > .battle-info-card {
  min-height: var(--battle-stage-min-height);
  overflow: hidden;
}
.battle-field-slot > .pokemon-card-battle {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 14px;
  gap: 10px;
}
.battle-field-slot > .battle-empty-slot {
  display: grid;
  place-items: center;
  align-content: center;
  background: transparent;
  border: 1px dashed rgba(38, 63, 77, 0.34);
  box-shadow: none;
  box-sizing: border-box;
  min-height: 100%;
  padding: 40px;
}
.battle-empty-slot-message {
  margin: 0;
  color: var(--text-strong);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}
.battle-stage > .battle-info-card .panel-inner {
  height: 100%;
}
.battle-info-inner {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.battle-info-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
}
.battle-info-tab {
  min-width: 92px;
  box-shadow: none;
}
.battle-info-tab:hover:not(:disabled) {
  transform: none;
  box-shadow: none;
  filter: none;
}
.battle-info-body {
  display: grid;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.battle-info-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
}
.battle-abandon-actions {
  gap: 10px;
}
.battle-authoritative-uncertain-message {
  flex: 1 1 100%;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.battle-abandon-confirm-text {
  flex: 1 1 100%;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.battle-info-pane {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.battle-info-pane:not(.is-active) {
  visibility: hidden;
  pointer-events: none;
}
.battle-info-pane.is-active {
  z-index: 1;
}
.battle-log-pane.is-active {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.battle-rosters .stack-title {
  margin: 0;
  text-align: center;
}
.battle-rosters > .panel {
  width: 100%;
  overflow: hidden;
}
.battle-rosters > .panel > .panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}
.mini-roster {
  display: flex;
  gap: 12px;
  flex: 1 1 auto;
  align-items: stretch;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 8px 12px;
}
.mini-roster .pokemon-card-frame {
  flex: 0 0 var(--pokemon-center-card-width);
  width: var(--pokemon-center-card-width);
  max-width: none;
  min-height: calc(var(--battle-roster-card-min-height) + 46px);
  overflow: visible;
}
.mini-roster .pokemon-card-frame > .pokemon-card {
  flex: 1 1 auto;
  min-height: var(--battle-roster-card-min-height);
}
.battle-roster-entry:has(.pokemon-card-external) {
  min-height: calc(var(--battle-roster-card-min-height) + 46px);
  padding-bottom: 46px;
}
.battle-roster-entry-footer-placeholder .pokemon-card-external {
  visibility: hidden;
  pointer-events: none;
}
.battle-roster-entry .pokemon-card-external-meta .status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  border: 1px solid rgba(38, 63, 77, 0.58);
  padding: 8px 11px;
  font-size: 11px;
  font-weight: 800;
}
.battle-roster-entry .pokemon-card-external-actions .button {
  min-height: 35px;
  padding: 8px 16px;
  box-shadow: none;
  font-size: 11.5px;
  font-weight: 800;
}
.battle-active-hp .hp-label {
  display: none;
}
.battle-card-moves {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  width: 100%;
}
.battle-ko-switch-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 12px;
}
.battle-ko-switch-panel {
  display: grid;
  gap: 10px;
  width: min(100%, 340px);
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-panel);
  background: var(--surface-raised);
  box-shadow:
    inset 0 0 0 1px rgba(214, 150, 104, 0.16),
    0 14px 30px rgba(31, 37, 40, 0.2);
  backdrop-filter: blur(3px);
}
.battle-context-choice-panel {
  overflow: hidden;
}
.battle-ko-switch-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  text-align: center;
}
.battle-ko-switch-panel .battle-switch-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.battle-ko-switch-panel .battle-switch-grid-count-1 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.battle-ko-switch-panel .battle-switch-grid-count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.battle-context-choice-option {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: var(--surface-panel);
  color: var(--text);
  box-shadow: none;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}
.battle-context-choice-option:hover:not(:disabled),
.battle-context-choice-option:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-raised);
  outline: none;
  box-shadow: var(--focus-ring), 0 7px 14px rgba(61, 96, 128, 0.14);
}
.battle-context-choice-option:disabled {
  cursor: not-allowed;
}
.battle-context-choice-option.is-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.36);
}
.battle-switch-choice.is-ko {
  opacity: 0.45;
  color: #888;
}
.battle-entry-choice-panel {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  width: min(100%, 360px);
}
.battle-entry-choice-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.battle-entry-choice-heading h3 {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 13px;
  text-align: left;
}
.battle-entry-choice-item-image {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: auto;
}
.battle-entry-choice-eyebrow {
  display: block;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}
.battle-entry-choice-copy,
.battle-entry-choice-subtitle,
.battle-entry-choice-required {
  margin: 0;
}
.battle-entry-choice-copy {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.3;
}
.battle-entry-choice-subtitle {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}
.battle-entry-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-height: 0;
  padding: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.battle-entry-choice-required {
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}
.battle-entry-choice-actions {
  display: flex;
  justify-content: center;
}
.log-list,
.summary-list {
  display: grid;
  gap: 10px;
}
.battle-summary-pane .summary-group {
  box-shadow: none;
}
.battle-summary-pane .summary-group:nth-last-child(1) {
  order: 1;
}
.battle-summary-pane .summary-group:nth-last-child(2) {
  order: 2;
}
.log-list {
  gap: 4px;
}
.log-panel {
  flex: 1 1 auto;
  box-sizing: border-box;
  min-height: 0;
  padding-bottom: 6px;
  overflow-y: scroll;
  overflow-x: hidden;
}
.battle-log-pane .log-panel {
  width: 100%;
  height: 100%;
}
.log-line {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(31, 37, 40, 0.05);
  font-size: 12.5px;
}
.log-turn-group {
  display: grid;
  gap: 6px;
}
.log-turn-title,
.log-turn-entry {
  margin: 0;
}
.log-turn-title {
  color: var(--text);
  font-weight: 700;
  text-align: center;
}
.log-turn-entry {
  color: var(--text-soft);
}
.battle-turn-button {
  justify-self: center;
  padding: 5px 14px;
  border: 1px solid var(--text-soft);
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.battle-turn-button:hover:not(:disabled),
.battle-turn-button:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}
.battle-turn-button:disabled {
  border-color: transparent;
  cursor: default;
}
.battle-history-notice {
  margin: 0;
  text-align: center;
  color: var(--text-soft);
}
.log-turn-team {
  color: var(--text);
  font-weight: 700;
}
.log-line.is-divider {
  background: transparent;
  padding: 1px 0;
}
.battle-admin-thinking-log {
  border: 1px solid rgba(143, 105, 42, 0.38);
  background: rgba(255, 231, 170, 0.46);
  color: var(--text);
  font-weight: 700;
}
.battle-info-card .summary-group h3 {
  font-size: 13px;
}
.move-button.battle-item {
  width: 100%;
  min-height: 63px;
  padding: 8px 10px;
  border: 1px solid rgba(31, 37, 40, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.66);
  font-weight: 700;
  text-align: left;
  cursor: default;
}
.move-button.battle-item:hover {
  background: rgba(255, 255, 255, 0.76);
}
.move-button.battle-item .move-name {
  display: inline-block;
  width: 100%;
}
.move-button.battle-item .move-name strong {
  font-weight: 700;
}
.move-button.battle-item .move-effect {
  font-style: italic;
  font-weight: 400;
}
.pokemon-card-battle,
.battle-info-card {
  min-height: 0;
}
.pokemon-card-battle {
  position: relative;
}
.pokemon-card-battle-active {
  width: 100%;
  max-width: none;
}
.pokemon-card-battle-active .move-button:hover:not(:disabled),
.pokemon-card-battle-active .move-button:focus-visible:not(:disabled) {
  box-shadow: var(--shadow-soft-hover), 0 7px 14px rgba(61, 96, 128, 0.12);
}
.pokemon-card-battle-active .move-button.is-disabled:disabled {
  border-color: rgba(99, 109, 117, 0.34);
  background: #e0e4e7;
  color: #6f7880;
  filter: grayscale(0.75);
}
.pokemon-card-battle.has-battle-actions,
.pokemon-card-battle.has-battle-previews {
  padding-bottom: 10px;
}
.pokemon-card-battle.has-battle-actions .battle-card-moves,
.pokemon-card-battle.has-battle-previews .battle-card-moves {
  position: static;
  width: auto;
  z-index: 2;
}
.pokemon-card-battle .move-button {
  height: 58px;
}
.mini-roster > .pokemon-card-frame {
  height: auto;
}
@media (max-width: 1150px) {
  .battle-inventory-panel {
    width: min(calc((var(--pokemon-card-width) * 2) + var(--zone-card-gap) + 96px), 100%);
  }

  .battle-field-slot > .pokemon-card-battle {
    height: auto;
  }

  .mini-roster {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .battle-layout {
    width: min(var(--box-layout-width), 100%);
  }

  .battle-stage {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    --battle-stage-min-height: 0;
  }

  .battle-stage > .battle-info-card {
    align-self: start;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .battle-stage > .battle-info-card .panel-inner {
    height: 100%;
    padding: 15px;
  }

  .battle-info-inner {
    height: 100%;
  }

  .battle-info-body {
    position: relative;
    display: grid;
    flex: 1 1 auto;
  }

  .battle-info-pane {
    grid-area: 1 / 1;
  }

  .battle-info-pane:not(.is-active) {
    position: static;
  }

  .battle-info-pane.is-active {
    position: static;
  }

  .battle-info-body {
    max-height: calc(100dvh - 160px);
  }

  .battle-summary-pane.is-active {
    overflow: auto;
  }

  .battle-summary-pane.is-active ~ .battle-log-pane:not(.is-active) {
    height: 0;
    overflow: hidden;
  }

  .battle-log-pane {
    position: static;
  }

  .battle-log-pane.is-active {
    position: absolute;
    inset: 0;
    height: auto;
    display: flex;
    min-height: 0;
    overflow: hidden;
    z-index: 1;
  }

  .battle-summary-pane .summary-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .battle-log-pane .log-panel {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .battle-log-pane .log-list {
    display: flex;
    align-items: flex-start;
    width: max-content;
    min-width: 100%;
    min-height: 100%;
  }

  .battle-log-pane .log-turn-group {
    flex: 0 0 280px;
    align-self: flex-start;
    align-content: start;
    overflow-y: visible;
  }

  .battle-log-pane .log-line.is-divider {
    flex: 0 0 18px;
    width: 18px;
    padding: 0;
  }

  .battle-inventory-panel,
  .battle-inventory-stack {
    width: 100%;
  }

  .pokemon-card-battle .move-button {
    height: auto;
    min-height: clamp(52px, 5.6vw, 64px);
  }
}
@media (min-width: 881px) and (max-width: 1150px) {
  .battle-info-body {
    max-height: none;
  }

  .battle-summary-pane .summary-group-weather {
    grid-column: 1 / -1;
    justify-self: center;
    width: max-content;
    max-width: 100%;
  }
}
@media (max-width: 880px) {
  .battle-field-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-summary-pane .summary-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-log-pane .log-panel {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .battle-log-pane .log-list {
    display: grid;
    width: auto;
    min-width: 0;
    height: auto;
  }

  .battle-log-pane .log-turn-group {
    flex: none;
    overflow: visible;
  }

  .battle-log-pane .log-line.is-divider {
    flex: none;
    width: auto;
    padding: 1px 0;
  }
}
@media (min-width: 681px) and (max-width: 1150px) {
  .battle-stage {
    align-items: stretch;
  }

  .battle-field-slot > .pokemon-card-battle {
    align-self: stretch;
  }
}
@media (max-width: 680px) {
  .battle-layout {
    --battle-mobile-panel-gap: 5px;
    grid-template-columns: minmax(0, min(var(--pokemon-card-width), 100%));
    justify-content: center;
    justify-items: center;
    gap: var(--battle-mobile-panel-gap);
  }

  .battle-stage {
    grid-template-columns: minmax(0, min(var(--pokemon-card-width), 100%));
    justify-content: center;
    justify-items: center;
    width: min(var(--pokemon-card-width), 100%);
    row-gap: 0;
  }

  .battle-field-panel {
    grid-template-columns: minmax(0, 1fr);
    width: min(var(--pokemon-card-width), 100%);
  }

  .battle-stage > .battle-info-card {
    width: min(var(--pokemon-card-width), 100%);
    margin-top: var(--battle-mobile-panel-gap);
  }

  .battle-info-body {
    max-height: calc(100dvh - 240px);
  }

  .battle-inventory-panel {
    width: min(var(--pokemon-card-width), 100%);
    min-height: 0;
  }

  .battle-mobile-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: min(var(--pokemon-card-width), 100%);
    margin: 20px 0 0;
  }

  .battle-layout[data-battle-active-panel] [data-battle-panel-section] {
    display: none;
  }
  .battle-layout[data-battle-active-panel="info"] [data-battle-panel-section="info"] {
    display: block;
  }
  .battle-layout[data-battle-active-panel="teams"] [data-battle-panel-section="teams"] {
    display: grid;
  }
  .battle-layout[data-battle-active-panel="items"] [data-battle-panel-section="items"] {
    display: block;
  }

  .battle-layout[data-battle-active-panel="items"] .battle-inventory-desktop-stack {
    display: none;
  }
  .battle-layout[data-battle-active-panel="items"] .battle-inventory-mobile-stack {
    display: block;
    max-height: calc(100dvh - 180px);
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/* --- Battle Zaino labels --- */
.battle-inventory-panel .battle-zaino-stack {
  display: grid;
  gap: var(--zone-card-gap);
  align-items: start;
  width: 100%;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 341px), 1fr));
  align-content: start;
  justify-content: center;
  justify-items: center;
  overflow: visible;
  padding-inline: max(16px, var(--box-scrollbar-safe-space));
}

.battle-inventory-panel .battle-inventory-mobile-stack {
  display: none;
}

.battle-zaino-pocket {
  box-sizing: border-box;
  container-type: inline-size;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8.5px;
  width: 100%;
  min-width: 0;
  max-width: 340px;
  height: 360px;
  padding: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.battle-zaino-pocket-title {
  margin: 0;
  justify-self: center;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: justify;
}

.battle-zaino-pocket-scroll {
  overflow-y: auto;
  overflow-x: hidden;
}

.battle-zaino-item-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  gap: 8.5px;
}

.battle-zaino-empty {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  text-align: center;
}

.battle-inventory-entry {
  display: block;
  width: 100%;
  margin: 0;
}

.battle-zaino-item-card {
  box-sizing: border-box;
  display: grid;
  grid-template-areas:
    "media name"
    "media desc";
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  column-gap: 0;
  row-gap: 0;
  width: 100%;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  box-shadow: none;
}

.battle-zaino-item-media {
  grid-area: media;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: minmax(44px, 1fr) auto;
  align-items: center;
  justify-items: center;
  min-width: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: center;
}

.battle-zaino-item-copy {
  display: contents;
}

.battle-zaino-item-heading {
  grid-area: name;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 7.5px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
}

.battle-zaino-item-name,
.battle-zaino-item-description {
  margin: 0;
}

.battle-zaino-item-name {
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
  text-align: justify;
}

.battle-zaino-item-description {
  grid-area: desc;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  padding: 6px 7.5px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  font-size: 11px;
  text-align: justify;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.battle-zaino-item-image {
  display: block;
  object-fit: contain;
  justify-self: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  image-rendering: auto;
}

.battle-zaino-item-image-mt {
  width: auto;
  height: auto;
  max-width: 39px;
  max-height: 39px;
  min-width: 0;
}

.battle-zaino-item-image-empty {
  border-radius: var(--radius-sm);
  background: rgba(31, 37, 40, 0.08);
}

.battle-zaino-item-availability {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
}

.battle-zaino-item-quantity {
  display: inline-grid;
  place-items: center;
  padding: 2px 6px 4px 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: none;
  font-size: 12px;
  white-space: nowrap;
}

.battle-zaino-item-heading .battle-inventory-use {
  align-self: center;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  height: 22px;
  min-height: 0;
  margin: 0;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .battle-layout[data-battle-active-panel="items"] .battle-inventory-mobile-stack {
    display: block;
  }

  .battle-layout[data-battle-active-panel="items"] .battle-zaino-pocket {
    display: grid;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 350px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    container-type: normal;
  }

  .battle-layout[data-battle-active-panel="items"] .battle-zaino-pocket-title {
    display: none;
  }

  .battle-layout[data-battle-active-panel="items"] .battle-zaino-pocket-scroll {
    overflow: visible;
  }

  .battle-layout[data-battle-active-panel="items"] .battle-zaino-item-grid {
    gap: 6px;
  }

  .battle-layout[data-battle-active-panel="items"] .battle-inventory-entry {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

/* Opponent presentation belongs to the battle screen. */
.battle-opponent-panel {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  width: min(360px, 100%);
  margin: 0 auto 12px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
}
.battle-opponent-media {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  height: 72px;
}
.battle-opponent-sprite {
  width: 82px;
  height: 72px;
  object-fit: contain;
  object-position: center bottom;
}
.battle-opponent-panel p,
.battle-opponent-panel h2 {
  margin: 0;
}
.battle-opponent-panel p {
  color: var(--text-soft);
  font-size: 12px;
}
.battle-opponent-panel h2 {
  font-size: 18px;
}
