.dash-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 22, 0.74);
  backdrop-filter: blur(18px);
}

.dash-brand,
.auth-brand,
.dash-nav {
  display: flex;
  align-items: center;
}

.dash-brand,
.auth-brand {
  width: 236px;
  height: 96px;
  flex: 0 0 auto;
}

.dash-nav {
  gap: 12px;
}

.dash-nav a,
.dash-nav button {
  border: 0;
  color: rgba(248, 251, 255, 0.78);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}

.dash-shell {
  width: min(100% - 36px, var(--content));
  margin: 0 auto;
  padding: 46px 0 90px;
}

.hero-panel,
.access-banner,
.dash-card,
.auth-card,
.upgrade-modal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(
      ellipse at 18% 0%,
      rgba(124, 92, 255, 0.2),
      transparent 17rem
    ),
    radial-gradient(
      ellipse at 90% 8%,
      rgba(53, 199, 255, 0.14),
      transparent 16rem
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.035)
    ),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(26px, 5vw, 44px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.teacher-email,
.safe-note {
  color: var(--soft);
  font-size: 0.92rem;
}

.access-chip {
  display: grid;
  gap: 6px;
  min-width: 210px;
  padding: 18px;
  border: 1px solid rgba(184, 244, 61, 0.26);
  border-radius: 20px;
  background: rgba(184, 244, 61, 0.08);
}

.access-chip span,
.card-meta,
.dash-card small {
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.access-chip strong {
  color: var(--lime);
  font-size: 1.1rem;
}

.access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 24px;
}

.access-banner.is-full {
  border-color: rgba(184, 244, 61, 0.36);
}

.dashboard-section {
  margin-top: 52px;
}

.teacher-signal-section {
  margin-top: 42px;
}

.teacher-signal-head {
  margin-bottom: 14px;
}

.teacher-signal-head p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--soft);
  font-weight: 800;
  line-height: 1.5;
}

.teacher-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.dashboard-page .teacher-signal-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
  padding: 20px;
  border: 2px solid rgba(96, 165, 250, 0.34);
  background:
    radial-gradient(
      circle at 12% 0%,
      rgba(251, 191, 36, 0.28),
      transparent 12rem
    ),
    radial-gradient(
      circle at 92% 8%,
      rgba(94, 214, 255, 0.24),
      transparent 13rem
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96),
      rgba(234, 248, 255, 0.84)
    ),
    var(--mj-panel);
  box-shadow:
    0 9px 0 rgba(59, 130, 246, 0.12),
    0 22px 46px rgba(16, 32, 74, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.dashboard-page .teacher-signal-card:nth-child(2) {
  border-color: rgba(132, 204, 22, 0.34);
  background:
    radial-gradient(
      circle at 12% 0%,
      rgba(132, 204, 22, 0.24),
      transparent 12rem
    ),
    radial-gradient(
      circle at 92% 8%,
      rgba(34, 211, 238, 0.24),
      transparent 13rem
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96),
      rgba(240, 253, 211, 0.8)
    ),
    var(--mj-panel);
}

.dashboard-page .teacher-signal-card h3 {
  margin: 0;
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  line-height: 1.15;
}

.teacher-signal-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.teacher-signal-options label {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.teacher-signal-options input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dashboard-page .teacher-signal-options span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(16, 32, 74, 0.16);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--mj-ink);
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 5px 12px rgba(16, 32, 74, 0.07);
  font-size: 0.8rem;
  font-weight: 900;
}

.dashboard-page .teacher-signal-options input:focus-visible + span,
.dashboard-page .teacher-signal-options input:checked + span {
  border-color: rgba(132, 204, 22, 0.64);
  color: #101707;
  background: linear-gradient(135deg, var(--mj-lime), #d7ff72);
  box-shadow:
    0 5px 0 rgba(101, 163, 13, 0.28),
    0 12px 22px rgba(132, 204, 22, 0.18);
}

.teacher-signal-text {
  display: grid;
  gap: 8px;
}

.dashboard-page .teacher-signal-card .secondary-action {
  align-self: flex-start;
  margin-top: auto;
}

.teacher-signal-text span,
.dashboard-form-message {
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 850;
}

.dashboard-page .teacher-signal-text textarea {
  width: 100%;
  resize: vertical;
  border: 2px solid rgba(96, 165, 250, 0.28);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 92px;
  color: var(--mj-ink);
  background: rgba(255, 255, 255, 0.96);
  font: inherit;
  box-shadow:
    inset 0 2px 8px rgba(30, 48, 90, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.82);
}

.dashboard-page .teacher-signal-text textarea:focus {
  border-color: rgba(59, 130, 246, 0.68);
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.14),
    inset 0 2px 8px rgba(30, 48, 90, 0.06);
}

