:root {
  color-scheme: dark;
  --bg: #0a0b28;
  --surface: rgba(27, 27, 75, 0.78);
  --surface-strong: rgba(38, 32, 99, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.055);
  --text: #fffaff;
  --muted: #b7b9db;
  --pink: #ff4fa5;
  --pink-soft: #ff8bcc;
  --violet: #8d62ff;
  --blue: #7ed4ff;
  --gold: #ffc45f;
  --green: #4ce88b;
  --nav: 82px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --app-height: 100vh;
  font-size: 16px;
}

@supports (height: 100dvh) {
  :root {
    --app-height: 100dvh;
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
}
body {
  min-height: var(--app-height);
  color: var(--text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(
      circle at 88% 5%,
      rgba(255, 71, 167, 0.2),
      transparent 25rem
    ),
    radial-gradient(
      circle at 6% 22%,
      rgba(114, 79, 255, 0.25),
      transparent 28rem
    ),
    linear-gradient(165deg, #17184e 0%, #0d1036 48%, #080921 100%);
  background-attachment: fixed;
}

button,
a,
input {
  font: inherit;
}
button {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 99, 181, 0.3);
}
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
}
.hidden {
  display: none !important;
}
.app {
  width: 100%;
  min-height: var(--app-height);
  padding: calc(8px + env(safe-area-inset-top, 0px))
    calc(14px + var(--safe-right)) calc(var(--nav) + var(--safe-bottom) + 22px);
  padding-left: calc(14px + var(--safe-left));
}

.topbar {
  position: sticky;
  z-index: 12;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -8px -14px 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 11px;
  background: linear-gradient(
    to bottom,
    rgba(10, 11, 40, 0.97),
    rgba(10, 11, 40, 0.76),
    transparent
  );
  backdrop-filter: blur(18px);
}
.profile-compact {
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  min-width: 0;
  text-align: left;
  cursor: pointer;
}
.profile-compact img {
  width: 46px;
  height: 46px;
  border-radius: 17px;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}
.profile-compact span {
  min-width: 0;
}
.profile-compact strong {
  display: block;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.96rem;
}
.profile-compact small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}
.profile-compact i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(76, 232, 139, 0.75);
}
.wallets {
  display: flex;
  gap: 7px;
}
.wallet {
  height: 34px;
  padding: 0 10px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}
.wallet svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}
.wallet:first-child svg {
  color: var(--gold);
}
.wallet:last-child svg {
  color: var(--pink-soft);
}
.wallet b {
  font-size: 0.84rem;
}

.center-state {
  width: 100%;
  min-height: var(--app-height);
  padding: 32px 24px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 12px;
}
.center-state h1 {
  margin: 0;
  font-size: 2rem;
}
.center-state p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.brand-mark {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: linear-gradient(145deg, var(--pink), var(--violet));
  box-shadow: 0 24px 70px rgba(255, 79, 165, 0.34);
}
.brand-mark svg {
  width: 50px;
  height: 50px;
  fill: none;
  stroke: white;
  stroke-width: 1.8;
}
.loader {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(var(--pink), transparent 60%);
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 4px),
    #000 0
  );
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0);
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 13px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.primary-button {
  background: linear-gradient(135deg, var(--pink), #ef4bd0);
  box-shadow: 0 13px 32px rgba(255, 79, 165, 0.28);
}
.full-width {
  width: 100%;
}
.secondary-button {
  background: rgba(255, 255, 255, 0.09);
}
button:disabled {
  opacity: 0.48;
  cursor: wait;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: calc(var(--nav) + var(--safe-bottom));
  padding: 8px 10px var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(12, 13, 48, 0.9);
  border-radius: 28px 28px 0 0;
  backdrop-filter: blur(22px);
  box-shadow: 0 -18px 50px rgba(2, 3, 20, 0.5);
}
.bottom-nav button {
  border: 0;
  background: transparent;
  color: #bfc3e6;
  min-width: 0;
  min-height: 62px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  cursor: pointer;
}
.bottom-nav svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
}
.bottom-nav span {
  font-size: 0.71rem;
}
.bottom-nav button.active {
  color: var(--pink-soft);
}
.bottom-nav button.active svg {
  filter: drop-shadow(0 0 10px rgba(255, 79, 165, 0.75));
}

