.profile-banner-surface[data-profile-banner] {
  background-color: #10213b;
  background-image:
    linear-gradient(90deg, rgba(5, 16, 38, .79), rgba(5, 16, 38, .62) 50%, rgba(5, 16, 38, .19)),
    var(--profile-banner-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-banner-surface[data-profile-banner] :is(h1, h2, .hero-note, .friend-status) {
  text-shadow: 0 2px 6px rgba(0, 0, 0, .7);
}

.profile-banner-controls {
  margin: 16px 0 0;
  padding: 18px;
  scroll-margin: 16px;
}

.profile-banner-controls p {
  margin: 10px 0 0;
  color: #cbd5e1;
  line-height: 1.5;
}

.profile-banner-controls p:empty {
  display: none;
}

.profile-banner-picker {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.profile-banner-picker label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.profile-banner-picker select {
  width: min(100%, 350px);
  min-height: 42px;
  padding: 7px 30px 7px 10px;
  border: 1px solid #537185;
  border-radius: 10px;
  color: #f8fafc;
  background: #16233e;
  font: inherit;
}

.profile-banner-shop-link {
  color: #93c5fd;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-banner-shop-link:is(:hover, :focus-visible) {
  color: #fff;
}

.banner-shop-preview {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  min-height: 265px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid #446077;
  border-radius: 20px;
}

.banner-shop-preview .banner-shop-avatar {
  width: 150px;
  height: 150px;
}

.banner-shop-avatar-image {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  color: #d2f9f4;
  background: #254357;
  font-size: 52px;
  font-weight: 800;
}

.banner-shop-avatar-image > * {
  grid-area: 1 / 1;
}

.banner-shop-avatar-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-shop-preview h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(27px, 5vw, 42px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.banner-shop-preview p {
  margin: 10px 0 0;
  color: #e2efff;
  line-height: 1.5;
}

.banner-shop-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.banner-shop-heading h2 {
  margin: 0;
}

.banner-shop-balance {
  margin: 0;
  padding: 9px 12px;
  color: #ffe3a3;
  border: 1px solid #6e6043;
  border-radius: 10px;
  font-weight: 700;
}

.banner-shop-fieldset {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.banner-shop-fieldset legend {
  margin-bottom: 10px;
  padding: 0;
}

.banner-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.banner-shop-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid #365365;
  border-radius: 14px;
  background: #0e1b34;
  cursor: pointer;
}

.banner-shop-card img {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.banner-shop-card input {
  margin: 3px 0 0;
  accent-color: #76e3d6;
}

.banner-shop-card strong {
  overflow-wrap: anywhere;
}

.banner-shop-card .banner-shop-price {
  grid-column: 2;
  color: #ffe3a3;
  font-size: .9rem;
}

.banner-shop-card:not(.is-owned):is(:hover, :has(input:checked)) {
  border-color: #9ceae2;
  background: #16344a;
}

.banner-shop-card.is-owned {
  border-color: #477969;
  background: #122b32;
  cursor: default;
}

.banner-shop-card.is-owned .banner-shop-price {
  color: #9ceae2;
  font-weight: 700;
}

.banner-shop-card:focus-within,
.profile-banner-picker select:focus-visible {
  outline: 2px solid #9ceae2;
  outline-offset: 3px;
}

.banner-shop-actions {
  margin-top: 20px;
}

:is(.profile-banner-controls, .profile-banner-picker, .banner-shop-preview, .banner-shop-avatar-image img, .banner-shop-actions > *)[hidden] {
  display: none;
}

@media (max-width: 610px) {
  .profile-banner-surface[data-profile-banner] {
    background-image:
      linear-gradient(0deg, rgba(5, 16, 38, .86), rgba(5, 16, 38, .55) 65%, rgba(5, 16, 38, .3)),
      var(--profile-banner-image);
    background-position: right center;
  }

  .banner-shop-preview {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 15px;
    text-align: center;
    padding: 24px 18px;
  }

  .banner-shop-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-banner-picker label {
    width: 100%;
  }
}
