/* Equal-size feed reward tiles; load after the existing presentation styles.
   Keep the renderer's row grouping and reward order, but share one sizing grid.
   Two half-columns per tile let a shorter final row remain centered. */
html[data-design="pocket-playground"] body main #grid .referenceCard.editorialEvent.materialEvent.panoramaCard .referenceDescription {
 white-space:normal!important;text-wrap:pretty!important;overflow-wrap:break-word;line-height:1.35!important;
}
html[data-design="pocket-playground"] body main #grid .referenceCard.editorialEvent.materialEvent.panoramaCard[data-feed-previews="3"] .referenceReward {
 width:clamp(42px,12cqw,64px)!important;
}
html[data-design="pocket-playground"] body main #grid .referenceCard.editorialEvent.materialEvent.panoramaCard .referenceReward.portraitReward>button {
 padding:5px!important;
}
html[data-design="pocket-playground"] body main #grid .referenceCard.editorialEvent.materialEvent.panoramaCard .referenceReward.portraitReward>button img {
 border-radius:50%!important;object-fit:cover!important;background:linear-gradient(145deg,#fbf6ff,#d8d5ef)!important;
 box-shadow:0 0 0 1px #fff9,0 2px 4px #26334d22;
}
@supports selector(:has(*)) {
  html #grid .hasRewardDrawer > .questRewardDrawer > .questRewardGrid.balancedQuestRewards {
    --reward-max-columns: 4;
    display: grid;
    grid-template-columns: repeat(calc(2 * var(--reward-max-columns)), minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: minmax(min-content, 1fr);
    align-items: stretch;
    gap: 6px;
  }

  html #grid .balancedQuestRewards:has(> .questRewardRow:first-child[data-reward-columns="2"]) {
    --reward-max-columns: 2;
  }

  html #grid .balancedQuestRewards:has(> .questRewardRow:first-child[data-reward-columns="3"]) {
    --reward-max-columns: 3;
  }

  html #grid .balancedQuestRewards:has(> .questRewardRow:first-child[data-reward-columns="5"]) {
    --reward-max-columns: 5;
  }

  html #grid .questRewardDrawer > .balancedQuestRewards > .questRewardRow {
    display: contents;
    --reward-row-start: calc(var(--reward-max-columns) - var(--reward-columns) + 1);
  }

  html #grid .questRewardDrawer > .balancedQuestRewards > .questRewardRow > .questRewardTile {
    grid-column: span 2;
    min-width: 0;
    min-height: min-content;
    align-self: stretch;
  }

  html #grid .questRewardDrawer > .balancedQuestRewards > .questRewardRow > .questRewardTile:first-child {
    grid-column: var(--reward-row-start) / span 2;
  }

  html #grid .questRewardDrawer > .balancedQuestRewards > .questRewardRow > .questRewardTile > :is(button, .staticDetailLink) {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 4px 3px;
  }

  html #grid .questRewardDrawer > .balancedQuestRewards > .questRewardRow > .questRewardTile :is(img, svg.rewardCrop, .unknownReward) {
    flex: none;
    width: 100%;
    height: 30px;
    object-fit: contain;
  }

  html #grid .questRewardDrawer > .balancedQuestRewards > .questRewardRow > .questRewardTile :is(strong, small, .questRewardStatus) {
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
  }

  @media (max-width: 750px) {
    html #grid .hasRewardDrawer > .questRewardDrawer > .questRewardGrid.balancedQuestRewards {
      gap: 4px;
    }

    html #grid .questRewardDrawer > .balancedQuestRewards > .questRewardRow > .questRewardTile > :is(button, .staticDetailLink) {
      padding: 3px 2px;
      gap: 2px;
    }
  }
}