.screen-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 13px 2px 16px;
}
.screen-head h1 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.04em;
}
.screen-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 23px 3px 11px;
}
.section-title h2 {
  margin: 0;
  font-size: 1.03rem;
}
.section-title button {
  border: 0;
  background: none;
  color: #d2c9ff;
  padding: 8px;
  cursor: pointer;
}

.hero {
  min-height: 258px;
  position: relative;
  overflow: hidden;
  padding: 24px 44% 24px 22px;
  border-radius: 30px;
  background:
    radial-gradient(
      circle at 92% 24%,
      rgba(255, 102, 186, 0.28),
      transparent 34%
    ),
    linear-gradient(135deg, rgba(70, 44, 142, 0.95), rgba(25, 28, 86, 0.94));
  box-shadow:
    0 24px 65px rgba(4, 5, 27, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.07);
}
.hero-art {
  position: absolute;
  right: -3%;
  bottom: -8%;
  width: 49%;
  max-width: 300px;
  filter: drop-shadow(0 26px 32px rgba(4, 4, 28, 0.42));
  pointer-events: none;
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ffc1df;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.hero-kicker svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.hero h1 {
  max-width: 330px;
  margin: 13px 0 10px;
  font-size: clamp(2.2rem, 8vw, 3rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}
.hero p {
  max-width: 360px;
  margin: 0 0 19px;
  color: #d8daf5;
  line-height: 1.46;
}
.hero-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.feature-card,
.catalog-card,
.stat-card,
.relation-card,
.panel {
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  border-radius: 22px;
  box-shadow:
    0 15px 35px rgba(3, 4, 25, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.055);
}
.feature-card {
  min-height: 144px;
  border: 0;
  padding: 16px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  right: -35px;
  top: -35px;
  border-radius: 50%;
  background: rgba(255, 86, 169, 0.08);
}
.feature-card > svg:first-child {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--pink-soft);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 9px rgba(255, 79, 165, 0.3));
}
.feature-card b {
  display: block;
  font-size: 0.98rem;
}
.feature-card span {
  display: block;
  margin-top: 5px;
  padding-right: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.feature-card .arrow {
  position: absolute;
  right: 11px;
  bottom: 13px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #c8cdf5;
  stroke-width: 2;
}
.panel {
  padding: 17px;
}
.daily-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.daily-row > svg {
  width: 38px;
  height: 38px;
  color: var(--gold);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.daily-row div {
  flex: 1;
}
.daily-row b,
.daily-row small {
  display: block;
}
.daily-row small {
  margin-top: 3px;
  color: var(--muted);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 11px;
}
.catalog-card {
  position: relative;
  min-width: 0;
  min-height: 310px;
  overflow: hidden;
  padding: 13px;
  display: flex;
  flex-direction: column;
}
.gift-art {
  height: 138px;
  flex: 0 0 138px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px;
  border-radius: 19px;
  background: radial-gradient(
    circle,
    rgba(255, 90, 174, 0.2),
    rgba(141, 98, 255, 0.055) 48%,
    transparent 72%
  );
}
.gift-art img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 124px;
  max-height: 124px;
  object-fit: contain;
  filter: drop-shadow(0 13px 13px rgba(4, 4, 30, 0.3));
}
.gift-art svg {
  width: 68px;
  height: 68px;
  fill: rgba(255, 79, 165, 0.17);
  stroke: var(--pink-soft);
  stroke-width: 1.45;
  filter: drop-shadow(0 0 12px rgba(255, 79, 165, 0.4));
}
.catalog-card h3 {
  min-height: 2.35em;
  margin: 8px 0 3px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.93rem;
  line-height: 1.18;
}
.catalog-card p {
  min-height: 2.7em;
  margin: 0 0 8px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}
.price {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-weight: 800;
}
.price svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.8;
}
.catalog-card .buy {
  width: 100%;
  min-height: 42px;
  margin-top: auto;
  border: 0;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--pink), #e84fc8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 760;
  line-height: 1.15;
  cursor: pointer;
}
.catalog-card .price + .buy {
  margin-top: 8px;
}
.catalog-card .buy svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: var(--gold);
  stroke: var(--gold);
  stroke-width: 1.4;
}
.shop-notice {
  margin-top: 14px;
}
.shop-notice small,
.panel-note {
  color: var(--muted);
}
.panel-note {
  margin-bottom: 0;
  font-size: 0.8rem;
}

