/* Estland 2 public portal v31 — hero richest card + supplied social icons */

/* The supplied logo files are white. Keep them white by default; hover turns gold. */
.portal-v11 .site-utility-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: none !important;
  opacity: 1 !important;
}

.portal-v11 .site-utility-link {
  border-color: rgba(66, 168, 255, .42);
  background: rgba(66, 168, 255, .055);
}

.portal-v11 .site-utility-link:hover {
  border-color: rgba(242, 191, 100, .52);
  background: rgba(242, 191, 100, .09);
}

.portal-v11 .site-utility-link:hover .site-utility-icon {
  filter: brightness(0) saturate(100%) invert(80%) sepia(44%) saturate(779%) hue-rotate(338deg) brightness(100%) contrast(95%) !important;
}

/* Four actual statistic cards only. */
.portal-v11 .premium-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Richest player now lives in the old feature-card area. */
.portal-v11 .hero-richest-card {
  width: 100%;
  max-width: 520px;
  min-height: 112px;
  margin-top: 24px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 96, .24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 200, 96, .13), transparent 12rem),
    linear-gradient(145deg, rgba(16, 31, 50, .94), rgba(8, 18, 31, .96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 16px 32px rgba(0,0,0,.18);
}

.portal-v11 .hero-richest-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.portal-v11 .hero-richest-card .richest-home-crown {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #171006;
  background: linear-gradient(180deg, #ffdb88, #efb346);
  box-shadow: 0 10px 22px rgba(235, 170, 58, .2);
}

.portal-v11 .hero-richest-card .richest-home-crown svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-v11 .hero-richest-card .richest-home-identity,
.portal-v11 .hero-richest-card .richest-home-wealth {
  min-width: 0;
  margin: 0;
}

.portal-v11 .hero-richest-card .richest-ribbon-label,
.portal-v11 .hero-richest-card .richest-ribbon-copy {
  display: block;
  color: #8fa4ba;
  font-size: .59rem;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.portal-v11 .hero-richest-card .richest-ribbon-name {
  display: block;
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
  color: #f7fbff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-v11 .hero-richest-card .richest-home-wealth {
  padding-left: 20px;
  border-left: 1px solid rgba(255,255,255,.08);
  text-align: right;
}

.portal-v11 .hero-richest-card .richest-ribbon-wealth {
  display: block;
  margin-top: 7px;
  color: #ffd78a;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .portal-v11 .premium-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .portal-v11 .site-utility-icon {
    width: 15px;
    height: 15px;
  }

  .portal-v11 .hero-richest-card {
    max-width: none;
    min-height: 96px;
    margin-top: 18px;
    padding: 13px 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    border-radius: 16px;
  }

  .portal-v11 .hero-richest-head {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .portal-v11 .hero-richest-card .richest-home-crown {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .portal-v11 .hero-richest-card .richest-home-crown svg {
    width: 19px;
    height: 19px;
  }

  .portal-v11 .hero-richest-card .richest-ribbon-label,
  .portal-v11 .hero-richest-card .richest-ribbon-copy {
    font-size: .5rem;
    letter-spacing: .09em;
  }

  .portal-v11 .hero-richest-card .richest-ribbon-name {
    margin-top: 4px;
    font-size: .82rem;
  }

  .portal-v11 .hero-richest-card .richest-home-wealth {
    padding-left: 12px;
  }

  .portal-v11 .hero-richest-card .richest-ribbon-wealth {
    margin-top: 5px;
    font-size: .92rem;
  }
}

@media (max-width: 380px) {
  .portal-v11 .hero-richest-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .portal-v11 .hero-richest-card .richest-home-wealth {
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    text-align: left;
  }
}


/* v31 final phone-fit audit */
@media (max-width: 720px) {
  /* Keep the homepage title wide and readable instead of forcing short word stacks. */
  .portal-v11.page-home .hero-command-card h1 {
    width: 100% !important;
    max-width: none !important;
    margin: 14px 0 12px !important;
    font-size: clamp(1.12rem, 5.25vw, 1.5rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -.035em !important;
    text-wrap: pretty !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .portal-v11.page-home .hero-copy-wrap {
    width: 100%;
    min-width: 0;
  }

  /* Product cards use a clean image-above-content layout on phones.
     This prevents real product images from ever sitting above names, prices or sales text. */
  .portal-v11 .shop-items-grid,
  .portal-v11 .shop-featured-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .portal-v11 .shop-item-card,
  .portal-v11 .featured-shop-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
    align-items: initial !important;
  }

  .portal-v11 .shop-item-image,
  .portal-v11 .shop-featured-grid .shop-item-image {
    position: relative !important;
    z-index: 0 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
    padding: 8px !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
  }

  .portal-v11 .shop-item-image img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .portal-v11 .shop-item-body {
    position: relative !important;
    z-index: 1 !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 13px !important;
    overflow: visible !important;
    background: rgba(7,16,28,.96) !important;
  }

  .portal-v11 .shop-item-body h3 {
    margin: 9px 0 4px !important;
    font-size: .94rem !important;
    line-height: 1.22 !important;
    overflow-wrap: anywhere !important;
  }

  .portal-v11 .shop-subtitle {
    font-size: .67rem !important;
    line-height: 1.35 !important;
  }

  .portal-v11 .shop-item-meta-row {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
    margin-top: 11px !important;
    padding-top: 11px !important;
    align-items: stretch !important;
  }

  .portal-v11 .shop-price-stack,
  .portal-v11 .shop-action-wrap,
  .portal-v11 .shop-buy-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .portal-v11 .shop-price {
    font-size: 1rem !important;
    white-space: normal !important;
  }

  .portal-v11 .shop-sales-pill {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 25px !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  .portal-v11 .shop-buy-button {
    min-height: 38px !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
  }

  /* Long leaderboard names may use two lines; values always get their own row. */
  .portal-v11 .leaderboard-row {
    min-height: 74px !important;
  }

  .portal-v11 .leaderboard-player-main a {
    display: -webkit-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: normal !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    line-height: 1.15 !important;
    word-break: break-word !important;
  }

  .portal-v11 .leaderboard-row strong {
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Stop labels and action buttons from crossing each other. */
  .portal-v11 .promo-code-card,
  .portal-v11 .roadmap-card,
  .portal-v11 .update-card,
  .portal-v11 .pinned-card,
  .portal-v11 .known-issue-card,
  .portal-v11 .rule-card {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .portal-v11 .promo-code-token,
  .portal-v11 .promo-code-token-row,
  .portal-v11 .copy-code-button {
    min-width: 0 !important;
  }
}

@media (max-width: 360px) {
  .portal-v11.page-home .hero-command-card h1 {
    font-size: 1.08rem !important;
  }

  .portal-v11 .shop-item-image,
  .portal-v11 .shop-featured-grid .shop-item-image {
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
  }

  .portal-v11 .promo-code-token-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .portal-v11 .copy-code-button {
    width: 100% !important;
    justify-content: center !important;
  }
}