.dashboard-form-message {
  min-height: 1.2em;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

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

.dash-card {
  position: relative;
  min-height: 260px;
  padding: 22px;
  overflow: hidden;
}

.dash-card.is-locked {
  opacity: 0.72;
}

.dash-card.is-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.28));
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.game-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.7rem;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--lime);
  background: rgba(184, 244, 61, 0.08);
  font-size: 0.75rem;
  font-weight: 900;
}

.card-meta {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.card-meta strong {
  color: var(--danger);
}

.game-card {
  perspective: 1200px;
  padding: 0;
  min-height: 460px;
  background: transparent;
  border: 0;
  overflow: visible;
  box-shadow: none;
}

.game-card-inner {
  position: relative;
  width: 100%;
  min-height: 460px;
  transform-style: preserve-3d;
  transition: transform 420ms ease;
}

.game-card:hover .game-card-inner {
  transform: rotateY(180deg);
}

.game-card-face {
  position: absolute;
  inset: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backface-visibility: hidden;
  overflow: hidden;

  background:
    radial-gradient(
      ellipse at 18% 0%,
      rgba(124, 92, 255, 0.2),
      transparent 17rem
    ),
    radial-gradient(
      ellipse at 90% 8%,
      rgba(53, 199, 255, 0.14),
      transparent 16rem
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.035)
    ),
    var(--panel);

  box-shadow: var(--shadow);
}

.game-card-front {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-card-back {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotateY(180deg);
}

.mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
}

.mode-chips span {
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(184, 244, 61, 0.18);

  background: rgba(184, 244, 61, 0.08);
  color: var(--lime);

  font-size: 0.72rem;
  font-weight: 900;
}

.flip-hint {
  margin-top: auto;
  padding-top: 14px;

  color: var(--soft);

  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.how-to-steps {
  margin: 0;
  padding-left: 18px;
}

.how-to-steps li {
  margin: 10px 0;

  color: var(--muted);

  line-height: 1.45;
  font-size: 0.92rem;
}

.game-card .card-launch,
.game-card .card-locked {
  width: 100%;
  margin-top: 20px;
}

.game-card .game-icon {
  width: 66px;
  height: 66px;
  padding: 9px;
  border-radius: 20px;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.08);
}

.primary-action,
.secondary-action,
.card-launch,
.card-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.primary-action,
.card-launch {
  border: 0;
  color: #101707;
  background: linear-gradient(135deg, var(--lime), #d7ff72);
  box-shadow: 0 14px 34px rgba(184, 244, 61, 0.22);
}

.secondary-action,
.card-locked {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.primary-action:hover,
.secondary-action:hover,
.card-launch:hover,
.card-locked:hover {
  transform: translateY(-3px);
}

.primary-action:disabled,
.secondary-action:disabled,
.card-launch:disabled,
.card-locked:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.auth-page {
  display: grid;
  place-items: center;
  padding: clamp(22px, 5vw, 44px);
}

.auth-shell {
  width: min(100%, 860px);
}

.auth-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px);
}

.auth-brand {
  margin-bottom: 34px;
}

.auth-card h1 {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
}

.auth-copy {
  margin-bottom: 26px;
}

.auth-card .primary-action {
  width: 100%;
  min-height: 58px;
  margin-top: 8px;
  font-size: 1.02rem;
}

