*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.45;
  color: var(--nx-text);
  background: #e4e2ef;
  min-height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

.hub-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: var(--space-6);
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(94, 209, 215, 0.35), transparent 55%),
    linear-gradient(165deg, var(--pz-deeper) 0%, var(--nexi-blue) 46%, var(--pz-primary) 100%);
  color: #fff;
}

.phone-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-4) var(--space-3);
}

.phone {
  width: 100%;
  max-width: var(--phone-w);
  height: min(844px, 100dvh - 2rem);
  background: var(--nx-surface);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(10, 22, 40, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 4px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--nx-navy);
  background: var(--nx-card);
  flex-shrink: 0;
}

.status-bar .icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: var(--space-2) var(--space-4);
  background: var(--nx-card);
  border-bottom: 1px solid var(--nx-border);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.app-header h1 {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-4);
  padding-bottom: calc(var(--nav-h) + var(--space-6) + var(--safe-b));
  -webkit-overflow-scrolling: touch;
}

.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--nx-card);
  border-top: 1px solid var(--nx-border);
  display: flex;
  z-index: 20;
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--nx-text-muted);
  min-height: 44px;
  transition: color 0.15s;
}

.bottom-nav a svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
}

.bottom-nav a.active {
  color: var(--nav-active, var(--nx-blue));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

.text-sm {
  font-size: var(--fs-sm);
}

.text-xs {
  font-size: var(--fs-xs);
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.mt-2 {
  margin-top: var(--space-2);
}

.mt-3 {
  margin-top: var(--space-3);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mb-1 {
  margin-bottom: var(--space-1);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-3 {
  margin-bottom: var(--space-3);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stack > * {
  flex-shrink: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.grow {
  flex: 1;
  min-width: 0;
}

.text-center {
  text-align: center;
}

[hidden] {
  display: none !important;
}

button:focus-visible,
a:focus-visible,
.shop-row:focus-visible {
  outline: 2px solid var(--pz-accent);
  outline-offset: 2px;
}

@media (max-width: 430px) {
  .phone-wrap {
    padding: 0;
  }

  .phone {
    max-width: none;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}
