.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  padding: 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: block;
  border-radius: 20px;
}

.brand-mark-image {
  object-fit: cover;
  background: #0b1024;
  border: 1px solid rgba(255, 255, 255, 0.44);
  box-shadow:
    0 16px 28px rgba(95, 86, 160, 0.20),
    0 0 0 1px rgba(97, 222, 255, 0.08);
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-title {
  font-family: "Nunito", sans-serif;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-strong);
}

.brand-sub {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-progress-pill,
.status-chip,
.mini-stat,
.trust-card,
.lesson-meta,
.lesson-step-item,
.admin-kpi-card,
.admin-panel-card,
.admin-user-card,
.admin-module-card,
.quest-item,
.reward-item {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

#next-lesson-card,
#quests-list,
#rewards-list,
#galaxy-map,
#onboarding-steps {
  min-width: 0;
}

.focus-grid {
  margin-top: 22px;
}

.guest-home,
.member-home {
  display: grid;
  gap: 18px;
}

.guest-grid,
.member-layout {
  display: grid;
  gap: 20px;
}

@media (min-width: 1024px) {
  .guest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-layout {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }
}

.member-rail {
  display: grid;
  gap: 20px;
}

.guest-panel,
.cockpit-card,
.next-lesson-panel,
.path-card {
  padding: 18px;
}

.hero-stage,
.focus-grid,
.dashboard-layout {
  max-width: 960px;
  margin-inline: auto;
}

.dashboard-layout {
  margin-top: 22px;
  align-items: start;
}

.focus-grid.single-column {
  grid-template-columns: 1fr;
}

.dashboard-layout.single-column {
  grid-template-columns: 1fr;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 24px;
}

.hero-progress-pill,
.status-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.hero-progress-pill {
  min-width: 180px;
}

.hero-progress-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-soft);
}

.hero-progress-pill strong,
.status-chip strong {
  display: block;
  font-size: 0.92rem;
}

.status-chip span {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-soft);
}