.auth-card .safe-note {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--mj-muted);
  font-weight: 850;
}
.how-to-use-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;

  margin-top: 22px;
  padding: 14px 18px;

  border: 2px solid rgba(96, 165, 250, 0.24);
  border-radius: 24px;

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98),
    rgba(235, 248, 255, 0.94)
  );

  box-shadow:
    0 10px 24px rgba(59, 130, 246, 0.08),
    inset 0 -4px 0 rgba(191, 219, 254, 0.42);

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;

  cursor: pointer;
}

.how-to-use-btn:hover {
  transform: translateY(-2px);

  border-color: rgba(59, 130, 246, 0.36);

  box-shadow:
    0 14px 30px rgba(59, 130, 246, 0.12),
    inset 0 -4px 0 rgba(191, 219, 254, 0.42);
}

.how-to-use-btn strong {
  display: block;

  margin-bottom: 2px;

  color: var(--mj-ink);

  font-family: var(--mj-font-heading);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  text-align: left;
}

.how-to-use-btn small {
  display: block;

  color: var(--mj-muted);

  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.how-to-use-icon {
  display: grid;
  place-items: center;

  flex-shrink: 0;

  width: 42px;
  height: 42px;

  border-radius: 14px;

  background: linear-gradient(180deg, #ffe27a, var(--mj-yellow));

  color: var(--mj-ink);

  font-family: var(--mj-font-heading);
  font-size: 1.2rem;
  font-weight: 950;

  box-shadow: 0 6px 0 rgba(251, 191, 36, 0.26);
}

@media (max-width: 760px) {
  .how-to-use-btn {
    width: 100%;
  }
}

.upgrade-modal.how-to-modal {
  width: min(96vw, 1120px);
  max-height: min(94vh, 980px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 34px 34px 72px;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.28) transparent;
}

.how-to-modal::-webkit-scrollbar {
  width: 8px;
}

.how-to-modal::-webkit-scrollbar-track {
  background: transparent;
}

.how-to-modal::-webkit-scrollbar-thumb {
  border-radius: 999px;

  background: linear-gradient(
    180deg,
    rgba(125, 211, 252, 0.75),
    rgba(96, 165, 250, 0.55)
  );
}

.how-to-modal::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(96, 165, 250, 0.9),
    rgba(59, 130, 246, 0.7)
  );
}
.how-to-modal-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.how-to-modal h2 {
  max-width: 760px;

  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 0.95;
}
.how-to-modal-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border: 2px solid rgba(59, 130, 246, 0.14);
  border-radius: 20px;
  background: rgba(234, 248, 255, 0.72);
}

.how-to-modal-grid article span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--mj-ink);
  background: linear-gradient(180deg, #ffe27a, var(--mj-yellow));
  font-family: var(--mj-font-heading);
  font-weight: 950;
  box-shadow: 0 4px 0 rgba(251, 191, 36, 0.26);
}

@media (min-width: 900px) {
  .how-to-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .how-to-modal-grid article:last-child {
    grid-column: span 2;
  }
}

.how-to-modal-grid h3 {
  margin-bottom: 4px;
  color: var(--mj-ink);
}

.how-to-modal-grid p {
  margin-bottom: 0;
  color: var(--mj-muted);
  font-weight: 800;
}

.how-to-tips {
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  color: var(--mj-ink);
  background: linear-gradient(
    180deg,
    rgba(236, 252, 203, 0.92),
    rgba(255, 255, 255, 0.84)
  );
}

.how-to-tips strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mj-font-heading);
}

.how-to-tips ul {
  margin: 0;
  padding-left: 20px;
}

.how-to-tips li {
  color: var(--mj-muted);
  font-weight: 800;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .how-to-use-btn {
    width: 100%;
  }

  .how-to-modal {
    width: min(100%, 94vw);
  }

  .how-to-modal-grid {
    grid-template-columns: 1fr;
  }

  .how-to-modal-grid article {
    grid-template-columns: 1fr;
  }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.modal-backdrop.is-open {
  display: grid;
}

.upgrade-modal {
  position: relative;
  width: min(100%, 520px);
  padding: 30px;
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 14px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 14px;
}

@media (max-width: 900px) {
  .hero-panel,
  .access-banner,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .teacher-signal-grid {
    grid-template-columns: 1fr;
  }

  .access-chip {
    min-width: 0;
  }
}

.game-card h3 {
  font-size: 1.14rem;
}

.game-card p {
  font-size: 0.9rem;
  line-height: 1.48;
}

.mode-chips span {
  font-size: 0.78rem;
  padding: 7px 10px;
}

.flip-hint {
  font-size: 0.84rem;
}

.how-to-steps li {
  font-size: 0.94rem;
}

.game-card .game-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.08);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.34));
}

