:root {
  --tg-accent: #229ed9;
  --tg-accent-strong: #1b8bbf;

  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-soft: #f7f8fa;
  --panel-soft-2: #f1f5f9;
  --text: #111827;
  --text-soft: #6b7280;
  --border: #e5e7eb;
  --input: #f8fafc;
  --chip: #f3f4f6;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.94);
  --accent-soft: #e8f6fd;
  --accent-text: #229ed9;

  --page-width: 100%;
  --page-max-width: 430px;
  --content-padding: 12px;
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 16px;
  --radius-sm: 14px;
  --sheet-max-height: 82vh;
}

body.theme-dark {
  --bg: #0e1621;
  --panel: #17212b;
  --panel-soft: #1f2c39;
  --panel-soft-2: #243342;
  --text: #f3f4f6;
  --text-soft: #9ca3af;
  --border: #263544;
  --input: #101922;
  --chip: #1f2c39;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --nav-bg: rgba(23, 33, 43, 0.95);
  --accent-soft: #122635;
  --accent-text: #58c8ff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(34, 158, 217, 0.18), transparent 35%),
    var(--bg);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-screen__content {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.splash-screen__logo {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 44px;
}

.splash-screen__title {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
}

.splash-screen__message {
  max-width: 260px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-soft);
  text-align: center;
  overflow-wrap: anywhere;
}

.splash-screen.error .splash-screen__logo {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}

.splash-screen.error .splash-screen__message {
  color: #ef4444;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  background: none;
  color: inherit;
}

input {
  border: 0;
  outline: none;
  color: inherit;
  background: transparent;
  min-width: 0;
  width: 100%;
}

.app {
  width: var(--page-width);
  max-width: var(--page-max-width);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.content {
  display: block;
  padding:
    max(12px, env(safe-area-inset-top))
    var(--content-padding)
    var(--content-padding);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.screen-stack {
  display: grid;
  gap: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.section-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 17px;
  flex-shrink: 0;
}

.section-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.section-link {
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  color: var(--accent-text);
  flex-shrink: 0;
}

.search-box,
.filter-box,
.sheet-input {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--input);
  min-width: 0;
}

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

.filter-trigger {
  width: 100%;
  justify-content: center;
  font-weight: 600;
}

.chips {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
  min-width: 0;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  flex: 0 0 auto;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.chip.active {
  background: var(--tg-accent);
  color: #ffffff;
}

.mobile-filter-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.card {
  width: 100%;
  min-width: 0;
  overflow: visible;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 14px;
  position: relative;
  z-index: 1;
}

.purchase-list,
.profile-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.settings-list {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: visible;
}

.purchase-top,
.purchase-bottom,
.profile-balance,
.row-between,
.profile-row,
.product-bottom {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.setting-row {
  position: relative;
  display: flex;
  gap: 10px;
  min-width: 0;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.purchase-top,
.profile-balance,
.row-between,
.profile-row {
  justify-content: space-between;
  align-items: flex-start;
}

.purchase-bottom,
.product-bottom {
  justify-content: space-between;
  align-items: center;
}

.purchase-main,
.setting-left,
.profile-left {
  min-width: 0;
  flex: 1 1 auto;
}

.purchase-title,
.product-title,
.card-title,
.profile-name {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 18px;
}

.tg-premium-star {
  margin-left: 6px;
  font-size: 16px;
}

.purchase-title,
.product-title,
.card-title {
  font-size: 15px;
}

.purchase-meta,
.product-meta,
.small-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-soft);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  flex: 0 0 auto;
}

.price {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  flex-shrink: 0;
}

.primary-btn,
.sheet-primary-btn,
.sheet-secondary-btn,
.products-buy-btn,
.products-card-buy-btn,
.purchase-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.2s ease;
}

.primary-btn,
.sheet-primary-btn,
.products-buy-btn,
.products-card-buy-btn,
.purchase-open-btn {
  background: var(--tg-accent);
  color: #ffffff;
}

.sheet-secondary-btn {
  background: var(--panel-soft);
  color: var(--text);
}

.sheet-secondary-btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.recommend-row {
  display: flex;
  gap: 12px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
  min-width: 0;
}

.recommend-row::-webkit-scrollbar {
  display: none;
}

.recommend-card {
  width: min(80vw, 240px);
  min-width: min(80vw, 240px);
  flex: 0 0 auto;
}

.setting-left,
.profile-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-icon,
.profile-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.avatar {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 20px;
  background: var(--tg-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}

.balance-value {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.action-card {
  padding: 14px;
}

.select-wrap {
  position: relative;
  width: 100%;
  max-width: 160px;
  min-width: 0;
  flex-shrink: 0;
  overflow: visible;
  z-index: 3;
}

.settings-list > .card:first-child {
  z-index: 20;
}

.settings-list > .card:first-child .select-wrap,
.settings-list > .card:first-child .custom-select,
.settings-list > .card:first-child .custom-select.open {
  z-index: 30;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--page-max-width);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 40;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}

.bottom-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.nav-btn {
  min-width: 0;
  min-height: 58px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-soft);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.nav-icon {
  font-size: 18px;
  line-height: 1;
}

.nav-label {
  max-width: 100%;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-soft);
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: var(--panel-soft);
}

.products-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.products-hero {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(88, 200, 255, 0.25), transparent 35%),
    linear-gradient(135deg, var(--panel) 0%, var(--panel-soft) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.products-hero::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(34, 158, 217, 0.12);
  pointer-events: none;
}

.products-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
}

.products-hero-title {
  margin: 14px 0 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  max-width: 260px;
  overflow-wrap: anywhere;
}

.products-hero-text {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
  max-width: 280px;
}

.products-hero-btn {
  margin-top: 16px;
}

.products-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--input);
  border: 1px solid var(--border);
}

