:root {
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --blue: #2F80ED;
  --blue-soft: #EAF3FF;
  --text: #1F2937;
  --muted: #6B7280;
  --line: #E5E7EB;
  --green: #22C55E;
  --green-soft: #EAFBF1;
  --red: #EF4444;
  --red-soft: #FEECEC;
  --gold: #F59E0B;
  --gold-soft: #FFF7D6;
  --shadow: 0 4px 20px rgba(0, 0, 0, .06);
  --nav-height: 84px;
  --app-visual-height: 100dvh;
  --keyboard-offset: 0px;
}

html[data-theme="dark"] {
  --bg: #0B1120;
  --card: #111827;
  --blue: #60A5FA;
  --blue-soft: rgba(96, 165, 250, .14);
  --text: #F8FAFC;
  --muted: #A7B0C2;
  --line: #243044;
  --green: #22C55E;
  --green-soft: rgba(34, 197, 94, .14);
  --red: #F87171;
  --red-soft: rgba(248, 113, 113, .14);
  --gold: #F59E0B;
  --gold-soft: rgba(245, 158, 11, .16);
  --shadow: 0 10px 34px rgba(0, 0, 0, .36);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.recovery-notice {
  max-width: 448px;
  margin: 16px auto 0;
  padding: 16px;
  border-radius: 20px;
  background: var(--gold-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.recovery-notice p {
  margin: 8px 0;
}

.recovery-notice a {
  color: var(--blue);
  font-weight: 600;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transform: scale(.98);
}

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(var(--nav-height) + 28px + env(safe-area-inset-bottom));
  position: relative;
}

.startup-message {
  min-height: 220px;
  padding: 24px;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: var(--shadow);
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.startup-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  border: 4px solid rgba(47, 128, 237, .16);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: startup-spin .8s linear infinite;
}

.startup-message strong {
  color: var(--text);
  font-size: 20px;
}

.startup-message span,
.startup-message small {
  color: var(--muted);
  line-height: 1.5;
}

@keyframes startup-spin {
  to {
    transform: rotate(360deg);
  }
}

.screen {
  display: grid;
  gap: 16px;
  animation: rise .25s ease;
}

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

.card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  min-height: 236px;
  padding: 24px 22px 20px;
  display: grid;
  grid-template-columns: 150px 1fr;
  grid-template-rows: 1fr auto;
  column-gap: 22px;
  row-gap: 18px;
  align-items: center;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .98));
}

.hero-card::after {
  content: "";
  width: 172px;
  height: 172px;
  border-radius: 48px;
  background: linear-gradient(145deg, rgba(47, 128, 237, .13), rgba(34, 197, 94, .10));
  position: absolute;
  right: -46px;
  top: -46px;
  transform: rotate(17deg);
}

.hero-card::before {
  content: "";
  width: 154px;
  height: 136px;
  border-radius: 44px;
  background: rgba(245, 158, 11, .12);
  position: absolute;
  right: 18px;
  top: 66px;
  transform: rotate(-7deg);
}

.hero-top,
.hero-brand,
.hero-stats,
.hero-actions {
  position: relative;
  z-index: 1;
}

.hero-top {
  display: contents;
}

.hero-logo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(15, 23, 42, .12));
  align-self: center;
  justify-self: center;
}

.hero-brand {
  min-height: 118px;
  padding-right: 4px;
  display: grid;
  align-content: center;
  justify-items: start;
  grid-column: 2;
  grid-row: 1;
}

.hero-name {
  margin: 0;
  color: var(--text);
  font-size: 46px;
  font-weight: 900;
  line-height: .92;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.hero-accent {
  margin-top: 7px;
  color: #E45722;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.hero-caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.hero-stats {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.stat-chip {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #F8FAFC;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
}

.stat-chip .icon {
  width: 20px;
  height: 20px;
}

.stat-chip.solved .icon {
  color: var(--green);
}

.stat-chip.correct .icon {
  color: var(--blue);
}

.stat-chip.wrong .icon {
  color: var(--red);
}

.subscription-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 52px;
  padding: 12px 17px;
  border-radius: 22px;
  background: var(--gold-soft);
  color: #A16207;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(245, 158, 11, .12);
  position: absolute;
  right: 22px;
  top: 18px;
  z-index: 2;
}

.subscription-pill .icon {
  width: 26px;
  height: 26px;
}

.subscription-pill.active {
  background: var(--green-soft);
  color: #15803D;
}

@media (max-width: 430px) {
  .hero-card {
    min-height: 218px;
    padding: 20px 18px 18px;
    grid-template-columns: 126px 1fr;
    column-gap: 16px;
    row-gap: 16px;
  }

  .hero-logo {
    width: 126px;
    height: 126px;
  }

  .hero-brand {
    min-height: 104px;
    padding-top: 22px;
    padding-right: 0;
  }

  .hero-name {
    font-size: 39px;
  }

  .hero-accent {
    margin-top: 6px;
    font-size: 18px;
  }

  .hero-caption {
    margin-top: 8px;
    font-size: 13px;
  }

  .subscription-pill {
    min-height: 44px;
    padding: 9px 13px;
    border-radius: 18px;
    font-size: 13px;
    right: 18px;
    top: 5px;
  }

  .subscription-pill .icon {
    width: 22px;
    height: 22px;
  }

  .stat-chip {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 10px;
  }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.section-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.icon-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all .25s ease;
}

.icon-btn {
  width: 44px;
  padding: 0;
}

.small-btn {
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
}

.small-btn.danger {
  background: var(--red-soft);
  color: #B91C1C;
  box-shadow: none;
}

.icon-btn:hover,
.small-btn:hover,
.menu-card:hover,
.ticket-card:hover,
.answer-btn:hover,
.leader-card:hover,
.mistake-card:hover {
  transform: translateY(-2px);
}

.icon {
  width: 28px;
  height: 28px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.menu-card {
  min-height: 110px;
  width: 100%;
  padding: 20px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 16px;
  color: var(--text);
  text-align: left;
  transition: all .25s ease;
}

.menu-card.locked {
  border: 1px solid rgba(245, 158, 11, .22);
  background:
    linear-gradient(180deg, rgba(255, 251, 235, .9), #FFFFFF);
}

.program-entry {
  min-height: 118px;
  border: 1px solid rgba(47, 128, 237, .16);
  background:
    radial-gradient(circle at 90% 10%, rgba(47, 128, 237, .12), transparent 32%),
    #FFFFFF;
}

.program-entry.locked {
  border-color: rgba(245, 158, 11, .28);
  background:
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, .18), transparent 34%),
    #FFFFFF;
}