.hero-copy-block {
  min-width: 0;
  flex: 1;
  padding-right: 28px;
}

.hero-copy-block h1 {
  max-width: 760px;
  line-height: 0.94;
}

.hero-access-block {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.dashboard-coach-mascot {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.36));
}

.access-banner-copy {
  min-width: 0;
  flex: 1;
}

.access-banner-mascot {
  width: 92px;
  height: 92px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.36));
}

@media (max-width: 900px) {
  .hero-access-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-coach-mascot,
  .access-banner-mascot {
    width: 74px;
    height: 74px;
  }
}

/* Login page polish */
.auth-page {
  background:
    radial-gradient(
      circle at 12% 14%,
      rgba(34, 211, 238, 0.24),
      transparent 18rem
    ),
    radial-gradient(
      circle at 88% 12%,
      rgba(251, 191, 36, 0.22),
      transparent 18rem
    ),
    radial-gradient(
      circle at 18% 86%,
      rgba(251, 113, 133, 0.16),
      transparent 20rem
    ),
    radial-gradient(
      circle at 82% 84%,
      rgba(59, 130, 246, 0.16),
      transparent 22rem
    ),
    linear-gradient(135deg, var(--mj-sky), #ffffff 46%, var(--mj-cream));
}

.auth-card {
  border: 3px solid rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(
      115deg,
      rgba(34, 211, 238, 0.14) 0 16%,
      transparent 16% 30%,
      rgba(251, 191, 36, 0.16) 30% 44%,
      transparent 44%
    ),
    radial-gradient(
      circle at 92% 12%,
      rgba(251, 113, 133, 0.13),
      transparent 18rem
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 236, 0.9));
  box-shadow:
    0 14px 0 rgba(16, 32, 74, 0.08),
    0 36px 80px rgba(16, 32, 74, 0.14);
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-card h1 {
  max-width: 820px;
  margin-bottom: 14px;
  color: var(--mj-ink);
}

.auth-copy {
  max-width: 760px;
  color: var(--mj-text);
  font-weight: 800;
}

@media (max-width: 760px) {
  .auth-brand {
    width: 206px;
    height: 84px;
  }

  .auth-card::after {
    position: static;
    display: block;
    width: 82px;
    margin: 20px auto 0;
  }

  .auth-card h1,
  .auth-copy,
  .auth-card .primary-action,
  .auth-card .safe-note {
    max-width: 100%;
  }
}

.auth-card h1,
.auth-copy,
.auth-card .primary-action,
.auth-card .safe-note {
  max-width: min(100%, 760px);
}

.auth-card .primary-action {
  position: relative;
  z-index: 2;
}
.auth-mascot {
  position: absolute;
  right: clamp(34px, 6vw, 82px);
  top: 50%;
  transform: translateY(-40%);
  z-index: 1;
  width: clamp(118px, 15vw, 185px);
  pointer-events: none;
  filter: drop-shadow(0 18px 26px rgba(16, 32, 74, 0.18));
}

.auth-card .primary-action,
.auth-card .safe-note {
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  .auth-mascot {
    position: static;
    display: block;
    width: 86px;
    margin: 20px auto 0;
  }
}
.auth-card::before {
  content: "";
  position: absolute;
  right: 150px;
  top: 120px;
  width: 140px;
  height: 140px;
  pointer-events: none;

  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(251, 191, 36, 0.95) 0 5px,
      transparent 6px
    ),
    linear-gradient(rgba(34, 211, 238, 0.8), rgba(34, 211, 238, 0.8)) 72% 34% /
      22px 4px no-repeat,
    radial-gradient(
      circle at 78% 72%,
      rgba(251, 113, 133, 0.7) 0 4px,
      transparent 5px
    );

  opacity: 0.75;
}