.search-box {
  height: 48px;
  background: rgba(7, 9, 34, 0.55);
  border-radius: 16px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 9px;
}
.search-box svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
}
.people-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.person {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  padding: 9px;
  border-radius: 17px;
}
.person img {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
}
.person b,
.person small {
  display: block;
}
.person small {
  margin-top: 2px;
  color: var(--muted);
}
.person button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  background: #393d83;
  color: white;
}

.profile-hero {
  text-align: center;
  padding: 24px 18px;
}
.profile-avatar {
  width: 104px;
  height: 104px;
  border-radius: 34px;
  object-fit: cover;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
}
.profile-hero h1 {
  margin: 12px 0 3px;
}
.profile-hero p {
  margin: 0;
  color: var(--muted);
}
.level {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--gold);
}
.level svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 11px;
}
.stat-card {
  border: 0;
  color: var(--text);
  text-align: center;
  padding: 14px 8px;
}
.stat-card b {
  display: block;
  font-size: 1.15rem;
}
.stat-card span {
  color: var(--muted);
  font-size: 0.72rem;
}
.relation-card {
  width: 100%;
  border: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  text-align: left;
}
.relation-card img {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  object-fit: cover;
}
.relation-card div {
  flex: 1;
}
.relation-card b,
.relation-card span {
  display: block;
}
.relation-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}
.relation-card > svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
}
.ref-code {
  display: flex;
  gap: 8px;
}
.ref-code code {
  flex: 1;
  padding: 13px;
  border-radius: 14px;
  background: rgba(7, 9, 34, 0.55);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}
.icon-button {
  width: 48px;
  height: 48px;
  border: 0;
  background: #303477;
  border-radius: 14px;
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.room-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.room-head div b,
.room-head div small {
  display: block;
}
.room-head div small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}
.status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(75, 234, 138, 0.12);
  color: #7cf4aa;
  font-size: 0.76rem;
}
.table-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}
.table-actions button {
  width: 100%;
  padding-inline: 10px;
}
.table-actions svg,
#find-friend svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.player-ring {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 13px;
  margin: 22px 0;
}
.player-chip {
  width: 84px;
  text-align: center;
}
.player-chip img {
  width: 62px;
  height: 62px;
  border-radius: 21px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}