.menu-card .chevron.lock {
  color: #B45309;
}

.menu-card .chevron.open {
  min-width: 78px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.hard-access-btn {
  margin-top: -6px;
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: none;
}

.menu-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
}

.menu-icon.green {
  background: var(--green-soft);
  color: #16A34A;
}

.menu-icon.gold {
  background: var(--gold-soft);
  color: #B45309;
}

.menu-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.menu-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.menu-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.menu-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.chevron {
  color: #CBD5E1;
}

.tickets-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-card {
  min-height: 104px;
  padding: 15px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: left;
  color: var(--text);
  transition: all .25s ease;
}

.ticket-card.perfect {
  background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 100%);
  border-color: rgba(34, 197, 94, .34);
  box-shadow: 0 4px 20px rgba(34, 197, 94, .12);
}

.ticket-card.perfect .ticket-number {
  color: #15803D;
}

.ticket-card.perfect .ticket-meta {
  color: #16A34A;
  font-weight: 800;
}

.ticket-card.perfect .progress {
  background: rgba(34, 197, 94, .18);
}

.ticket-card.perfect .progress-fill {
  background: var(--green);
}

.ticket-number {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
}

.ticket-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.program-hero {
  padding: 20px;
  display: grid;
  gap: 12px;
  background:
    radial-gradient(circle at 90% 0%, rgba(47, 128, 237, .14), transparent 35%),
    #FFFFFF;
}

