:root {
  --bg: #e9e9ef;
  --surface: #f6f6f7;
  --surface-2: #ffffff;
  --ink: #151515;
  --muted: #777c88;
  --accent: #8c9099;
  --accent-strong: #666b74;
  --ok: #2a7a40;
  --radius: 24px;
  --shadow: 0 12px 24px rgba(21, 21, 21, 0.08);
  --fs-lg: 20px;
  --fs-md1: 16px;
  --fs-md2: 14px;
  --fs-md2: 12px;
  --fs-sm: 10px;
  --fs-xs: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Manrope", "SF Pro Display", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, #fdfdff 0%, transparent 35%),
    radial-gradient(circle at 90% 0%, #f3f4f9 0%, transparent 40%),
    var(--bg);
}

.app-shell {
  width: min(430px, 100vw);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 14px 16px calc(92px + env(safe-area-inset-bottom));
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.header-spacer {
  width: 1px;
  height: 1px;
}

.app-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #4d5563;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #d6d9e0;
}

.user-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.user-name {
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.user-id {
  margin-top: 2px;
  font-size: var(--fs-md);
  color: var(--muted);
}

.section-title {
  font-size: var(--fs-md2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 8px 2px 12px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  animation: rise 350ms ease both;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card strong {
  font-size: var(--fs-md);
}

.card small {
  color: var(--muted);
}

.badge {
  color: var(--ok);
  font-size: var(--fs-md);
  font-weight: 600;
}

.price {
  font-weight: 700;
}

.status-lock {
  color: var(--muted);
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  background: var(--accent);
  color: #fff;
}

.btn.locked {
  background: #c0c2c9;
}

.media-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #8f8f92, #6f7278);
  border-radius: 16px;
  margin-bottom: 14px;
}

.lesson-text {
  margin-top: 8px;
  font-size: var(--fs-md);
  line-height: 1.45;
}

.lesson-text h4 {
  margin: 12px 0 8px;
  text-transform: uppercase;
  font-size: var(--fs-md);
}

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

.lesson-text .big {
  font-size: var(--fs-lg);
  font-weight: 700;
}

.news-item {
  border-top: 1px solid #e4e4e7;
  padding-top: 10px;
  margin-top: 10px;
}

.news-date {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.placeholder {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-md);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(390px, calc(100vw - 22px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(245, 245, 246, 0.88);
  border: 1px solid #d9dbe0;
  border-radius: 20px;
  padding: 8px;
  backdrop-filter: blur(8px);
}

.tab-btn {
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: var(--fs-md2);
  color: #282b31;
  background: var(--surface-2);
  padding: 11px 6px;
}

.tab-btn.active {
  background: var(--accent-strong);
  color: #fff;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .card strong {
    font-size: var(--fs-md);
  }
}
