/* The opening card keeps the brand sculpture and primary action in one surface. */
.topup-tabs img.telegram-stars-mark { filter: none; object-fit: contain; }
.hero {
  grid-template-columns: minmax(0, 1fr) minmax(350px, 470px);
  column-gap: clamp(28px, 4vw, 72px);
  padding: 0 0 14px;
}
.hero h1 {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  margin: 0;
  font-size: clamp(36px, 3.75vw, 58px);
  line-height: 1.06;
}
.hero-bottom {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 136px;
  margin: 4px 0 0;
  padding: 14px 132px 14px 20px;
  overflow: hidden;
  border-radius: 18px;
  background: #2d1d1d;
  color: #fff9f6;
  box-shadow: 0 14px 28px -25px #2d1111a8;
}
.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.hero-copy p {
  max-width: 20ch;
  color: #fff9f6;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.32;
  letter-spacing: -.025em;
}
.hero-cta {
  min-height: 45px;
  gap: 14px;
  padding: 5px 5px 5px 17px;
  background: #fa422d;
  color: #201717;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.hero-cta .arrow-disc {
  width: 34px;
  height: 34px;
  background: #201717;
  color: #fff9f6;
}
.hero-cta:focus-visible { outline: 2px solid #fff9f6; outline-offset: 3px; }
.hero-art {
  position: absolute;
  inset: 50% 8px auto auto;
  width: 122px;
  height: 122px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  filter: none;
}
.hero-art canvas,
.hero-art .hero-orbit-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
[data-theme=dark] .hero-bottom { background: #451e20; }

/* Keep the payment form visible within the opening viewport. */
.worlds-section { padding-top: 8px; padding-bottom: 10px; }
.worlds-section .section-title-row { margin-bottom: 8px; }
.topup-section { padding-top: 18px; padding-bottom: 8px; }
.topup-title-row { margin-bottom: 12px; }

/* A native selector with the same visual language as the neighboring actions. */
.header-actions .language-switch,
.currency-switch {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}
.currency-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 94px;
  cursor: pointer;
}
.currency-switch-display {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}
.currency-switch-display [data-currency-glyph] { font-size: 15px; }
.currency-switch-display svg {
  width: 12px;
  height: 12px;
  margin-left: auto;
  transform: rotate(90deg);
  stroke-width: 2;
}
.currency-switch select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  opacity: 0;
  cursor: pointer;
}
.currency-switch:hover,
.header-actions .language-switch:hover { border-color: var(--ink); }
.currency-switch:focus-within,
.header-actions .language-switch:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* At narrow widths the filter order is stable: price, type rail, three peers. */
@media (max-width: 980px) {
  .catalog-filter-form--inline.catalog-filter-form--compact {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
  }
  .catalog-filter-form--compact .catalog-filter-price-group {
    grid-column: span 1;
    width: 100%;
  }
  .catalog-filter-form--compact .catalog-filter-group[data-filter-group=type] {
    grid-column: span 2;
    width: 100%;
    min-width: 0;
  }
  .catalog-filter-form--compact .catalog-filter-group:not([data-filter-group=type]) {
    width: 100%;
    min-width: 0;
  }
  .catalog-filter-form--compact .catalog-filter-group:not([data-filter-group=type])>summary {
    width: 100%;
    justify-content: space-between;
    border: 1px solid var(--line);
  }
  .catalog-filter-form--compact .catalog-filter-group:not([data-filter-group=type])>summary>span {
    flex: 1 1 auto;
    min-width: 0;
  }
  .catalog-filter-form--compact .catalog-filter-group[open]:not([data-filter-group=type]) {
    grid-column: 1 / -1;
  }
  .catalog-filter-form--compact .catalog-filter-type-rail { width: 100%; }
  .catalog-filter-form--compact .catalog-type-scroll {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
  }
  .catalog-filter-form--compact .catalog-filter-options { scroll-snap-type: x proximity; }
  .catalog-filter-form--compact [data-filter-group=type] .store-filter-choice { scroll-snap-align: start; }
}
@media (max-width: 980px) and (min-width: 681px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 350px); column-gap: 22px; }
  .hero h1 { font-size: clamp(33px, 4.6vw, 46px); }
  .hero-bottom { min-height: 128px; padding: 12px 112px 12px 18px; }
  .hero-copy p { font-size: 16px; }
  .hero-art { width: 108px; height: 108px; }
}
@media (max-width: 680px) {
  .currency-switch { min-width: 44px; width: 44px; height: 44px; }
  .currency-switch-display { justify-content: center; padding: 0; }
  .currency-switch-display [data-currency-glyph] { font-size: 17px; }
  .currency-switch-display [data-currency-code],
  .currency-switch-display svg { display: none; }
  .header-actions .language-switch { min-height: 44px; }

  .hero { display: block; padding: 4px 0 10px; }
  .hero h1 { margin: 0; font-size: clamp(27px, 7vw, 34px); max-width: calc(100% - 96px); }
  .hero-bottom {
    display: flex;
    width: 100%;
    min-height: 112px;
    margin-top: 10px;
    padding: 12px 96px 12px 16px;
    border-radius: 15px;
  }
  .hero-copy { gap: 6px; }
  .hero-copy p {
    display: block;
    max-width: none;
    font-size: 14px;
    line-height: 1.25;
  }
  .hero-cta { min-height: 44px; font-size: 12px; gap: 9px; }
  .hero-art { width: 92px; height: 92px; right: 2px; top: 50%; bottom: auto; }

  .worlds-section { padding-top: 6px; padding-bottom: 9px; }
  .worlds-section .section-title-row { min-height: 36px; margin-bottom: 2px; }
  .topup-section { padding-top: 12px; padding-bottom: 6px; }
  .topup-title-row { margin-bottom: 10px; }
  .topup-form { grid-template-areas: "amount recipient" "pay pay" "status terms"; }
  .topup-status { grid-area: status; align-self: center; }
  .topup-terms { grid-area: terms; justify-self: end; }

  .catalog-filter-form--compact .catalog-filter-price-group,
  .catalog-filter-form--compact .catalog-filter-group[data-filter-group=type] {
    grid-column: 1 / -1;
  }
  .catalog-filter-form--inline.catalog-filter-form--compact { gap: 10px 8px; }
  .catalog-filter-form--compact .catalog-filter-group:not([data-filter-group=type])>summary {
    min-height: 44px;
    padding: 10px 9px;
    font-size: 12px;
    line-height: 20px;
  }
  .catalog-filter-form--compact .catalog-filter-group:not([data-filter-group=type])>summary>svg {
    width: 14px;
    height: 14px;
  }
}
@media (max-width: 359px) {
  .hero-bottom { min-height: 116px; padding-right: 92px; }
  .hero-art { width: 84px; height: 84px; }
  .hero-copy p { font-size: 13px; }
  .topup-form { grid-template-areas: "amount" "recipient" "pay" "status" "terms"; }
  .topup-terms { justify-self: start; }
  .catalog-filter-form--compact .catalog-filter-group:not([data-filter-group=type])>summary {
    gap: 2px;
    padding-inline: 6px;
    font-size: 10px;
  }
}