.program-badge {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.program-badge .icon {
  width: 18px;
  height: 18px;
}

.program-hero h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.program-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.program-stage-list {
  display: grid;
  gap: 12px;
}

.program-stage-card {
  width: 100%;
  padding: 16px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: start;
  color: inherit;
  text-align: left;
  transition: all .25s ease;
}

.program-stage-card:not(.locked):hover {
  transform: translateY(-2px);
}

.program-stage-card.locked {
  opacity: .74;
}

.program-stage-number {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
}

.program-stage-card.completed .program-stage-number {
  background: var(--green-soft);
  color: #16A34A;
}

.program-stage-card.locked .program-stage-number {
  background: #F1F5F9;
  color: #94A3B8;
}

.program-stage-status {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.program-stage-card.completed .program-stage-status {
  color: #16A34A;
}

.program-stage-card.locked .program-stage-status {
  color: var(--muted);
}

.program-stage-card h2 {
  margin: 4px 0 6px;
  font-size: 17px;
  line-height: 1.25;
}

.program-stage-card p,
.program-stage-card small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.program-stage-points,
.program-funnel-points {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.program-stage-points li,
.program-funnel-points li {
  position: relative;
  padding-left: 16px;
}

.program-stage-points li::before,
.program-funnel-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--blue);
}

.program-stage-card small {
  margin-top: 8px;
  display: block;
  font-weight: 800;
}

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

.program-stage-lock .icon {
  width: 22px;
  height: 22px;
}

.program-review-video-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.program-review-video-head {
  display: grid;
  gap: 4px;
}

.program-review-video-head strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.program-review-video-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.program-review-video {
  width: 100%;
  max-height: 360px;
  border-radius: 20px;
  background: #0F172A;
  display: block;
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  transition: width .25s ease;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.question-chip {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--line);
  font-size: 14px;
  font-weight: 800;
  transition: all .25s ease;
}

.question-chip.correct {
  background: var(--green-soft);
  border-color: rgba(34, 197, 94, .35);
  color: #15803D;
}

.question-chip.wrong {
  background: var(--red-soft);
  border-color: rgba(239, 68, 68, .35);
  color: #B91C1C;
}

.question-nav {
  width: 100%;
  min-height: 72px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.question-nav::-webkit-scrollbar {
  display: none;
}

.question-nav-item {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #F8FAFC;
  border: 2px solid #E5E7EB;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  position: relative;
  flex: 0 0 48px;
  scroll-snap-align: center;
  transition: all .25s ease;
}

.question-nav-item::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
  transition: all .25s ease;
}

.question-nav-item.correct {
  background: var(--green-soft);
  border-color: rgba(34, 197, 94, .32);
  color: #15803D;
}

.question-nav-item.correct::after {
  background: var(--green);
}

.question-nav-item.wrong {
  background: var(--red-soft);
  border-color: rgba(239, 68, 68, .32);
  color: #B91C1C;
}

.question-nav-item.wrong::after {
  background: var(--red);
}

.question-nav-item.current {
  background: var(--blue);
  border-color: var(--blue);
  color: #FFFFFF;
  box-shadow: 0 8px 22px rgba(47, 128, 237, .25);
}

.question-nav-item.current::after {
  background: rgba(255, 255, 255, .85);
}

.question-nav-item:hover {
  transform: translateY(-2px);
}

.question-card {
  min-height: 220px;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.timer {
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #F8FAFC;
  color: var(--text);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.question-text {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.question-media {
  width: 100%;
  aspect-ratio: 540 / 202;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #EEF2F7;
  position: relative;
}

.question-media svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.question-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #FFFFFF;
  opacity: 0;
  transition: opacity .25s ease;
}

.question-media.loaded img {
  opacity: 1;
}

.question-media-loader {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 8px;
  background: #F8FAFC;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.question-media-loader .startup-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
  margin: 0;
}

.question-media.loading .question-media-loader {
  display: grid;
}

.question-media-fallback {
  width: 100%;
  height: 100%;
  padding: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  background: #F8FAFC;
  color: var(--muted);
}

.question-media-fallback strong {
  color: var(--text);
  font-size: 16px;
}

.question-media-fallback span {
  font-size: 13px;
  line-height: 1.35;
}

.answers {
  display: grid;
  gap: 16px;
}

.answer-btn {
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--card);
  border: 2px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  transition: all .25s ease;
}

.answer-index {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #F8FAFC;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  flex: 0 0 auto;
}

.answer-btn.correct {
  background: var(--green);
  border-color: var(--green);
  color: #FFFFFF;
}

.answer-btn.wrong {
  background: var(--red);
  border-color: var(--red);
  color: #FFFFFF;
}

.answer-btn.exam-selected {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--text);
}

.answer-btn.exam-selected .answer-index {
  background: var(--blue);
  color: #FFFFFF;
}

.exam-rules {
  padding: 20px;
  display: grid;
  gap: 10px;
}

.exam-rules h2 {
  margin: 0 0 4px;
  font-size: 19px;
}

.exam-rules p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.exam-rule-note {
  margin-top: 6px;
  padding: 14px;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.exam-analysis {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.exam-analysis h2 {
  margin: 0 0 4px;
  font-size: 20px;
  color: var(--text);
}

.exam-analysis p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.exam-mistake-list,
.exam-topic-list {
  display: grid;
  gap: 10px;
}

.exam-mistake-row,
.exam-topic-row,
.exam-practice-note,
.exam-access-offer {
  padding: 14px;
  border-radius: 18px;
  display: grid;
  gap: 7px;
}

.exam-mistake-row {
  background: var(--red-soft);
  color: #7F1D1D;
}

.exam-topic-row,
.exam-practice-note {
  background: #F8FAFC;
}

.exam-mistake-row strong,
.exam-topic-row strong,
.exam-practice-note strong,
.exam-access-offer strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.exam-mistake-row span,
.exam-topic-row span,
.exam-practice-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.exam-mistake-row p {
  color: #7F1D1D;
  font-weight: 700;
}

.exam-analysis-text {
  padding: 14px;
  border-radius: 18px;
  background: #F8FAFC;
}

.exam-access-offer {
  background: var(--gold-soft);
}

.exam-access-offer strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-access-offer strong .icon {
  width: 20px;
  height: 20px;
  color: var(--gold);
}

.exam-access-offer p {
  color: #92400E;
}

.exam-offer-bait {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .62);
  font-weight: 800;
}

.trial-access-card {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.trial-access-card > div {
  display: grid;
  gap: 5px;
}

.trial-access-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 17px;
}

.trial-access-card strong .icon {
  width: 22px;
  height: 22px;
}

.trial-access-card span {
  color: var(--muted);
  font-size: 14px;
}

.trial-subscription-btn {
  width: 100%;
  min-height: 62px;
  padding: 10px 18px;
  border-radius: 20px;
  background: var(--blue);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  gap: 1px;
  font-weight: 800;
  transition: all .25s ease;
}

.trial-subscription-btn span {
  font-size: 18px;
}

.trial-subscription-btn small {
  font-size: 12px;
  letter-spacing: .08em;
}

.trial-discount {
  padding: 14px;
  border-radius: 16px;
  background: #FFF7D6;
  display: grid;
  gap: 7px;
}

.trial-discount > span {
  color: #92400E;
  font-weight: 900;
  line-height: 1.4;
}

.trial-discount p {
  margin: 0;
  color: #92400E;
  font-size: 14px;
  line-height: 1.45;
}

.trial-discount > strong {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.trial-discount del {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.trial-discount b {
  color: #B45309;
  font-size: 24px;
}

.community-discount {
  padding: 16px;
  border-radius: 18px;
  background: var(--blue-soft);
  border: 1px solid rgba(47, 128, 237, .18);
  display: grid;
  gap: 7px;
}

.community-discount > span {
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
}

.community-discount p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.community-discount > strong {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.community-discount del {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.community-discount b {
  color: var(--blue);
  font-size: 25px;
}

.answer-btn.correct .answer-index,
.answer-btn.wrong .answer-index {
  background: rgba(255, 255, 255, .22);
  color: #FFFFFF;
}

.answer-btn:disabled {
  cursor: default;
}

.result-card.hint {
  background: var(--blue-soft);
  border-color: rgba(47, 128, 237, .18);
}

.result-card.hint .result-title {
  color: var(--blue);
}

.hint-btn {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 2px solid rgba(47, 128, 237, .18);
  font-size: 16px;
  font-weight: 800;
  transition: all .25s ease;
}

.hint-btn:hover {
  transform: translateY(-2px);
}

.primary-btn,
.secondary-btn,
.danger-btn,
.premium-btn {
  width: 100%;
  min-height: 60px;
  padding: 0 18px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  transition: all .25s ease;
}

.primary-btn {
  background: var(--blue);
  color: #FFFFFF;
}

.secondary-btn {
  background: #FFFFFF;
  color: var(--text);
  border: 2px solid var(--line);
}

.danger-btn {
  background: var(--red);
  color: #FFFFFF;
}

.premium-btn {
  background: var(--gold);
  color: #FFFFFF;
}

.result-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.result-card.success {
  background: var(--green-soft);
  color: #14532D;
}

.result-card.error {
  background: var(--red-soft);
  color: #7F1D1D;
}

.result-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
}

.result-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.answer-explanation {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  color: var(--text);
}

.answer-explanation strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
}

.answer-explanation p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.leader-card {
  min-height: 80px;
  padding: 20px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  transition: all .25s ease;
}

.leader-card.place-1 {
  background: #FFF7D6;
}

.leader-card.place-2 {
  background: #F1F5F9;
}

.leader-card.place-3 {
  background: #FFE7D6;
}

.rank {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.leader-name {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.leader-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.leader-passed-badge {
  width: fit-content;
  margin-top: 9px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #15803D;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
}

.leader-score {
  min-width: 62px;
  text-align: right;
  font-size: 18px;
  font-weight: 800;
  color: var(--blue);
}

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

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--blue), #76B6FF);
  color: #FFFFFF;
  font-size: 36px;
  font-weight: 800;
  box-shadow: 0 12px 34px rgba(47, 128, 237, .24);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.profile-id {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.exam-passed-access-btn {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 20px;
  background: var(--green-soft);
  color: #15803D;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(34, 197, 94, .12);
  transition: all .25s ease;
}

.exam-passed-access-btn:not(:disabled):hover {
  transform: translateY(-2px);
}

.exam-passed-access-btn.submitted {
  cursor: default;
}

.exam-passed-access-btn .icon {
  width: 24px;
  height: 24px;
}

.support-btn {
  width: 100%;
  min-height: 58px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 800;
  color: var(--blue);
  background: var(--blue-soft);
  box-shadow: none;
}

.theme-card,
.friend-invite-card,
.channel-trial-card {
  padding: 18px;
}

.theme-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
}

.theme-card-icon,
.friend-invite-icon,
.channel-trial-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
}

.theme-card-icon .icon,
.friend-invite-icon .icon,
.channel-trial-icon .icon {
  width: 27px;
  height: 27px;
}

.theme-card-text h2,
.friend-invite-card h2,
.channel-trial-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.theme-card-text p,
.friend-invite-card p,
.channel-trial-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.theme-switch {
  width: 62px;
  height: 36px;
  padding: 4px;
  border-radius: 999px;
  background: #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: all .25s ease;
}

.theme-switch span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
  transition: all .25s ease;
}

.theme-switch.active {
  justify-content: flex-end;
  background: var(--blue);
}

.friend-invite-card {
  display: grid;
  gap: 15px;
  background:
    radial-gradient(circle at 88% 8%, rgba(47, 128, 237, .13), transparent 32%),
    var(--card);
}

.channel-trial-card {
  display: grid;
  gap: 15px;
  background:
    radial-gradient(circle at 88% 8%, rgba(245, 158, 11, .15), transparent 34%),
    var(--card);
}

.friend-invite-top,
.channel-trial-top {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
}

.friend-progress {
  display: grid;
  gap: 8px;
}

.friend-progress-info {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
}

.friend-progress-info span {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.friend-progress-info small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.friend-progress-info b {
  color: var(--blue);
  font-size: 13px;
  text-align: right;
}

.friend-progress-bar {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.friend-progress-bar span {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #22C55E);
  display: block;
  transition: width .25s ease;
}

.friend-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #F8FAFC;
}

.friend-link-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-all;
}

.friend-link-row button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.friend-invite-status,
.channel-trial-status {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--green-soft);
  color: #15803D;
  font-weight: 800;
}

.friend-invite-btn,
.channel-trial-btn {
  width: 100%;
  min-height: 58px;
  border-radius: 20px;
  background: var(--blue);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 900;
  transition: all .25s ease;
}

.friend-invite-btn:hover,
.channel-trial-btn:hover {
  transform: translateY(-2px);
}

.channel-notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .42);
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
}

