:root {
  color-scheme: dark;
  --bg: #111111;
  --bg-soft: #1a1a1a;
  --panel: #191919;
  --panel-raised: #232323;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #9e9e9e;
  --muted-soft: #767676;
  --blue: #1f8bff;
  --blue-deep: #0b60f0;
  --blue-glow: rgba(31, 139, 255, 0.3);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    radial-gradient(circle at top, rgba(40, 40, 40, 0.7), transparent 28%),
    linear-gradient(180deg, #0d0d0d 0%, #111111 40%, #0f0f0f 100%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

body.sheet-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
}

.app-shell {
  width: min(480px, 100vw);
  min-height: 100vh;
  padding: max(12px, env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom));
}

.topbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 14px;
}

.topbar-copy h1,
.section-head h2,
.sheet-head h3,
.gift-title {
  margin: 0;
}

.topbar-copy h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.topbar-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

.topbar-kicker,
.summary-kicker,
.section-kicker,
.sheet-kicker,
.gift-kicker {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.icon-button,
.ghost-button,
.mode-pill,
.summary-pill,
.user-chip,
.market-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.icon-button--accent {
  background: linear-gradient(180deg, rgba(31, 139, 255, 0.2), rgba(31, 139, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 22px rgba(31, 139, 255, 0.16);
}

.icon-button svg,
.dock-link svg,
.search-field svg,
.cart-pill svg,
.price-pill svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-card,
.toolbar-card,
.gift-card,
.order-card,
.sheet-card,
.dock-nav {
  background: linear-gradient(180deg, rgba(36, 36, 36, 0.96), rgba(20, 20, 20, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.summary-card,
.toolbar-card,
.market-section {
  margin-top: 12px;
}

.summary-card,
.toolbar-card {
  border-radius: var(--radius-xl);
}

.summary-card {
  padding: 14px 16px 15px;
}

.summary-head,
.summary-row,
.section-head,
.gift-title-row,
.gift-actions,
.order-top,
.sheet-head,
.sheet-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-value {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.user-chip,
.summary-pill {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 700;
}

.user-chip {
  color: #c7ecff;
  background: rgba(31, 139, 255, 0.14);
}

.summary-pill {
  color: #dbe9ff;
}

.summary-pill--soft {
  color: var(--muted);
}

.summary-row {
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  display: none;
}

.summary-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#hero-note {
  display: none;
}

#hero-note:not([hidden]) {
  display: -webkit-box;
}

.toolbar-card {
  padding: 12px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.search-field[hidden] {
  display: none !important;
}

.search-field svg {
  flex: 0 0 auto;
  color: var(--muted-soft);
}

.search-field input,
.recipient-field input,
.select-chip select {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
}

.search-field input::placeholder,
.recipient-field input::placeholder {
  color: var(--muted-soft);
}

.chip-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.filter-chip {
  min-width: 0;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 4px;
  text-align: left;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.filter-chip__label {
  font-size: 11px;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-chip__value {
  font-size: 15px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-chip--active {
  border-color: rgba(31, 139, 255, 0.28);
  background: linear-gradient(180deg, rgba(31, 139, 255, 0.16), rgba(31, 139, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.filter-chip--open {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.toolbar-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.toolbar-foot .ghost-button {
  flex: 1 1 0;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 78px;
  gap: 8px;
  margin-top: 10px;
}

.select-chip,
.ghost-button,
.mode-pill,
.recipient-field {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.select-chip {
  display: grid;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
}

.select-chip span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.select-chip select {
  min-height: 22px;
  padding-right: 12px;
}

.ghost-button {
  min-height: 48px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost-button--small {
  min-height: 40px;
  padding: 0 14px;
}

.market-section {
  position: relative;
}

.section-head {
  margin-bottom: 10px;
  align-items: end;
}

.section-head h2 {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-count {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.catalog-meta {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted-soft);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.gift-card {
  --card-start: #8f5bd6;
  --card-end: #693ca9;
  --card-pattern: rgba(255, 255, 255, 0.18);
  --card-text: #ffffff;
  --pattern-image: none;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.98), rgba(16, 16, 16, 0.99));
}

.gift-card--skeleton {
  overflow: hidden;
}

.gift-card--skeleton .gift-visual,
.gift-card--skeleton .gift-content,
.price-pill--skeleton,
.cart-pill--skeleton,
.gift-skeleton-line,
.gift-skeleton-glyph {
  position: relative;
  overflow: hidden;
}

.gift-card--skeleton .gift-visual {
  background:
    linear-gradient(180deg, rgba(57, 57, 57, 0.96), rgba(31, 31, 31, 0.98)),
    linear-gradient(180deg, #2e2e2e 0%, #1d1d1d 100%);
}

.gift-card--skeleton .gift-visual::before,
.gift-card--skeleton .gift-visual::after,
.price-pill--skeleton::after,
.cart-pill--skeleton::after,
.gift-skeleton-line::after,
.gift-skeleton-glyph::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.14) 48%, transparent 100%);
  animation: gift-skeleton-shimmer 1.25s ease-in-out infinite;
}

.gift-skeleton-glyph {
  z-index: 2;
  width: 68%;
  height: 68%;
  border-radius: 28px;
  margin: auto auto 20px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 32px rgba(0, 0, 0, 0.18);
}

.gift-skeleton-line {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.gift-skeleton-line--title {
  height: 18px;
  width: 72%;
}

.gift-skeleton-line--meta {
  height: 12px;
  width: 46%;
  margin-top: 8px;
}

.price-pill--skeleton {
  min-height: 44px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.cart-pill--skeleton {
  background: rgba(255, 255, 255, 0.06);
}

@keyframes gift-skeleton-shimmer {
  to {
    transform: translateX(120%);
  }
}

.gift-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 10px 10px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.24), transparent 38%),
    linear-gradient(180deg, var(--card-start), var(--card-end));
}

.gift-visual::before,
.sheet-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    var(--pattern-image),
    radial-gradient(circle, rgba(255, 255, 255, 0.14) 0 1.1px, transparent 1.2px);
  background-size: 42px 42px, 20px 20px;
  background-position: center;
  opacity: 0.16;
  filter: grayscale(1) brightness(1.2);
}

.gift-visual::after,
.sheet-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.28), transparent 35%),
    linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, 0.12) 100%);
}

.gift-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.market-badge,
.gift-score {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.18);
  color: var(--card-text);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gift-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px 12px 0;
}

.gift-stage::before {
  content: "";
  position: absolute;
  inset: 18% 15% 11%;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 26px rgba(0, 0, 0, 0.14);
  opacity: 0.52;
}

.gift-stage::after {
  content: "";
  position: absolute;
  left: 19%;
  right: 19%;
  bottom: 12px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  filter: blur(12px);
  opacity: 0.58;
}

.gift-illustration,
.sheet-visual img {
  position: relative;
  z-index: 2;
  width: 88%;
  height: 88%;
  object-fit: contain;
  transform: translateY(8px);
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.34));
}

.gift-illustration--placeholder,
.sheet-visual--placeholder::after {
  width: auto;
  height: auto;
}

.gift-illustration--placeholder {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transform: translateY(8px);
}

.gift-content {
  padding: 12px 12px 12px;
}

.gift-title-row {
  align-items: flex-end;
  gap: 8px;
}

.gift-title {
  min-width: 0;
  font-size: 17px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift-number {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-weight: 800;
}

.gift-subtitle {
  margin-top: 5px;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift-rub {
  margin-top: 6px;
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.gift-actions {
  margin-top: 10px;
  align-items: stretch;
  gap: 8px;
}

.price-pill,
.cart-pill,
.primary-button {
  appearance: none;
  cursor: pointer;
}

.price-pill {
  min-width: 0;
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 24px var(--blue-glow);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
}

.price-pill__copy {
  min-width: 0;
  display: grid;
  gap: 0;
  text-align: center;
  line-height: 1;
}

.price-pill__primary {
  display: block;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.price-pill__secondary {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}

.cart-pill {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.empty-card {
  padding: 20px 18px;
  border-radius: 22px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.empty-card--panel {
  margin-top: 10px;
}

.market-section--orders {
  margin-top: 22px;
}

.orders-list {
  display: grid;
  gap: 14px;
}

.order-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  align-items: start;
}

.order-visual {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #2b2b2b, #1d1d1d);
}

.order-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-content {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.order-top {
  align-items: start;
  gap: 10px;
}

.order-title {
  min-width: 0;
}

.order-title strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.order-recipient {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.order-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.order-price-rub {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
}

.order-price-ton,
.order-time {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.order-summary {
  font-size: 13px;
  line-height: 1.45;
}

.order-summary--info {
  color: #d9e6f5;
}

.order-summary--success {
  color: #b9f3c4;
}

.order-summary--warning {
  color: #ffd0b1;
}

.order-summary--danger {
  color: #ffb9b9;
}

.order-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.status-pill--completed {
  color: #a9f0b7;
  background: rgba(124, 229, 119, 0.12);
}

.status-pill--processing {
  color: #8fd0ff;
  background: rgba(31, 139, 255, 0.14);
}

.status-pill--insufficient_balance {
  color: #ffd3b3;
  background: rgba(255, 146, 82, 0.14);
}

.status-pill--refunded,
.status-pill--failed {
  color: #ffb3b3;
  background: rgba(255, 95, 95, 0.12);
}

.order-action {
  min-height: 34px;
  padding: 0 12px;
}

.order-action--topup {
  border-color: rgba(52, 146, 255, 0.34);
  color: #dfeeff;
}

.dock-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 30;
  width: min(448px, calc(100vw - 24px));
  transform: translateX(-50%);
  border-radius: 26px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  background: rgba(15, 15, 15, 0.94);
  backdrop-filter: blur(18px);
}

.dock-link {
  min-height: 58px;
  border-radius: 18px;
  color: var(--muted);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
}

.dock-link--active,
.dock-link:active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.dock-link svg {
  width: 18px;
  height: 18px;
}

.filter-sheet[hidden],
.sheet[hidden] {
  display: none;
}

.filter-sheet {
  position: fixed;
  inset: 0;
  z-index: 38;
  pointer-events: none;
}

.filter-sheet:not([hidden]) {
  pointer-events: auto;
}

.filter-sheet-card,
.sheet-card {
  background: linear-gradient(180deg, rgba(36, 36, 36, 0.98), rgba(16, 16, 16, 0.99));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.filter-sheet-card {
  position: fixed;
  left: var(--filter-sheet-left, 12px);
  top: var(--filter-sheet-top, 8px);
  width: var(--filter-sheet-width, calc(100vw - 24px));
  max-height: var(--filter-sheet-max-height, calc(100vh - 108px));
  min-height: 0;
  border-radius: 24px;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.filter-sheet-card .sheet-handle {
  display: none;
}

.filter-sheet-card .sheet-head {
  align-items: flex-start;
  gap: 14px;
}

.filter-sheet-card .sheet-head h3 {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.1;
}

.filter-search {
  margin-top: 14px;
  min-height: 46px;
}

.price-range-panel {
  margin-top: 14px;
}

.price-range-panel[hidden] {
  display: none !important;
}

.price-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.price-currency-switch {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.price-currency-switch__button {
  min-width: 58px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.price-currency-switch__button--active {
  border-color: rgba(52, 146, 255, 0.5);
  background: linear-gradient(180deg, rgba(31, 139, 255, 0.28), rgba(16, 95, 196, 0.16));
  color: #eef7ff;
  box-shadow: 0 10px 22px rgba(17, 84, 164, 0.16);
}

.price-currency-switch__button:disabled {
  opacity: 0.38;
}

.price-range-field {
  display: grid;
  gap: 8px;
}

.price-range-field__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.price-range-field__control {
  min-height: 54px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.price-range-field__control:focus-within {
  border-color: rgba(52, 146, 255, 0.48);
  box-shadow:
    0 0 0 1px rgba(31, 139, 255, 0.18),
    0 10px 22px rgba(17, 84, 164, 0.14);
}

.price-range-field__control input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price-range-field__control input::placeholder {
  color: rgba(229, 230, 232, 0.3);
}

.price-range-field__control i {
  flex: 0 0 auto;
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.filter-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-selected[hidden] {
  display: none;
}

.filter-selected__pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 139, 255, 0.24);
  background: rgba(31, 139, 255, 0.12);
  color: #dcecff;
  font-size: 12px;
  font-weight: 700;
}

.filter-selected__pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-selected__pill i {
  font-style: normal;
  color: rgba(220, 236, 255, 0.72);
}

.filter-sheet-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.filter-sheet-toolbar[hidden] {
  display: none !important;
}

.filter-sheet-toolbar .primary-button[hidden] {
  display: none !important;
}

.filter-sheet-toolbar .ghost-button,
.filter-sheet-toolbar .primary-button {
  flex: 1 1 0;
}

.filter-options[hidden] {
  display: none !important;
}

.filter-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  flex: 1 1 auto;
  max-height: none;
  overflow-y: auto;
  padding-right: 2px;
}

.filter-option {
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.filter-option--active {
  border-color: rgba(52, 146, 255, 0.62);
  background: linear-gradient(180deg, rgba(31, 139, 255, 0.22), rgba(31, 139, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(31, 139, 255, 0.16),
    0 10px 24px rgba(18, 87, 168, 0.18);
}

.filter-option__copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 3px;
}

.filter-option__copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
}

.filter-option__copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.filter-option__swatch,
.filter-option__stub,
.filter-option__icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.filter-option__swatch {
  background: linear-gradient(135deg, var(--swatch-start), var(--swatch-end));
}

.filter-option__stub {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.filter-option__icon {
  background: rgba(255, 255, 255, 0.05);
}

.filter-option__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-option__check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #9dd2ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.filter-option--active .filter-option__check {
  border-color: rgba(52, 146, 255, 0.44);
  background: linear-gradient(180deg, rgba(31, 139, 255, 0.3), rgba(20, 104, 214, 0.2));
  box-shadow: 0 8px 18px rgba(20, 104, 214, 0.26);
}

.filter-option--active .filter-option__copy strong {
  color: #f7fbff;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 4, 0.78);
  backdrop-filter: blur(12px);
}

.filter-sheet .sheet-backdrop {
  background: transparent;
  backdrop-filter: none;
}

.sheet-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100vw);
  max-height: min(calc(100dvh - 8px), calc(100vh - 8px));
  border-radius: 28px 28px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.sheet-handle {
  width: 56px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  flex: 0 0 auto;
}

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 2px 0 12px;
  background:
    linear-gradient(180deg, rgba(22, 22, 24, 0.98), rgba(22, 22, 24, 0.94) 70%, rgba(22, 22, 24, 0));
  backdrop-filter: blur(10px);
}

.sheet-head h3 {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.sheet-showcase {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.sheet-visual {
  --card-start: #8f5bd6;
  --card-end: #693ca9;
  --pattern-image: none;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.24), transparent 38%),
    linear-gradient(180deg, var(--card-start), var(--card-end));
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-market {
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet-details {
  align-items: start;
  flex-direction: column;
}

.sheet-details strong {
  display: block;
  margin-top: 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.sheet-details span:last-child {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.mode-switch {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mode-pill {
  min-height: 46px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
}

.mode-pill--active {
  color: #ffffff;
  background: rgba(31, 139, 255, 0.14);
  border-color: rgba(31, 139, 255, 0.24);
}

.recipient-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
}

.recipient-field[hidden] {
  display: none;
}

.recipient-field span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.primary-button--small {
  min-height: 40px;
  font-size: 13px;
}

.recipient-field input {
  min-height: 22px;
}

.sheet-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sheet-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.sheet-feedback[hidden],
.sheet-topup[hidden] {
  display: none;
}

.sheet-feedback--info {
  border-color: rgba(31, 139, 255, 0.24);
  background: rgba(31, 139, 255, 0.1);
}

.sheet-feedback--success {
  border-color: rgba(75, 193, 107, 0.28);
  background: rgba(75, 193, 107, 0.12);
}

.sheet-feedback--warning,
.sheet-feedback--error {
  border-color: rgba(255, 146, 82, 0.3);
  background: rgba(255, 146, 82, 0.12);
}

.sheet-topup {
  margin-top: 14px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(31, 139, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(31, 139, 255, 0.14), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.sheet-topup__head {
  display: grid;
  gap: 6px;
}

.sheet-topup__kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9fd0ff;
}

.sheet-topup__head strong {
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.sheet-topup__head span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sheet-topup__presets {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sheet-topup__preset {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.sheet-topup__preset--active {
  border-color: rgba(52, 146, 255, 0.56);
  background: linear-gradient(180deg, rgba(31, 139, 255, 0.2), rgba(31, 139, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sheet-actions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom) * -1);
  padding-top: 12px;
  padding-bottom: calc(4px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(22, 22, 24, 0), rgba(22, 22, 24, 0.94) 22%, rgba(22, 22, 24, 0.98));
}

.sheet-secondary-button {
  width: 100%;
  min-height: 48px;
  border-radius: 18px;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 28px var(--blue-glow);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

@media (max-width: 380px) {
  .summary-value {
    font-size: 28px;
  }

  .chip-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-grid {
    gap: 10px;
  }

  .gift-title {
    font-size: 15px;
  }

  .price-pill {
    padding-inline: 10px;
    font-size: 14px;
  }

  .filter-sheet-card {
    left: 8px;
    width: calc(100vw - 16px);
  }

  .price-range-grid {
    grid-template-columns: 1fr;
  }

  .sheet-topup__presets {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .topbar-copy h1 {
    font-size: 22px;
  }

  .summary-card,
  .toolbar-card {
    border-radius: 24px;
  }

  .summary-value {
    font-size: 24px;
  }

  .summary-note {
    font-size: 12px;
    -webkit-line-clamp: 1;
  }

  .chip-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head h2 {
    font-size: 18px;
  }
}