.status-chip-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.is-xp { background: linear-gradient(135deg, var(--sun), var(--coral)); }
.is-level { background: linear-gradient(135deg, var(--brand), var(--violet)); }
.is-admin { background: linear-gradient(135deg, #55607f, #2a3248); }

.mode-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.mode-switch-btn {
  min-height: var(--touch);
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 900;
}

.mode-switch-btn.is-active {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: var(--text-inverse);
}

.account-pill {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 9px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.account-pill strong,
.account-pill span {
  display: block;
}

.account-pill span {
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.topbar-cta-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-cta-group .btn {
  min-height: 42px;
  padding-inline: 14px;
  border-radius: 16px;
}

.card {
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.glass-card {
  background:
    radial-gradient(circle at top right, rgba(156, 104, 255, 0.12), transparent 30%),
    radial-gradient(circle at bottom left, rgba(119, 237, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 248, 245, 0.94) 100%);
  backdrop-filter: blur(14px);
}

.admin-surface {
  background: var(--surface-admin);
  border-color: #d6dfef;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-head h1,
.section-head h2 {
  margin: 2px 0 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.45;
  font-weight: 700;
}

.eyebrow,
.safety-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  background: rgba(78, 103, 255, 0.09);
  color: var(--brand-strong);
}

.admin-eyebrow {
  background: #e9edf6;
  color: var(--admin-ink);
}

.safety-pill {
  background: rgba(143, 103, 255, 0.11);
  color: var(--accent-strong);
}

.hero-story,
.mission-card,
.progress-card,
.onboarding-card,
.galaxy-card,
.side-card,
.lesson-sidebar,
.lesson-stage,
.admin-hero,
.admin-layout .card {
  padding: 20px;
}

.hero-story,
.mission-card,
.progress-card,
.galaxy-card,
.side-card {
  min-width: 0;
}

.hero-story {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(78, 103, 255, 0.12);
  padding: 26px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 320px);
  gap: 20px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.hero-mascot-card {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.hero-mascot {
  position: relative;
  width: 180px;
  height: 166px;
  border-radius: 54px;
  background: linear-gradient(150deg, #ffffff 4%, #d6c4ff 42%, #79eeff 100%);
  box-shadow:
    0 0 0 10px rgba(156, 104, 255, 0.08),
    0 22px 38px rgba(109, 96, 186, 0.22),
    0 0 48px rgba(121, 237, 255, 0.18);
}

.hero-mascot::before,
.hero-mascot::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.hero-mascot::before {
  inset: 24px 18px 30px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 22%, rgba(138, 160, 255, 0.18) 0%, rgba(138, 160, 255, 0) 32%),
    linear-gradient(180deg, #20264e 0%, #0d122b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-mascot::after {
  left: 24px;
  right: 24px;
  bottom: -20px;
  height: 72px;
  background: radial-gradient(circle, rgba(151, 110, 255, 0.44) 0%, rgba(121, 237, 255, 0.28) 38%, rgba(151, 110, 255, 0) 74%);
  filter: blur(8px);
}

.hero-mascot-eye {
  position: absolute;
  width: 14px;
  height: 14px;
  top: 56px;
  border-radius: 8px;
  background: #a8fffa;
  box-shadow: 0 0 14px rgba(121, 237, 255, 0.9);
  z-index: 1;
}

.hero-mascot-eye.left {
  left: 62px;
}

.hero-mascot-eye.right {
  right: 62px;
}

.hero-mascot-bubble {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.hero-mascot-bubble strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  text-align: center;
}

.hero-mascot-bubble p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-weight: 700;
  text-align: center;
}

.guest-hero {
  background:
    radial-gradient(circle at top right, rgba(156, 104, 255, 0.13), transparent 30%),
    radial-gradient(circle at bottom left, rgba(255, 193, 217, 0.16), transparent 26%),
    radial-gradient(circle at 18% 22%, rgba(119, 237, 255, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 248, 245, 0.96) 100%);
}

.guest-home .hero-story h1 {
  max-width: none;
  font-family: "Nunito", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-strong);
  text-shadow: 0 0 18px rgba(121, 237, 255, 0.18);
}

.guest-home .hero-story p {
  max-width: 580px;
  font-size: 1.03rem;
  line-height: 1.65;
}

.hero-story::before,
.hero-story::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero-story::before {
  width: 240px;
  height: 240px;
  top: -120px;
  right: -60px;
  background: radial-gradient(circle, rgba(156, 104, 255, 0.18) 0%, rgba(156, 104, 255, 0) 70%);
}

.hero-story::after {
  width: 200px;
  height: 200px;
  bottom: -120px;
  left: -40px;
  background: radial-gradient(circle, rgba(119, 237, 255, 0.18) 0%, rgba(119, 237, 255, 0) 70%);
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-story h1 {
  margin: 14px 0 10px;
  max-width: 680px;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 0.95;
}

.hero-story p {
  margin: 0;
  max-width: 520px;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.58;
  font-weight: 700;
}

.hero-actions,
.lesson-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn {
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 20px;
  font-weight: 900;
  font-size: 0.98rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

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

.btn-large {
  min-height: 54px;
  padding-inline: 22px;
}

.guest-home .hero-actions .btn-primary {
  font-size: 1.08rem;
}

.btn-primary {
  color: var(--text-inverse);
  background: linear-gradient(180deg, #67e900 0%, #53db00 100%);
  box-shadow:
    0 8px 0 #47bf00,
    0 18px 28px rgba(84, 219, 0, 0.24);
}

.btn-secondary {
  color: var(--brand-strong);
  background: #ffffff;
  border: 2px solid rgba(78, 103, 255, 0.18);
}

.btn-ghost {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(143, 103, 255, 0.12);
}

.hero-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.guest-copy-list {
  display: grid;
  gap: 10px;
}

.guest-copy-list p,
.guest-benefit p,
.guest-step p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
  font-weight: 700;
}

.guest-benefits,
.guest-steps {
  display: grid;
  gap: 10px;
}

.guest-benefits {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guest-benefits.simple {
  grid-template-columns: 1fr;
}

.guest-benefit,
.guest-step {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(249,251,255,0.96) 100%);
  overflow: hidden;
}

.guest-benefit::before,
.guest-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 5px;
  border-radius: 999px;
  background: var(--brand);
}

.feature-brain::before,
.guest-step:nth-child(1)::before { background: var(--brand); }
.feature-rank::before,
.guest-step:nth-child(2)::before { background: var(--accent); }
.feature-duel::before,
.guest-step:nth-child(3)::before { background: #ff9800; }
.feature-guide::before { background: var(--sky); }

.feature-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 1.45rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.feature-copy {
  display: grid;
  gap: 4px;
}

.guest-step {
  display: grid;
  gap: 4px;
}

.feature-brain .feature-icon {
  background: linear-gradient(180deg, #f3f1ff 0%, #eef2ff 100%);
}

.feature-rank .feature-icon {
  background: linear-gradient(180deg, #f8efff 0%, #f2edff 100%);
}

.feature-duel .feature-icon {
  background: linear-gradient(180deg, #fff4e9 0%, #fff9f3 100%);
}

.feature-guide .feature-icon {
  background: linear-gradient(180deg, #ecfbff 0%, #eff8ff 100%);
}

.guest-benefit strong,
.guest-step strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.parent-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
}

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

.trust-card {
  padding: 13px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(248,250,255,0.96) 100%);
}

.trust-card strong {
  display: block;
  font-size: 1.16rem;
}

.trust-card span {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.mini-mascot {
  position: relative;
  border-radius: 34px;
  background: linear-gradient(150deg, #ffffff 0%, #d6c4ff 44%, #79eeff 100%);
  box-shadow: 0 18px 34px rgba(111, 105, 187, 0.20);
}

.mini-mascot::before,
.mini-mascot::after {
  content: "";
  position: absolute;
  background: #ffffff;
  border-radius: 999px;
}

.next-mission-card,
.onboarding-steps,
.galaxy-map,
#quests-list,
#rewards-list,
.admin-panels,
.admin-users-list,
.admin-module-stats {
  display: grid;
  gap: 12px;
}

.mission-card-main {
  display: grid;
  gap: 14px;
  padding: 2px 0;
}

.mission-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(78, 103, 255, 0.1);
  color: var(--brand-strong);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mission-card-main h3 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.08;
}

.mission-card-main p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
  line-height: 1.45;
}

.mission-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mission-tag,
.lesson-chip,
.reward-badge,
.quest-badge,
.admin-badge,
.module-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.mission-tag,
.module-badge {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.reward-badge {
  background: rgba(255, 200, 77, 0.18);
  color: #9c6700;
}

.quest-badge {
  background: rgba(25, 199, 187, 0.15);
  color: var(--accent-strong);
}

.admin-badge {
  background: #e8edf7;
  color: var(--admin-ink);
}

.journey-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cockpit-player,
.cockpit-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cockpit-level {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.cockpit-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.cockpit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cockpit-focus h3 {
  margin: 8px 0 4px;
  font-size: 1.12rem;
  line-height: 1.05;
}

.cockpit-focus p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
}

.mission-card,
.progress-card,
.onboarding-card,
.galaxy-card,
.side-card {
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
}

.mission-card,
.progress-card,
.galaxy-card {
  padding: 18px;
}

.duel-hero {
  background: linear-gradient(180deg, #faf8ff 0%, #f2f5ff 100%);
}

.duel-kpi-card,
.duel-opponent-card,
.duel-history-item {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.duel-kpi-card strong {
  display: block;
  font-size: 1.5rem;
}

.duel-kpi-card span,
.duel-opponent-card p,
.duel-history-item span,
.duel-empty p {
  color: var(--text-soft);
  font-weight: 700;
}

.duel-opponent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.duel-opponent-head strong,
.duel-history-item strong,
.duel-empty strong {
  display: block;
}

.duel-opponent-head span {
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.duel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.duel-empty {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
}

.journey-avatar {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #6b73ff 0%, #ba8fff 50%, #79eeff 100%);
  color: var(--text-inverse);
  box-shadow: var(--shadow-soft);
  font-weight: 900;
  letter-spacing: 0.05em;
}

.journey-copy {
  display: grid;
}

.journey-copy strong {
  font-size: 1.2rem;
}

.journey-copy span {
  color: var(--text-soft);
  font-weight: 800;
}

.bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #ecebfb;
}

.bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--sky));
  transition: width 0.32s ease;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 900;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.mini-stat {
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
}

.mini-stat strong {
  display: block;
  font-size: 1.3rem;
}

.mini-stat span {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.onboarding-steps {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.onboarding-step {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px solid var(--line);
}

.onboarding-step strong {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 1rem;
}

.onboarding-step p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 700;
}

.galaxy-map {
  grid-template-columns: 1fr;
  gap: 12px;
}

.member-path-map {
  display: grid;
  gap: 16px;
}

.module-spotlight {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(247,248,255,0.96) 100%);
  border: 1px solid var(--line);
}

.module-spotlight-badge {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--text-inverse);
  font-weight: 900;
  flex: 0 0 auto;
  box-shadow: var(--shadow-soft);
}

.module-spotlight-copy {
  display: grid;
  gap: 10px;
  width: 100%;
}

.module-spotlight-copy h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.05;
}

.module-spotlight-copy p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
  line-height: 1.5;
}

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

.puzzle-node {
  min-height: 96px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
  display: grid;
  gap: 6px;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.puzzle-node:hover:not(:disabled) {
  transform: translateY(-1px);
}

.puzzle-node.is-current {
  border-color: rgba(78, 103, 255, 0.35);
  background: linear-gradient(180deg, #f6f7ff 0%, #fbf8ff 100%);
}

.puzzle-node.is-complete {
  border-color: rgba(48, 188, 108, 0.32);
  background: linear-gradient(180deg, #f3fff8 0%, #f9fffc 100%);
}

.puzzle-node.is-locked {
  opacity: 0.58;
  filter: saturate(0.85);
}

.puzzle-node-number {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: var(--text-inverse);
  font-weight: 900;
}

.site-footer {
  padding: 18px 0 24px;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(34, 48, 79, 0.58);
  font-size: 0.78rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.legal-dialog {
  max-width: 560px;
}

.legal-copy {
  display: grid;
  gap: 12px;
}

.legal-copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
  font-weight: 700;
}

.puzzle-node strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.1;
}

.puzzle-node small {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.path-section {
  display: grid;
  gap: 12px;
}

.path-section.is-current {
  gap: 10px;
}

.path-section-head h3 {
  margin: 6px 0 0;
  font-size: 1.08rem;
  line-height: 1.05;
}

.module-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.module-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f7f8ff;
  color: var(--text);
  font-weight: 800;
}

.module-chip span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.74rem;
}

.module-chip.is-complete {
  background: #f7fff8;
  border-color: rgba(40, 198, 163, 0.24);
}

.upcoming-module-list {
  display: grid;
  gap: 10px;
}

.module-empty-state {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 253, 249, 0.9);
}

.module-empty-state strong {
  display: block;
}

.module-empty-state p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 700;
}

.module-node {
  position: relative;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-node.compact {
  display: grid;
  gap: 12px;
}

.path-section:not(.is-current) .module-node.compact {
  padding: 14px;
}

.module-node-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.module-node::after {
  content: "";
  position: absolute;
  inset: auto 16px 16px 16px;
  height: 1px;
  background: linear-gradient(90deg, rgba(60,105,255,0), rgba(60,105,255,0.18), rgba(60,105,255,0));
}

.module-node:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.module-node.locked {
  opacity: 0.72;
  filter: saturate(0.85);
}

.module-node-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.module-node-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.module-node-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--text-inverse);
  font-weight: 900;
  flex: 0 0 auto;
}

.module-node-copy h3 {
  margin: 0 0 3px;
  font-size: 1.02rem;
  line-height: 1;
}

.module-node-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 700;
}

.module-state {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.module-node-foot {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.module-node-foot.compact {
  margin-top: 0;
}

.module-node-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.module-node .btn {
  min-height: 42px;
}

.quest-item,
.reward-item {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
}

.quest-item.is-complete {
  background: linear-gradient(180deg, #effcf6 0%, #fbfefc 100%);
  border-color: rgba(28, 164, 111, 0.22);
}

.quest-item-head,
.reward-item-head,
.admin-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quest-item strong,
.reward-item strong {
  font-size: 0.98rem;
}

.quest-item p,
.reward-item p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 700;
}

.quest-claim {
  margin-top: 10px;
}

.lesson-layout {
  align-items: start;
}

.lesson-sidebar {
  position: sticky;
  top: 88px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8ff 100%);
}

.lesson-sidebar-block + .lesson-sidebar-block {
  margin-top: 18px;
}

.lesson-sidebar h2 {
  margin: 6px 0 4px;
  font-size: 1.4rem;
  line-height: 1;
}

.lesson-sidebar p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-weight: 700;
}

.lesson-step-tracker {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.lesson-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
}

.lesson-step-item.is-active {
  border-color: rgba(78, 103, 255, 0.34);
  background: linear-gradient(180deg, #ffffff 0%, #eef1ff 100%);
}

.lesson-step-item.is-done {
  border-color: rgba(48, 188, 108, 0.24);
  background: linear-gradient(180deg, #ffffff 0%, #f1fbf6 100%);
}

.lesson-step-index {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-soft), rgba(119, 237, 255, 0.35));
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.lesson-step-copy strong {
  display: block;
  font-size: 0.92rem;
}

.lesson-step-copy span {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.lesson-stage {
  display: grid;
  gap: 20px;
  min-height: 78vh;
  background:
    radial-gradient(circle at top right, rgba(156, 104, 255, 0.10), transparent 26%),
    radial-gradient(circle at 15% 85%, rgba(119, 237, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
}

.lesson-stage-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.lesson-stage-copy h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 0.96;
}

.lesson-stage-copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.56;
  font-size: 1.02rem;
  font-weight: 700;
}

.lesson-guide {
  max-width: 220px;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.lesson-guide p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 800;
  text-align: right;
}

.mini-mascot {
  width: 84px;
  height: 96px;
  border-radius: 28px;
}

.mini-mascot::before,
.mini-mascot::after {
  width: 18px;
  height: 18px;
  top: 18px;
}

.mini-mascot::before { left: 14px; }
.mini-mascot::after { right: 14px; }

.lesson-stage-card {
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f9f9ff 100%);
  border: 1px solid var(--line);
  padding: 20px;
  min-height: 280px;
  display: grid;
  gap: 16px;
  align-content: start;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.lesson-card-title {
  font-size: 1.32rem;
  margin: 0;
}

.lesson-card-body {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.58;
  font-weight: 700;
}

.lesson-visual-grid,
.activity-grid {
  display: grid;
  gap: 12px;
}

.lesson-visual-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-pill {
  min-height: 86px;
  padding: 14px;
  border-radius: 20px;
  color: var(--text-inverse);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.3;
  display: grid;
  align-content: end;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}

.summary-box {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f7f5ff 0%, #ffffff 100%);
  border: 1px solid rgba(143, 103, 255, 0.18);
}

.summary-box strong {
  display: block;
  margin-bottom: 6px;
}

.summary-box p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-weight: 700;
}

.activity-option {
  width: 100%;
  min-height: var(--touch);
  text-align: left;
  padding: 14px 16px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
  transition: border-color 0.14s ease, transform 0.14s ease, background 0.14s ease;
}

.activity-option:hover,
.activity-option:focus-visible {
  border-color: rgba(78, 103, 255, 0.46);
  background: #f8f9ff;
  transform: translateY(-1px);
  outline: none;
}

.activity-option.is-correct {
  border-color: rgba(48, 188, 108, 0.52);
  background: rgba(48, 188, 108, 0.1);
}

.activity-option.is-wrong {
  border-color: rgba(226, 93, 103, 0.46);
  background: rgba(226, 93, 103, 0.08);
}

.lesson-feedback {
  min-height: 24px;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 900;
}

.lesson-feedback.is-success {
  color: var(--success);
}

.lesson-feedback.is-warning {
  color: var(--danger);
}

.admin-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-kpi-card,
.admin-panel-card,
.admin-user-card,
.admin-module-card {
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
}

.admin-kpi-card strong,
.admin-panel-card strong {
  display: block;
  font-size: 1.5rem;
}

.admin-kpi-card span,
.admin-panel-card span,
.admin-user-card p,
.admin-module-card p {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 800;
}

.admin-item-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.admin-hero {
  background: linear-gradient(180deg, #faf8ff 0%, #f1f4ff 100%);
}

.toast {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 120;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 20px;
  color: var(--text-inverse);
  background: linear-gradient(180deg, #20264f 0%, #121730 100%);
  box-shadow: var(--shadow-strong);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  padding: 20px;
  background: rgba(21, 27, 56, 0.42);
  backdrop-filter: blur(8px);
}

.auth-modal.show {
  display: grid;
  place-items: center;
}

.auth-dialog {
  width: min(520px, 100%);
  padding: 22px;
}

.auth-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.auth-head h2 {
  margin: 8px 0 0;
}

.btn-icon {
  min-width: 48px;
  padding-inline: 0;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.auth-switch-btn {
  min-height: 46px;
  border-radius: 16px;
  background: #f6f7ff;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-weight: 900;
}

.auth-switch-btn.is-active {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: var(--text-inverse);
  border-color: transparent;
}

.auth-feedback {
  min-height: 22px;
  margin: 0 0 14px;
  color: var(--danger);
  font-weight: 800;
}

.auth-note {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 800;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form label span {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-soft);
}

.auth-form input {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fcfcff;
  padding: 0 14px;
  color: var(--text);
}

.auth-form input:focus {
  outline: 3px solid rgba(78, 103, 255, 0.18);
  border-color: var(--brand);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-story,
  .mission-card,
  .progress-card,
  .galaxy-card,
  .lesson-stage,
  .admin-hero {
    animation: floatIn 0.5s ease;
  }
}

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

@media (max-width: 1023px) {
  .guest-grid,
  .member-layout {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .guest-home .hero-layout {
    justify-items: center;
  }

  .guest-home .hero-copy {
    justify-items: center;
    text-align: center;
  }

  .guest-home .hero-mascot-card {
    order: -1;
    justify-items: center;
  }

  .guest-strip {
    grid-template-columns: 1fr;
  }

  .hero-trust-grid {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar {
    position: static;
  }
}

@media (max-width: 779px) {
  .guest-benefits,
  .cockpit-stats,
  .puzzle-path {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cockpit-player,
  .cockpit-focus,
  .module-spotlight {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-sub {
    display: none;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 18px;
  }

  .hero-story,
  .mission-card,
  .progress-card,
  .onboarding-card,
  .galaxy-card,
  .side-card,
  .lesson-sidebar,
  .lesson-stage,
  .admin-hero,
  .admin-layout .card {
    padding: 18px;
  }

  .hero-story h1 {
    font-size: 1.9rem;
  }

  .guest-home .hero-story h1 {
    font-size: 2.55rem;
    letter-spacing: 0.16em;
  }

  .guest-home .hero-story p {
    font-size: 1rem;
  }

  .hero-mascot-card {
    justify-items: center;
  }

  .hero-mascot {
    width: 140px;
    height: 128px;
    border-radius: 38px;
  }

  .hero-mascot::before,
  .hero-mascot::after {
    top: auto;
  }

  .hero-mascot::before {
    inset: 18px 14px 22px;
  }

  .hero-mascot::after {
    left: 18px;
    right: 18px;
    bottom: -16px;
    height: 58px;
  }

  .hero-mascot-eye {
    top: 42px;
    width: 10px;
    height: 10px;
  }

  .hero-mascot-eye.left {
    left: 48px;
  }

  .hero-mascot-eye.right {
    right: 48px;
  }

  .focus-grid,
  .dashboard-layout {
    margin-top: 18px;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .status-chip,
  .mode-switch,
  .account-pill,
  .topbar-cta-group {
    width: 100%;
  }

  .mode-switch {
    justify-content: space-between;
  }

  .topbar-cta-group {
    justify-content: stretch;
  }

  .mode-switch-btn {
    flex: 1 1 0;
  }

  .topbar-cta-group .btn {
    flex: 1 1 0;
  }

  .hero-actions,
  .lesson-actions {
    flex-direction: column;
  }

  .guest-home .hero-actions {
    width: 100%;
    max-width: 420px;
  }

  .btn,
  .btn-large {
    width: 100%;
  }

  .mini-stats,
  .lesson-visual-grid {
    grid-template-columns: 1fr;
  }

  .galaxy-map {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .auth-dialog {
    padding: 18px;
  }

  .lesson-stage-top {
    flex-direction: column;
  }

  .lesson-guide {
    justify-items: start;
  }

  .lesson-guide p {
    text-align: left;
  }
}