.channel-notice-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.channel-notice {
  position: relative;
  width: min(100%, 420px);
  padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 94% 6%, rgba(245, 158, 11, .18), transparent 34%),
    var(--card);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  display: grid;
  gap: 14px;
  transform: translateY(12px) scale(.98);
  transition: all .25s ease;
}

.channel-notice-backdrop.open .channel-notice {
  transform: translateY(0) scale(1);
}

.channel-notice-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: #F8FAFC;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.channel-notice-close .icon {
  width: 20px;
  height: 20px;
}

.channel-notice-icon {
  width: 58px;
  height: 58px;
}

.channel-notice h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
}

.channel-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.channel-notice-status {
  padding: 11px 12px;
  border-radius: 16px;
  background: var(--green-soft);
  color: #15803D;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.friend-invite-note {
  padding-top: 1px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  min-height: 90px;
  padding: 17px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  align-content: center;
  gap: 6px;
}

.stat-value {
  font-size: 25px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.payment-status-card {
  padding: 16px;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.payment-status-card strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.payment-status-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.payment-status-card.pending {
  background: var(--gold-soft);
}

.payment-status-card.bad {
  background: var(--red-soft);
}

.payment-status-card .small-btn {
  width: max-content;
  margin-top: 4px;
}

.payment-email-card {
  position: relative;
  z-index: 1;
  padding: 26px 16px 16px;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: var(--shadow);
  display: grid;
  gap: 9px;
  transform-origin: top center;
  animation: payment-email-open .32s cubic-bezier(.22, 1, .36, 1);
}

.subscription-payment-form {
  display: grid;
  gap: 12px;
  animation: payment-email-open .32s cubic-bezier(.22, 1, .36, 1);
}

.premium-btn {
  position: relative;
  z-index: 2;
}

.payment-email-card label {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.payment-email-card input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #F8FAFC;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: all .25s ease;
}

.payment-email-card input:focus {
  border-color: var(--gold);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
}

.payment-email-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.payment-email-hint.bad {
  color: #B91C1C;
  font-weight: 700;
}

@keyframes payment-email-open {
  from {
    opacity: 0;
    transform: translateY(-22px) scale(.97);
    clip-path: inset(0 0 100% 0 round 20px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    clip-path: inset(0 0 0 0 round 20px);
  }
}

.history-list,
.mistake-list {
  display: grid;
  gap: 12px;
}

.mistakes-analysis {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.mistakes-analysis h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 20px;
}

.mistakes-analysis p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.mistakes-analysis-topics {
  display: grid;
  gap: 10px;
}

.mistakes-topic-row,
.mistakes-practice-note {
  padding: 14px;
  border-radius: 18px;
  background: #F8FAFC;
  display: grid;
  gap: 7px;
}

.mistakes-topic-row:first-child {
  background: var(--red-soft);
}

.mistakes-topic-row strong,
.mistakes-practice-note strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.mistakes-topic-row span,
.mistakes-practice-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.history-row,
.admin-row {
  min-height: 60px;
  padding: 15px 16px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-main {
  min-width: 0;
}

.history-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.history-date {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.history-state {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
}

.history-state.good {
  color: #16A34A;
}

.history-state.bad {
  color: var(--red);
}

.mistake-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  transition: all .25s ease;
}

.mistake-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mistake-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.mistake-answer {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.review-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}

.review-tabs::-webkit-scrollbar {
  display: none;
}

.review-tab {
  min-width: 78px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 2px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: all .25s ease;
}

.review-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #FFFFFF;
}

.review-list {
  display: grid;
  gap: 12px;
}

.reviews-promo {
  overflow: hidden;
  display: grid;
}

.reviews-promo-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #EEF2F7;
  overflow: hidden;
}

.reviews-promo-media-video {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9 / 16;
  max-height: min(70vh, 620px);
  background: #000000;
}

.reviews-promo-media img,
.reviews-promo-media video {
  width: 100%;
  height: 100%;
  display: block;
}

.reviews-promo-media img {
  object-fit: cover;
}

.reviews-promo-video {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: 100%;
  background: transparent;
  object-fit: contain;
}

.reviews-promo-video-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.16) brightness(.72);
  transform: scale(1.12);
  pointer-events: none;
}

