html, body, html[data-tg-app] body, html[data-platform="tg"] body {
  background: #09080d !important;
  color: #f6f1e8 !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.app, .magazgamaz-content, .screen {
  background: transparent !important;
  color: #f6f1e8;
}

.magazgamaz-content {
  padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
}

.magazgamaz-tabbar {
  background: transparent !important;
  pointer-events: none !important;
  bottom: 28px !important;
  padding-bottom: calc(28px + env(safe-area-inset-bottom)) !important;
  z-index: 80 !important;
}

.magazgamaz-tabbar .dock,
.magazgamaz-tabbar a {
  pointer-events: auto !important;
  position: relative;
  z-index: 221;
}

.magazgamaz-content {
  padding-bottom: calc(148px + env(safe-area-inset-bottom)) !important;
}

.dock {
  width: min(420px, calc(100vw - 20px));
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px !important;
  border-radius: 22px !important;
  background: rgba(18, 16, 24, 0.92) !important;
  border: 1px solid rgba(246, 241, 232, 0.12) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(18px);
}

.dock a {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 52px;
  justify-content: center;
  border-radius: 16px;
  color: rgba(246, 241, 232, 0.55) !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
}

.dock a[aria-current="page"] {
  background: #ff5a36;
  color: white !important;
}

.card, .sheet, .form-input, .btn-primary, .btn-ghost, .filter-chip, .tx-row {
  border-color: rgba(246, 241, 232, 0.12) !important;
}

.card, .sheet {
  background: #16141d !important;
  color: #f6f1e8 !important;
}

.form-input, .filter-chip {
  background: #0c0b10 !important;
  color: #f6f1e8 !important;
}

.btn-primary, .btn-blue {
  background: #ff5a36 !important;
  color: white !important;
  border: 0 !important;
}

.section-title, .tx-name, .pay-title, .form-label {
  color: #f6f1e8 !important;
}

.tx-time, .pay-subtitle, .form-hint, .empty-state-text {
  color: rgba(246, 241, 232, 0.62) !important;
}

.store {
  --ink: #09080d;
  --panel: #16141d;
  --line: rgba(244, 239, 230, 0.12);
  --paper: #f6f1e8;
  --muted: rgba(246, 241, 232, 0.62);
  --ember: #ff5a36;
  --gold: #e7c58a;
  color: var(--paper);
  padding: 8px 14px 28px;
}

.store a { color: inherit; text-decoration: none; }
.store button { font: inherit; }

.store-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 16px;
}

.store-back {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 14px;
}

.store-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.store h1 {
  margin: 2px 0 0;
  font-size: 30px;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.store-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--paper);
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 14px;
  outline: none;
}

.store-search:focus { border-color: var(--gold); }

.store-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}

.store-rail::-webkit-scrollbar { display: none; }

.cover-cycle {
  background-size: cover;
  background-position: center;
  animation: coverFade 18s ease-in-out infinite;
}

@keyframes coverFade {
  0%, 16% { background-image: var(--cover-0); }
  20%, 36% { background-image: var(--cover-1); }
  40%, 56% { background-image: var(--cover-2); }
  60%, 76% { background-image: var(--cover-3); }
  80%, 100% { background-image: var(--cover-4); }
}

.store-feature {
  position: relative;
  min-height: 168px;
  border-radius: 18px;
  overflow: hidden;
  background: #241c18 center/cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.store-feature span {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(transparent, rgba(9, 8, 13, 0.92));
}

.store-feature b { display: block; font-size: 18px; }
.store-feature em { font-style: normal; color: var(--gold); font-size: 13px; }

.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.store-tile, .store-poster {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
}

.store-tile { padding: 14px; min-height: 108px; }
.store-tile b, .store-poster b { display: block; }
.store-tile small, .store-poster small { color: var(--muted); }

.store-poster { position: relative; }
.store-cover {
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(160deg, rgba(255, 90, 54, 0.28), transparent 42%),
    #221c28 center/cover no-repeat;
  box-shadow: inset 0 -40px 40px rgba(0, 0, 0, 0.45);
}
.store-poster figcaption { padding: 10px 10px 12px; }
.store-poster b {
  font-size: 14px;
  line-height: 1.15;
  min-height: 32px;
}
.store-price {
  margin-top: 6px;
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
}

.store-hero {
  border-radius: 20px;
  overflow: hidden;
  background: #1b1722;
  margin-bottom: 16px;
}
.store-hero-art {
  height: 220px;
  background: #2a2230 center/cover no-repeat;
}
.store-hero-copy { padding: 14px 14px 16px; }
.store-hero h1 { font-size: 28px; }
.store-meta { color: var(--muted); margin: 6px 0 0; font-size: 14px; }

.store-region { margin: 16px 0 8px; font-size: 15px; font-weight: 700; }
.store-edition {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--paper);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.store-edition[disabled] { opacity: 0.4; }
.store-edition.is-on { border-color: var(--ember); }
.store-edition b { font-weight: 600; }
.store-edition span { color: var(--gold); white-space: nowrap; }

.store-orders { margin-top: 18px; }
.store-order {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.store-note { color: var(--muted); font-size: 13px; }

.sheet-overlay,
.sheet-overlay.active,
.store-sheet {
  z-index: 400 !important;
}

.store-sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: flex-end;
}
.store-sheet-card {
  width: 100%;
  background: #121018;
  border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.store-total { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; margin: 4px 0; }
.store-input {
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c0b10;
  color: var(--paper);
  padding: 13px;
}
.store-pay, .store-cancel {
  width: 100%;
  border-radius: 14px;
  padding: 14px;
  border: 0;
}
.store-pay { background: var(--ember); color: white; font-weight: 700; }
.store-pay:disabled { opacity: 0.6; }
.store-cancel { background: transparent; color: var(--muted); margin-top: 6px; }

.profile-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 16px 16px;
  margin-bottom: 12px;
}

.profile-who {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-face {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  overflow: hidden;
  background: #2a211c;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  flex: 0 0 auto;
}

.profile-face img { width: 100%; height: 100%; object-fit: cover; }
.profile-who h1 { font-size: 22px; }
.profile-balance {
  margin-top: 16px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}
.profile-balance small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 16px;
}

.profile-action, .profile-row {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--paper);
  border-radius: 16px;
  text-align: left;
}

.profile-action { padding: 14px; }
.profile-action b, .profile-row b { display: block; }
.profile-action small, .profile-row small { color: var(--muted); }

.profile-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 8px;
}

.profile-row span { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .store * { transition: none !important; }
}