.player-chip.current img {
  box-shadow: 0 0 25px rgba(255, 79, 165, 0.6);
}
.player-chip span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px;
  font-size: 0.75rem;
}
.player-chip small {
  display: block;
  margin-top: 5px;
  color: var(--pink-soft);
  font-size: 0.68rem;
}
.player-chip button {
  min-height: 26px;
  margin-top: 5px;
  border: 0;
  border-radius: 9px;
  padding: 0 8px;
  background: rgba(255, 79, 165, 0.16);
  color: #ffb8dc;
  font-size: 0.68rem;
}
.player-chip button:disabled {
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
}
.friend-group-title {
  margin: 18px 2px 8px;
  color: #ffc2df;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.online-avatar {
  position: relative;
}
.online-avatar i {
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px #24265f;
}
.turn-card {
  min-height: 230px;
  padding: 26px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 28px;
  background: linear-gradient(145deg, #fff5ff, #e9dcff);
  color: #171231;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
}
.turn-card small {
  color: #a13b8b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}
.turn-card h2 {
  margin: 18px 0;
  font-size: 1.35rem;
  line-height: 1.4;
}
.timer {
  color: #b33e8f;
  font-weight: 900;
}
.empty-state {
  padding: 36px 20px;
  text-align: center;
}
.empty-state > svg {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: #aa99ff;
  stroke-width: 1.5;
}
.empty-state h2 {
  margin: 13px 0 7px;
}
.empty-state p {
  max-width: 340px;
  margin: 0 auto 18px;
  color: var(--muted);
  line-height: 1.5;
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(var(--nav) + var(--safe-bottom) + 18px);
  transform: translate(-50%, 20px);
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 11px 15px;
  border-radius: 14px;
  background: #fff9ff;
  color: #241536;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  font-weight: 700;
  font-size: 0.85rem;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  width: min(520px, calc(100% - 24px));
  max-height: calc(var(--app-height) - 40px);
  overflow: auto;
  border: 0;
  border-radius: 26px;
  padding: 24px;
  background: linear-gradient(155deg, #272866, #12153e);
  color: var(--text);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.65);
}
dialog::backdrop {
  background: rgba(3, 5, 24, 0.76);
  backdrop-filter: blur(9px);
}
.dialog-close {
  position: sticky;
  float: right;
  top: 0;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 13px;
  background: #343879;
  color: white;
  display: grid;
  place-items: center;
}
.dialog-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.modal-title {
  margin: 6px 48px 16px 0;
}
.form-field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}
.form-field input {
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: rgba(7, 9, 34, 0.58);
  color: white;
  padding: 0 13px;
  outline: 0;
}
.progress {
  height: 9px;
  margin-top: 12px;
  border-radius: 5px;
  background: rgba(5, 7, 31, 0.6);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--violet));
}
.inline-error {
  margin-top: 8px;
  color: #ff95ae;
  font-size: 0.8rem;
}
.skeleton {
  height: 120px;
  border-radius: 20px;
  background: linear-gradient(90deg, #1a1e54, #333779, #1a1e54);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (min-width: 600px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  :root {
    --nav: 88px;
  }
  .app {
    padding-right: calc(clamp(28px, 4vw, 72px) + var(--safe-right));
    padding-left: calc(clamp(28px, 4vw, 72px) + var(--safe-left));
  }
  .topbar {
    margin-right: calc(-1 * (clamp(28px, 4vw, 72px) + var(--safe-right)));
    margin-left: calc(-1 * (clamp(28px, 4vw, 72px) + var(--safe-left)));
    padding-right: calc(clamp(28px, 4vw, 72px) + var(--safe-right));
    padding-left: calc(clamp(28px, 4vw, 72px) + var(--safe-left));
  }
  .hero {
    min-height: 320px;
    padding: 42px min(38vw, 520px) 42px 38px;
  }
  .hero-art {
    right: 3%;
    bottom: -18%;
    width: min(32vw, 430px);
    max-width: 430px;
  }
  .hero h1 {
    max-width: 620px;
    font-size: clamp(3rem, 5vw, 4.8rem);
  }
  .hero p {
    max-width: 650px;
    font-size: 1.05rem;
  }
  .feature-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
  .bottom-nav {
    border-radius: 0;
    padding-right: max(6vw, var(--safe-right));
    padding-left: max(6vw, var(--safe-left));
  }
  .bottom-nav button {
    min-height: 68px;
  }
  dialog {
    width: min(680px, calc(100% - 48px));
  }
}

@media (max-width: 440px) {
  .hero {
    min-height: 286px;
    padding: 22px 35% 22px 19px;
  }
  .hero-art {
    right: -13%;
    bottom: -4%;
    width: 58%;
  }
  .hero p {
    font-size: 0.87rem;
  }
  .hero .secondary-button {
    display: none;
  }
}

@media (max-width: 380px) {
  :root {
    font-size: 15px;
  }
  .app {
    padding-right: calc(10px + var(--safe-right));
    padding-left: calc(10px + var(--safe-left));
  }
  .topbar {
    margin-right: calc(-10px - var(--safe-right));
    margin-left: calc(-10px - var(--safe-left));
    padding-right: calc(10px + var(--safe-right));
    padding-left: calc(10px + var(--safe-left));
  }
  .profile-compact img {
    width: 42px;
    height: 42px;
  }
  .profile-compact strong {
    max-width: 105px;
  }
  .wallet {
    padding-right: 7px;
  }
  .wallets {
    gap: 4px;
  }
  .hero {
    padding-left: 17px;
  }
  .feature-card {
    min-height: 134px;
    padding: 13px;
  }
  .catalog-card {
    min-height: 286px;
    padding: 10px;
  }
  .gift-art {
    height: 116px;
    flex-basis: 116px;
    padding: 5px;
  }
  .gift-art img {
    max-width: 106px;
    max-height: 106px;
  }
  .bottom-nav span {
    font-size: 0.65rem;
  }
  .bottom-nav svg {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