.reviews-promo-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
}

.reviews-promo-placeholder .icon {
  width: 62px;
  height: 62px;
}

.reviews-promo-content {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.reviews-promo-content .subscription-pill {
  position: static;
  width: max-content;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 13px;
  box-shadow: none;
}

.reviews-promo-content .subscription-pill .icon {
  width: 22px;
  height: 22px;
}

.reviews-promo-content h2 {
  margin: 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.reviews-promo-text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-card {
  min-height: 82px;
  padding: 16px;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-align: left;
  transition: all .25s ease;
}

.review-card:hover {
  transform: translateY(-2px);
}

.review-number {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
}

.review-meta {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.empty-state {
  min-height: 220px;
  padding: 24px;
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
}

.empty-icon {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
}

.empty-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
}

.empty-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #FFFFFF;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, .08);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(var(--nav-count, 3), 1fr);
  gap: 6px;
}

.nav-btn {
  width: 100%;
  min-width: 0;
  min-height: 62px;
  padding: 7px 4px;
  border-radius: 20px;
  background: transparent;
  color: #9CA3AF;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  transition: all .25s ease;
}

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

.nav-btn .icon {
  width: 28px;
  height: 28px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 80;
  width: 100%;
  max-width: 480px;
  height: 80dvh;
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
  border-radius: 32px 32px 0 0;
  background: #FFFFFF;
  box-shadow: 0 -18px 50px rgba(15, 23, 42, .18);
  transform: translate(-50%, 105%);
  transition: transform .25s ease;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
}

.bottom-sheet.open {
  transform: translate(-50%, 0);
}

.bottom-sheet.program-funnel-sheet {
  height: min(86dvh, calc(var(--app-visual-height) - 12px));
  max-height: calc(var(--app-visual-height) - 12px);
  grid-template-rows: auto minmax(0, 1fr);
}

.bottom-sheet.exam-review-sheet {
  height: min(88dvh, calc(var(--app-visual-height) - 12px));
  max-height: calc(var(--app-visual-height) - 12px);
  grid-template-rows: auto minmax(0, 1fr);
}

.bottom-sheet.exam-review-sheet.keyboard-open {
  bottom: max(var(--keyboard-offset), env(safe-area-inset-bottom));
  height: calc(var(--app-visual-height) - 12px);
  max-height: calc(var(--app-visual-height) - 12px);
  border-radius: 28px 28px 0 0;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.sheet-content {
  overflow: auto;
  padding-bottom: 6px;
  display: grid;
  gap: 16px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.program-funnel {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.program-funnel-slide {
  min-height: 300px;
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 128, 237, .12), transparent 38%),
    #F8FAFC;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.program-funnel-slide h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.program-funnel-slide p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.program-funnel-points {
  font-size: 14px;
  line-height: 1.5;
}

.program-funnel-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 10px 0 calc(4px + env(safe-area-inset-bottom));
  background:
    linear-gradient(to top, #FFFFFF 76%, rgba(255, 255, 255, 0));
}

.program-funnel-actions .primary-btn,
.program-funnel-actions .premium-btn {
  width: 100%;
}

.exam-pass-form {
  display: grid;
  gap: 15px;
}

.exam-pass-intro {
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 4%, rgba(34, 197, 94, .16), transparent 35%),
    #F8FAFC;
  display: grid;
  gap: 8px;
}

.exam-pass-emoji {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--green-soft);
  display: grid;
  place-items: center;
  font-size: 28px;
}

.exam-pass-intro h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.exam-pass-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.exam-pass-form .field {
  display: grid;
  gap: 8px;
}

.exam-pass-form .field span {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.exam-pass-form textarea {
  min-height: 132px;
  max-height: 260px;
  resize: vertical;
  padding: 15px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: #FFFFFF;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  line-height: 1.45;
}

.exam-review-sheet.keyboard-open .sheet-content {
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
}

.exam-review-sheet.keyboard-open .exam-pass-form {
  gap: 12px;
}

.exam-review-sheet.keyboard-open .exam-pass-intro {
  padding: 12px;
  border-radius: 20px;
  grid-template-columns: 42px 1fr;
  align-items: center;
}

.exam-review-sheet.keyboard-open .exam-pass-emoji {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  font-size: 23px;
  grid-row: span 2;
}

.exam-review-sheet.keyboard-open .exam-pass-intro h2 {
  font-size: 16px;
}

.exam-review-sheet.keyboard-open .exam-pass-intro p {
  font-size: 12px;
  line-height: 1.32;
}

.exam-review-sheet.keyboard-open .exam-pass-form textarea {
  min-height: 176px;
  max-height: none;
}

.keyboard-dismiss-btn {
  min-height: 42px;
  margin-top: -4px;
  border-radius: 16px;
  background: #EEF2F7;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.exam-review-sheet.keyboard-open .keyboard-dismiss-btn {
  background: var(--blue-soft);
  color: var(--blue);
}

.exam-pass-upload {
  min-height: 74px;
  padding: 14px;
  border-radius: 20px;
  border: 2px dashed rgba(47, 128, 237, .28);
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  column-gap: 12px;
  cursor: pointer;
}

.exam-pass-upload .icon {
  width: 32px;
  height: 32px;
  grid-row: span 2;
}

.exam-pass-upload span {
  font-size: 15px;
  font-weight: 900;
}

.exam-pass-upload small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.exam-pass-upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.exam-pass-preview {
  display: grid;
  gap: 8px;
}

.exam-pass-photo-chip {
  min-height: 54px;
  padding: 7px;
  border-radius: 16px;
  background: #F8FAFC;
  color: var(--muted);
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  word-break: break-all;
}

.exam-pass-photo-chip img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.exam-celebration-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  padding: 20px;
  background: rgba(15, 23, 42, .42);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
}

.exam-celebration-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.exam-celebration-card {
  position: relative;
  width: min(100%, 420px);
  padding: 28px 22px 22px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, .22), transparent 42%),
    var(--card);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 13px;
  overflow: hidden;
  transform: scale(.96);
  transition: all .25s ease;
}