.products-search-icon {
  flex-shrink: 0;
  color: var(--text-soft);
}

.products-search input {
  min-width: 0;
  width: 100%;
}

.products-categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.products-categories::-webkit-scrollbar {
  display: none;
}

.products-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.products-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.products-section-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.products-section-title {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.products-link-btn {
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.products-recommend-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.products-recommend-list::-webkit-scrollbar {
  display: none;
}

.products-recommend-card {
  width: min(78vw, 250px);
  min-width: min(78vw, 250px);
  padding: 14px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.products-recommend-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.products-recommend-emoji {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-soft);
  font-size: 24px;
  flex-shrink: 0;
}

.products-recommend-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.products-recommend-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.products-recommend-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.products-price {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

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

.products-card {
  min-width: 0;
  padding: 12px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.products-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--panel-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.products-card-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.products-card-desc {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}

.products-card-bottom {
  display: grid;
  gap: 8px;
}

.products-card-price {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}

.products-empty {
  grid-column: 1 / -1;
  padding: 22px 16px;
  border-radius: 20px;
  border: 1px dashed var(--border);
  background: var(--panel-soft);
  text-align: center;
  color: var(--text-soft);
}

.purchase-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.purchase-open-btn {
  width: 100%;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.toggle {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: var(--panel-soft-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.2s ease;
}

.toggle.active {
  background: var(--tg-accent);
  border-color: var(--tg-accent);
}

.toggle.active::after {
  transform: translateX(20px);
}

.balance-card {
  cursor: pointer;
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  z-index: 90;
}

.sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: var(--page-max-width);
  max-height: var(--sheet-max-height);
  background: var(--panel);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  border: 1px solid var(--border);
  border-bottom: 0;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sheet.active {
  transform: translateX(-50%) translateY(0);
}

.sheet-handle-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  flex-shrink: 0;
}

.sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: var(--border);
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 16px 12px;
  flex-shrink: 0;
}

.sheet-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.sheet-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sheet-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.4;
}

.sheet-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 999px;
  background: var(--panel-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sheet-body {
  overflow-y: auto;
  padding: 0 16px 16px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sheet-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.sheet-grid {
  display: grid;
  gap: 10px;
}

.sheet-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sheet-field-value {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
}

.sheet-actions {
  display: grid;
  gap: 10px;
}

.sheet-list {
  display: grid;
  gap: 10px;
}

.sheet-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-soft);
}

.sheet-pagination {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.sheet-page-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  flex: 1 1 auto;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 4;
}

.custom-select.open {
  z-index: 2000;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--input);
  color: var(--text);
  text-align: left;
}

.custom-select-trigger-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-trigger-icon {
  flex-shrink: 0;
  color: var(--text-soft);
  transition: transform 0.2s ease;
}

.custom-select.open .custom-select-trigger-icon {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 2100;
  display: none;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
}

.custom-select.open .custom-select-dropdown {
  display: grid;
  gap: 6px;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  text-align: left;
  background: transparent;
}

.custom-select-option.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 700;
}

.custom-select-option-check {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-select-option.active .custom-select-option-check {
  opacity: 1;
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}

.auth-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 999px;
  background: #ef4444;
}

.auth-dot.success {
  background: #22c55e;
}

.auth-dot.pending {
  background: #f59e0b;
}

#profileAvatar {
  overflow: hidden;
  padding: 0;
  background: var(--panel-soft);
  position: relative;
}

#profileAvatarImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

#profileAvatarFallback {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

@media (max-width: 390px) {
  .section-title {
    font-size: 16px;
  }

  .card {
    padding: 13px;
    border-radius: 20px;
  }

  .purchase-top,
  .purchase-bottom,
  .profile-balance,
  .setting-row,
  .profile-row,
  .product-bottom,
  .products-section-head,
  .products-recommend-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .badge {
    align-self: flex-start;
  }

  .primary-btn,
  #themeModeButton,
  .products-hero-btn,
  .sheet-primary-btn,
  .sheet-secondary-btn {
    width: 100%;
  }

  .select-wrap {
    max-width: none;
    width: 100%;
  }

  .products-hero {
    padding: 16px;
    border-radius: 22px;
  }

  .products-hero-title {
    font-size: 20px;
    max-width: none;
  }

  .products-section-title {
    font-size: 18px;
  }

  .products-recommend-card {
    width: calc(100vw - 24px * 2);
    min-width: calc(100vw - 24px * 2);
  }

  .products-catalog {
    gap: 8px;
  }

  .products-card {
    padding: 10px;
    border-radius: 16px;
  }

  .products-card-title {
    font-size: 13px;
  }

  .products-card-desc {
    font-size: 11px;
  }

  .products-card-buy-btn {
    min-height: 32px;
    font-size: 11px;
  }

  .sheet {
    max-height: 88vh;
  }

  .sheet-header,
  .sheet-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .sheet-pagination {
    flex-direction: column;
  }
}

@media (max-width: 340px) {
  :root {
    --content-padding: 10px;
  }

  .nav-label {
    font-size: 10px;
  }

  .section-icon,
  .setting-icon,
  .profile-icon {
    border-radius: 14px;
  }

  .avatar {
    width: 58px;
    height: 58px;
    min-width: 58px;
    font-size: 18px;
  }

  .products-catalog {
    gap: 6px;
  }

  .products-card {
    padding: 9px;
  }

  .products-card-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .products-card-title {
    font-size: 12px;
  }

  .products-card-desc {
    font-size: 10px;
    min-height: 28px;
  }
}
