/* Arena Teney — Shop S1.4 merchant tiles 0218s14r04
 * Presentation-only override over canonical ui007 cards.
 * 2-column iPhone-first stock grid; no catalogue/economy/purchase/modal/HUD/dock/X-lock ownership.
 */

@media (max-width: 960px) {
  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-items {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
    gap: 11px !important;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item] {
    position: relative;
    display: flex !important;
    flex-direction: column;
    min-width: 0;
    min-height: 258px;
    height: 100%;
    padding: 12px 11px 11px;
    overflow: hidden;
    border: 1px solid rgba(166, 132, 79, .44);
    border-radius: 16px;
    background:
      radial-gradient(circle at 50% -8%, rgba(224, 178, 97, .12), transparent 38%),
      radial-gradient(circle at 115% 105%, rgba(116, 72, 30, .10), transparent 44%),
      linear-gradient(158deg, rgba(31, 25, 18, .995), rgba(11, 10, 8, .998) 63%, rgba(7, 7, 6, 1));
    box-shadow:
      inset 0 1px 0 rgba(255, 238, 204, .045),
      inset 0 0 0 1px rgba(255, 214, 145, .018),
      inset 0 -34px 44px rgba(0, 0, 0, .18),
      0 10px 26px rgba(0, 0, 0, .26);
    isolation: isolate;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item]::before {
    content: '';
    position: absolute;
    z-index: 0;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    opacity: .78;
    background: linear-gradient(90deg, transparent, rgba(236, 192, 112, .68), transparent);
    pointer-events: none;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item]::after {
    content: '';
    position: absolute;
    z-index: 0;
    inset: 5px;
    border: 1px solid rgba(226, 181, 105, .055);
    border-radius: 12px;
    pointer-events: none;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item] > * {
    position: relative;
    z-index: 1;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item].selected {
    border-color: rgba(232, 188, 104, .82);
    background:
      radial-gradient(circle at 50% -8%, rgba(236, 189, 101, .18), transparent 40%),
      radial-gradient(circle at 115% 105%, rgba(142, 84, 31, .12), transparent 44%),
      linear-gradient(158deg, rgba(48, 35, 20, .998), rgba(15, 12, 9, .998) 63%, rgba(8, 7, 6, 1));
    box-shadow:
      inset 0 1px 0 rgba(255, 241, 214, .075),
      inset 0 0 0 1px rgba(233, 188, 106, .10),
      0 12px 30px rgba(0, 0, 0, .30);
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item].quality-uncommon {
    border-color: rgba(83, 130, 88, .50);
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item].quality-rare {
    border-color: rgba(77, 126, 166, .56);
    background:
      radial-gradient(circle at 50% -8%, rgba(72, 132, 180, .13), transparent 39%),
      linear-gradient(158deg, rgba(22, 29, 34, .995), rgba(10, 10, 9, .998) 68%);
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item].quality-epic {
    border-color: rgba(126, 90, 167, .60);
    background:
      radial-gradient(circle at 50% -8%, rgba(130, 83, 181, .14), transparent 39%),
      linear-gradient(158deg, rgba(31, 24, 35, .995), rgba(10, 9, 10, .998) 68%);
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item].quality-legendary {
    border-color: rgba(204, 153, 67, .68);
    background:
      radial-gradient(circle at 50% -8%, rgba(224, 168, 69, .18), transparent 40%),
      linear-gradient(158deg, rgba(41, 32, 17, .995), rgba(11, 10, 8, .998) 68%);
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item].quality-cursed {
    border-color: rgba(151, 66, 81, .64);
    background:
      radial-gradient(circle at 50% -8%, rgba(166, 61, 82, .15), transparent 40%),
      linear-gradient(158deg, rgba(39, 21, 23, .995), rgba(11, 9, 9, .998) 68%);
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-top {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center;
    align-items: start;
    gap: 7px !important;
    min-width: 0;
    text-align: center;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-top > div {
    width: 100%;
    min-width: 0;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-icon {
    display: grid;
    place-items: center;
    width: 70px !important;
    height: 70px !important;
    margin: 0 auto 1px;
    border: 1px solid rgba(183, 145, 86, .54);
    border-radius: 14px !important;
    background:
      radial-gradient(circle at 50% 34%, rgba(238, 193, 111, .16), transparent 62%),
      linear-gradient(145deg, rgba(48, 37, 24, .98), rgba(13, 12, 10, .995));
    box-shadow:
      inset 0 1px 0 rgba(255, 243, 218, .06),
      inset 0 0 22px rgba(169, 109, 42, .06),
      0 7px 17px rgba(0, 0, 0, .22);
    font-size: 31px !important;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-top small {
    display: block;
    min-height: 12px;
    overflow: hidden;
    color: #b9a787;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 8px !important;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .045em;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-top h4 {
    display: -webkit-box;
    min-height: 34px;
    margin: 4px 0 3px !important;
    overflow: hidden;
    color: #f2e5c9;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.18 !important;
    letter-spacing: .005em;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .78);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-top p {
    min-height: 13px;
    margin: 0;
    overflow: hidden;
    color: #938875;
    font-size: 8px !important;
    line-height: 1.35;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px !important;
    min-height: 51px;
    margin-top: 9px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(154, 121, 75, .17);
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-stats > span {
    min-width: 0;
    padding: 5px 4px !important;
    overflow: hidden;
    border: 1px solid rgba(137, 113, 80, .27);
    border-radius: 8px !important;
    color: #9e9381;
    background: rgba(5, 5, 4, .52);
    font-size: 8px !important;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-stats > span b {
    display: block;
    margin-bottom: 2px;
    color: #e2d4b8;
    font-size: 9px;
    font-weight: 800;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-stats > .ui007-no-stats {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-bottom {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 7px !important;
    margin-top: auto !important;
    padding-top: 9px !important;
    border-top: 1px solid rgba(154, 121, 75, .17);
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-availability {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: none !important;
    min-height: 29px;
    padding: 5px 6px !important;
    border-radius: 8px !important;
    font-size: 7.5px !important;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-bottom strong {
    display: block;
    width: 100%;
    padding: 6px 5px 5px;
    border-top: 1px solid rgba(221, 174, 91, .14);
    color: #edcb79;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px !important;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: .015em;
    text-align: center;
    text-shadow: 0 1px 9px rgba(0, 0, 0, .78);
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-empty,
  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-loading,
  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-error {
    grid-column: 1 / -1;
  }
}

@media (min-width: 721px) and (max-width: 960px) {
  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-items {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 390px) {
  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-items {
    gap: 8px !important;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item[data-ui007-item] {
    min-height: 246px;
    padding: 10px 9px 9px;
    border-radius: 14px;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-icon {
    width: 62px !important;
    height: 62px !important;
    border-radius: 12px !important;
    font-size: 28px !important;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-top h4 {
    min-height: 32px;
    font-size: 13px !important;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-stats {
    gap: 4px !important;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-stats > span {
    padding: 4px 3px !important;
    font-size: 7px !important;
  }

  html.shop-s1-rework body[data-screen="shop"] #screen-shop .ui007-item-bottom strong {
    font-size: 14px !important;
  }
}