.exam-celebration-backdrop.open .exam-celebration-card {
  transform: scale(1);
}

.exam-celebration-icon {
  width: 76px;
  height: 76px;
  border-radius: 26px;
  background: var(--gold-soft);
  display: grid;
  place-items: center;
  font-size: 44px;
  animation: exam-pop .8s ease both;
}

.exam-celebration-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
}

.exam-celebration-card p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.exam-confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.exam-confetti {
  position: absolute;
  left: 50%;
  top: 52%;
  font-size: 20px;
  opacity: 0;
  animation: exam-confetti 1.15s ease-out var(--delay) both;
}

@keyframes exam-pop {
  0% { transform: scale(.5) rotate(-8deg); opacity: 0; }
  55% { transform: scale(1.12) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes exam-confetti {
  0% { transform: translate(-50%, -50%) scale(.4) rotate(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x)), -190px) scale(1.2) rotate(var(--rot)); opacity: 0; }
}

.video-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .16), transparent 34%),
    linear-gradient(145deg, #111827, #273349);
  display: grid;
  place-items: center;
  color: #FFFFFF;
}

.video-play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #111827;
  display: block;
}

.video-player-wrap {
  display: grid;
  gap: 12px;
}

.video-status {
  padding: 14px;
  border-radius: 18px;
  background: #FFF7ED;
  color: #9A3412;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.video-status[hidden] {
  display: none;
}

.video-status strong {
  font-size: 15px;
  color: #7C2D12;
}

.video-status span {
  color: #9A3412;
}

.video-status-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.video-status-actions .secondary-btn {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
}

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

body.video-fullscreen-open {
  overflow: hidden;
}

.bottom-sheet.video-fullscreen {
  inset: 0;
  left: 0;
  bottom: auto;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  padding: 0;
  border-radius: 0;
  background: #000000;
  transform: none;
  display: block;
}

.bottom-sheet.video-fullscreen .sheet-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: calc(12px + env(safe-area-inset-top)) 14px 18px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent);
}

.bottom-sheet.video-fullscreen .sheet-title {
  color: #FFFFFF;
}

.bottom-sheet.video-fullscreen .icon-btn {
  background: rgba(255, 255, 255, .18);
  color: #FFFFFF;
  box-shadow: none;
}

.bottom-sheet.video-fullscreen .sheet-content {
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  display: block;
}

.bottom-sheet.video-fullscreen .video-player {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: contain;
}

.bottom-sheet.video-fullscreen .video-sheet-actions {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 3;
  grid-template-columns: 1fr 1fr;
}

.bottom-sheet.video-fullscreen .video-sheet-actions .secondary-btn {
  background: rgba(255, 255, 255, .92);
}

.bottom-sheet.video-fullscreen .video-sheet-actions .primary-btn {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

.explain-card {
  padding: 18px;
  border-radius: 22px;
  background: #F8FAFC;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.admin-panel {
  display: grid;
  gap: 12px;
}

.admin-row {
  align-items: flex-start;
  flex-direction: column;
}

.admin-row strong {
  font-size: 15px;
}

.admin-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-metric {
  min-height: 104px;
  padding: 18px;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: var(--shadow);
  display: grid;
  align-content: center;
  gap: 8px;
}

.admin-metric-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.admin-metric-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.admin-form {
  padding: 18px;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.admin-loader {
  background: #F8FAFC;
  border: 2px solid #E5E7EB;
  box-shadow: none;
}

.admin-loader-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-inline-controls {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-inline-controls select {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #FFFFFF;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  font-weight: 800;
}

.bulk-media-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #E5E7EB;
  overflow: hidden;
}

.bulk-media-progress[hidden] {
  display: none;
}

.bulk-media-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .25s ease;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.admin-media-current {
  padding: 12px;
  border-radius: 18px;
  background: #F8FAFC;
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.admin-media-current img {
  width: 88px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.admin-reviews-media {
  grid-template-columns: 120px 1fr;
}

.admin-reviews-media img {
  width: 120px;
  height: 82px;
}

.admin-video-current {
  padding: 12px;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-video-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #111827;
  display: block;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #FFFFFF;
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  transition: all .25s ease;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, .12);
}

.admin-users {
  display: grid;
  gap: 10px;
}

.admin-user {
  min-height: 74px;
  padding: 16px;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.admin-user-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.admin-user-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.client-log.warn {
  background: var(--gold-soft);
}

.client-log.bad {
  background: var(--red-soft);
}

.client-log-details {
  word-break: break-word;
}

.admin-payment-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.admin-status {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #F8FAFC;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-status.good {
  background: var(--green-soft);
  color: #15803D;
}

.admin-status.bad {
  background: var(--red-soft);
  color: #B91C1C;
}

.hidden-input {
  display: none;
}

.partner-hero {
  display: grid;
  gap: 10px;
  padding: 22px;
  background:
    radial-gradient(circle at 85% 15%, rgba(47, 128, 237, .16), transparent 36%),
    #FFFFFF;
}

.partner-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: 25px;
  line-height: 1.12;
}

.partner-hero p,
.partner-note,
.partner-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.partner-withdraw,
.partner-link-form,
.partner-link-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.partner-link-form input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 2px solid #E5E7EB;
  border-radius: 16px;
  background: #FFFFFF;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  outline: none;
}

.partner-link-form input:focus {
  border-color: rgba(47, 128, 237, .55);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, .10);
}

.partner-status {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.partner-links {
  display: grid;
  gap: 12px;
}

.partner-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.partner-link-head strong {
  color: var(--text);
  font-size: 17px;
}

.partner-link-url {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #F8FAFC;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-all;
}

.partner-link-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.partner-link-stats span {
  padding: 10px;
  border-radius: 14px;
  background: #F8FAFC;
  color: var(--muted);
  font-size: 12px;
}

.partner-link-stats b {
  color: var(--text);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .startup-message,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .leader-card,
html[data-theme="dark"] .payment-status-card,
html[data-theme="dark"] .payment-email-card,
html[data-theme="dark"] .bottom-sheet,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .mistake-card,
html[data-theme="dark"] .partner-withdraw,
html[data-theme="dark"] .partner-link-form,
html[data-theme="dark"] .partner-link-card {
  border: 1px solid rgba(148, 163, 184, .12);
}

html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .program-entry,
html[data-theme="dark"] .program-entry.locked,
html[data-theme="dark"] .partner-hero {
  background:
    radial-gradient(circle at 88% 8%, rgba(96, 165, 250, .18), transparent 34%),
    linear-gradient(145deg, #111827, #0F172A);
}

html[data-theme="dark"] .startup-message {
  background: #111827;
  color: var(--text);
}

html[data-theme="dark"] .startup-spinner {
  border-color: rgba(96, 165, 250, .18);
  border-top-color: var(--blue);
}

html[data-theme="dark"] .menu-card.locked {
  background:
    linear-gradient(180deg, rgba(245, 158, 11, .12), rgba(17, 24, 39, .98));
}

html[data-theme="dark"] .ticket-card.perfect {
  background: linear-gradient(180deg, rgba(34, 197, 94, .14), var(--card));
}

html[data-theme="dark"] .program-hero {
  background:
    radial-gradient(circle at 90% 0%, rgba(96, 165, 250, .18), transparent 35%),
    linear-gradient(145deg, #111827, #0F172A);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, .12);
}

html[data-theme="dark"] .program-hero h2 {
  color: var(--text);
}

html[data-theme="dark"] .program-hero p {
  color: var(--muted);
}

html[data-theme="dark"] .program-badge {
  background: var(--blue-soft);
  color: var(--blue);
}

html[data-theme="dark"] .program-stage-card {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, .12);
}

html[data-theme="dark"] .program-stage-card h2 {
  color: var(--text);
}

html[data-theme="dark"] .program-stage-card p,
html[data-theme="dark"] .program-stage-card small,
html[data-theme="dark"] .program-stage-points {
  color: var(--muted);
}

html[data-theme="dark"] .program-stage-card.locked .program-stage-number {
  background: #0F172A;
  color: #64748B;
}

html[data-theme="dark"] .program-stage-card.completed .program-stage-number {
  background: var(--green-soft);
  color: #86EFAC;
}

html[data-theme="dark"] .program-stage-card.completed .program-stage-status {
  color: #86EFAC;
}

html[data-theme="dark"] .mistakes-analysis {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, .12);
}

html[data-theme="dark"] .mistakes-analysis h2 {
  color: var(--text);
}

html[data-theme="dark"] .mistakes-analysis p {
  color: var(--muted);
}

html[data-theme="dark"] .mistakes-topic-row,
html[data-theme="dark"] .mistakes-practice-note {
  background: #0F172A;
  border: 1px solid var(--line);
}

html[data-theme="dark"] .mistakes-topic-row:first-child {
  background: rgba(248, 113, 113, .14);
  border-color: rgba(248, 113, 113, .24);
}

html[data-theme="dark"] .mistakes-topic-row strong,
html[data-theme="dark"] .mistakes-practice-note strong {
  color: var(--text);
}

html[data-theme="dark"] .mistakes-topic-row span,
html[data-theme="dark"] .mistakes-practice-note span {
  color: var(--muted);
}

html[data-theme="dark"] .secondary-btn,
html[data-theme="dark"] .small-btn,
html[data-theme="dark"] .stat-chip,
html[data-theme="dark"] .review-tab,
html[data-theme="dark"] .timer,
html[data-theme="dark"] .answer-index,
html[data-theme="dark"] .question-media-loader,
html[data-theme="dark"] .question-media-fallback,
html[data-theme="dark"] .friend-link-row,
html[data-theme="dark"] .partner-link-url,
html[data-theme="dark"] .partner-link-stats span {
  background: #0F172A;
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .answer-btn,
html[data-theme="dark"] .question-media img,
html[data-theme="dark"] .payment-email-card input,
html[data-theme="dark"] .partner-link-form input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] input {
  background: #0F172A;
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .payment-email-card input:focus,
html[data-theme="dark"] .partner-link-form input:focus {
  background: #111827;
}

html[data-theme="dark"] .payment-email-card {
  background: #111827;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .payment-email-card label {
  color: var(--text);
}

html[data-theme="dark"] .payment-email-card input {
  background: #0B1120;
  color: var(--text);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

html[data-theme="dark"] .payment-email-card input::placeholder {
  color: #64748B;
}

html[data-theme="dark"] .payment-email-card input:-webkit-autofill,
html[data-theme="dark"] .payment-email-card input:-webkit-autofill:hover,
html[data-theme="dark"] .payment-email-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #0B1120 inset;
  caret-color: var(--text);
}

html[data-theme="dark"] .payment-email-hint {
  color: var(--muted);
}

html[data-theme="dark"] .payment-email-hint.bad {
  color: #FCA5A5;
}

html[data-theme="dark"] .trial-discount {
  background: rgba(245, 158, 11, .14);
  border: 1px solid rgba(245, 158, 11, .22);
}

html[data-theme="dark"] .trial-discount > span,
html[data-theme="dark"] .trial-discount p,
html[data-theme="dark"] .trial-discount b {
  color: #FCD34D;
}

html[data-theme="dark"] .community-discount {
  background: var(--blue-soft);
  border-color: rgba(96, 165, 250, .22);
}

html[data-theme="dark"] .answer-btn.correct {
  background: var(--green);
  border-color: var(--green);
  color: #FFFFFF;
}

html[data-theme="dark"] .answer-btn.wrong {
  background: var(--red);
  border-color: var(--red);
  color: #FFFFFF;
}

html[data-theme="dark"] .answer-btn.exam-selected {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--text);
}

html[data-theme="dark"] .question-nav-item {
  background: #0F172A;
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .question-nav-item.correct,
html[data-theme="dark"] .question-chip.correct {
  background: var(--green-soft);
  color: #86EFAC;
}

html[data-theme="dark"] .question-nav-item.wrong,
html[data-theme="dark"] .question-chip.wrong {
  background: var(--red-soft);
  color: #FCA5A5;
}

html[data-theme="dark"] .question-nav-item.current {
  background: var(--blue);
  border-color: var(--blue);
  color: #FFFFFF;
}

html[data-theme="dark"] .review-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #FFFFFF;
}

html[data-theme="dark"] .review-card {
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] .review-number {
  background: var(--blue-soft);
  color: var(--blue);
}

html[data-theme="dark"] .bottom-sheet:not(.video-fullscreen) {
  background: #111827;
  color: var(--text);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .48);
}

html[data-theme="dark"] .bottom-sheet:not(.video-fullscreen) .sheet-title {
  color: var(--text);
}

html[data-theme="dark"] .bottom-sheet:not(.video-fullscreen) .icon-btn {
  background: #0F172A;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

html[data-theme="dark"] .channel-notice {
  background:
    radial-gradient(circle at 94% 6%, rgba(245, 158, 11, .16), transparent 34%),
    #111827;
  border: 1px solid rgba(148, 163, 184, .14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

html[data-theme="dark"] .channel-notice-close {
  background: #0F172A;
  color: var(--text);
  border: 1px solid var(--line);
}

html[data-theme="dark"] .channel-notice h2 {
  color: var(--text);
}

html[data-theme="dark"] .channel-notice p {
  color: var(--muted);
}

html[data-theme="dark"] .channel-notice-status {
  background: var(--green-soft);
  color: #86EFAC;
}

html[data-theme="dark"] .exam-passed-access-btn,
html[data-theme="dark"] .leader-passed-badge {
  background: var(--green-soft);
  color: #86EFAC;
}

html[data-theme="dark"] .exam-pass-intro,
html[data-theme="dark"] .exam-pass-photo-chip {
  background: #0F172A;
  color: var(--text);
}

html[data-theme="dark"] .exam-pass-intro h2,
html[data-theme="dark"] .exam-pass-form .field span,
html[data-theme="dark"] .exam-celebration-card h2 {
  color: var(--text);
}

html[data-theme="dark"] .exam-pass-intro p,
html[data-theme="dark"] .exam-pass-upload small,
html[data-theme="dark"] .exam-celebration-card p {
  color: var(--muted);
}

html[data-theme="dark"] .exam-pass-form textarea {
  background: #0F172A;
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .exam-pass-upload {
  background: var(--blue-soft);
  border-color: rgba(96, 165, 250, .22);
}

html[data-theme="dark"] .exam-celebration-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, .18), transparent 42%),
    #111827;
  border: 1px solid rgba(148, 163, 184, .14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

html[data-theme="dark"] .program-funnel-slide {
  background:
    radial-gradient(circle at 100% 0%, rgba(96, 165, 250, .18), transparent 38%),
    #0F172A;
  border: 1px solid rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .program-funnel-slide h2 {
  color: var(--text);
}

html[data-theme="dark"] .program-funnel-slide p,
html[data-theme="dark"] .program-funnel-points {
  color: var(--muted);
}

html[data-theme="dark"] .program-funnel-actions {
  background:
    linear-gradient(to top, #111827 76%, rgba(17, 24, 39, 0));
}

html[data-theme="dark"] .video-status {
  background: rgba(245, 158, 11, .14);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, .22);
}

html[data-theme="dark"] .video-status strong,
html[data-theme="dark"] .video-status span {
  color: #FCD34D;
}

html[data-theme="dark"] .answer-explanation {
  background: rgba(15, 23, 42, .72);
}

html[data-theme="dark"] .bottom-nav {
  background: rgba(17, 24, 39, .96);
  border: 1px solid rgba(148, 163, 184, .14);
  border-bottom: 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .42);
  backdrop-filter: blur(16px);
}

html[data-theme="dark"] .leader-card.place-1 {
  background: rgba(245, 158, 11, .16);
}

html[data-theme="dark"] .leader-card.place-2 {
  background: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .leader-card.place-3 {
  background: rgba(234, 88, 12, .16);
}

html[data-theme="dark"] .rank {
  background: rgba(15, 23, 42, .72);
}

html[data-theme="dark"] .result-card.success,
html[data-theme="dark"] .result-card.error,
html[data-theme="dark"] .payment-status-card.pending,
html[data-theme="dark"] .payment-status-card.bad {
  color: var(--text);
}

html[data-theme="dark"] .friend-invite-status,
html[data-theme="dark"] .channel-trial-status {
  color: #86EFAC;
}

html[data-theme="dark"] .theme-switch {
  background: #243044;
}

html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .admin-form,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-question-card,
html[data-theme="dark"] .admin-metric,
html[data-theme="dark"] .admin-user-card {
  --card: #FFFFFF;
  --text: #1F2937;
  --muted: #6B7280;
  --line: #E5E7EB;
  --blue: #2F80ED;
  --blue-soft: #EAF3FF;
  background: #FFFFFF;
  color: #1F2937;
  border-color: #E5E7EB;
}

html[data-theme="dark"] .admin-panel input,
html[data-theme="dark"] .admin-panel textarea,
html[data-theme="dark"] .admin-panel select,
html[data-theme="dark"] .admin-form input,
html[data-theme="dark"] .admin-form textarea,
html[data-theme="dark"] .admin-form select {
  background: #FFFFFF;
  color: #1F2937;
  border-color: #E5E7EB;
}

html[data-theme="dark"] .admin-panel .secondary-btn,
html[data-theme="dark"] .admin-form .secondary-btn {
  background: #FFFFFF;
  color: #1F2937;
  border-color: #E5E7EB;
}

@media (max-width: 360px) {
  .admin-inline-controls {
    grid-template-columns: 1fr;
  }

  .admin-inline-controls .small-btn {
    width: 100%;
  }

  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-card {
    grid-template-columns: 108px 1fr;
    column-gap: 12px;
    min-height: 206px;
  }

  .hero-name {
    font-size: 34px;
  }

  .hero-logo {
    width: 108px;
    height: 108px;
  }

  .hero-brand {
    min-height: 94px;
    padding-top: 20px;
  }

  .hero-accent {
    font-size: 16px;
  }

  .hero-caption {
    font-size: 12px;
  }

  .hero-stats {
    gap: 8px;
  }

  .stat-chip {
    flex: 1 1 0;
    font-size: 11px;
    padding: 8px;
  }

  .stat-chip .icon {
    width: 20px;
    height: 20px;
  }

  .section-title {
    font-size: 22px;
  }

  .tickets-grid {
    grid-template-columns: 1fr;
  }

  .question-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .answer-btn {
    font-size: 15px;
  }

  .admin-metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-loader-actions {
    grid-template-columns: 1fr;
  }
}
