:root {
  --bg0: #fff7fb;
  --bg1: #f0f7ff;
  --paper: rgba(255, 255, 255, 0.78);
  --paper-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(91, 33, 182, 0.14);
  --text: #2b1d4f;
  --muted: #6b5b8a;
  --shadow: 0 22px 60px rgba(124, 58, 237, 0.16);
  --radius: 22px;

  --a: #ec4899;
  --b: #38bdf8;
  --c: #a78bfa;
  --d: #34d399;
  --warn: #fb923c;
  --bad: #f87171;
  --good: #22c55e;

  --font-body: "Manrope", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-display: "Nunito", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(640px 460px at 8% 0%, rgba(244, 114, 182, 0.18), transparent 60%),
    radial-gradient(560px 420px at 95% 8%, rgba(125, 211, 252, 0.22), transparent 60%),
    radial-gradient(640px 480px at 80% 90%, rgba(167, 139, 250, 0.18), transparent 60%),
    radial-gradient(520px 380px at 10% 95%, rgba(134, 239, 172, 0.18), transparent 60%),
    linear-gradient(180deg, #fff7fb 0%, #fef9f4 40%, #eff6ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
  animation: blob-drift 22s ease-in-out infinite;
}

body::before {
  width: 380px;
  height: 380px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle at 30% 30%, #fbcfe8, #fde68a 60%, transparent 70%);
}

body::after {
  width: 460px;
  height: 460px;
  bottom: -160px;
  right: -160px;
  background: radial-gradient(circle at 60% 60%, #c4b5fd, #bae6fd 60%, transparent 70%);
  animation-delay: -8s;
}

@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, 30px) scale(1.05); }
  66%      { transform: translate(-30px, 50px) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after { animation: none; }
}

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

.hidden {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  z-index: 999;
  border: 1px solid var(--border);
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.app {
  width: min(1180px, calc(100% - 28px));
  margin: 92px auto 44px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 12px 14px;
  pointer-events: none;
}

.header-inner {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 18px 50px rgba(124, 58, 237, 0.12);
  padding: 10px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f9a8d4, #c084fc 55%, #93c5fd);
  box-shadow: 0 14px 40px rgba(167, 139, 250, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.8);
  font-size: 1.25rem;
}

.brand-title {
  display: block;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-subtitle {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
}

.nav-toggle-lines {
  width: 18px;
  height: 12px;
  display: inline-block;
  position: relative;
  margin-right: 8px;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 3px;
  transition: transform 0.18s ease, top 0.18s ease, opacity 0.18s ease;
}

.nav-toggle-lines::before {
  top: 1px;
}

.nav-toggle-lines::after {
  top: 9px;
}

.nav-toggle-label {
  font-size: 0.95rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: -0.01em;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.2);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-link.is-active {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.28);
  color: var(--text);
}

.nav-cta {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 1000;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #f9a8d4, #c084fc);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 38px rgba(192, 132, 252, 0.34);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.screen {
  opacity: 1;
}

.screen.is-entering {
  animation: pop-in 0.22s ease both;
}

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

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(91, 33, 182, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding: 22px;
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 10px;
  margin-bottom: 10px;
}

.hero-main,
.hero-side,
.game-shell,
.contact-card,
.books-card {
  padding: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.35);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.05;
  margin: 8px 0 8px;
  background: linear-gradient(135deg, #4c1d95, #db2777 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  margin-bottom: 10px;
  color: #2b1d4f;
}

h3 {
  font-weight: 1000;
  font-size: 1.08rem;
  margin-bottom: 8px;
}

p {
  margin: 0;
  line-height: 1.72;
}

.lead {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 64ch;
}

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

.spaced {
  margin-top: 10px;
}

.hero-actions,
.pill-row,
.section-actions,
.contact-links,
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions {
  margin-top: 10px;
}

.pill-row {
  margin-top: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
  font-weight: 900;
  font-size: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              filter 0.18s ease,
              opacity 0.18s ease;
  box-shadow: 0 10px 24px rgba(91, 33, 182, 0.18);
}

.btn-primary {
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.25);
}

.btn-secondary {
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.22);
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.05);
}

.btn-primary:hover { box-shadow: 0 14px 28px rgba(236, 72, 153, 0.35); }
.btn-secondary:hover { box-shadow: 0 14px 28px rgba(99, 102, 241, 0.32); }

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color: #ffffff;
}

.btn-secondary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #ffffff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
}

.avatar-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 210px;
  margin: 4px auto 10px;
  display: grid;
  place-items: center;
  isolation: isolate;
  padding: 4%;
}

.avatar-halo {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background:
    conic-gradient(
      from 220deg,
      #f9a8d4 0%,
      #c084fc 22%,
      #7dd3fc 45%,
      #6ee7b7 65%,
      #fde68a 82%,
      #f9a8d4 100%
    );
  filter: blur(2px);
  opacity: 0.85;
  z-index: 0;
  animation: halo-spin 14s linear infinite;
}

.avatar-halo::after {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
}

.avatar-frame {
  position: relative;
  width: 86%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  box-shadow:
    0 18px 50px rgba(124, 58, 237, 0.32),
    0 4px 12px rgba(236, 72, 153, 0.2),
    inset 0 0 0 4px #fff;
  background: #fff;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.avatar-wrap:hover .avatar-img {
  transform: scale(1.04);
}

.orbit {
  position: absolute;
  font-size: 0.75rem;
  z-index: 3;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #fff;
  filter: drop-shadow(0 4px 10px rgba(124, 58, 237, 0.28));
  animation: float 4.2s ease-in-out infinite;
}

.orbit-1 {
  top: 10%;
  right: 8%;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.3);
}

.orbit-2 {
  top: 46%;
  left: 6%;
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  box-shadow: 0 6px 16px rgba(244, 114, 182, 0.3);
  animation-delay: -1s;
}

.orbit-3 {
  bottom: 10%;
  right: 8%;
  background: linear-gradient(135deg, #cffafe, #bae6fd);
  box-shadow: 0 6px 16px rgba(125, 211, 252, 0.32);
  animation-delay: -2.2s;
}

.orbit-4 {
  bottom: 14%;
  left: 10%;
  background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
  box-shadow: 0 6px 16px rgba(167, 139, 250, 0.32);
  animation-delay: -3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(4deg); }
}

@keyframes halo-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .avatar-halo,
  .orbit {
    animation: none;
  }
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 18px 30px;
}

.hero-side .avatar-wrap {
  margin-bottom: 20px;
}

.hero-side-wave {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 50%;
  font-size: 1rem;
  background: linear-gradient(135deg, #fce7f3, #ddd6fe);
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.18);
  animation: float 4.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-side-wave {
    animation: none;
  }
}

.hero-side h2 {
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  margin: 0;
  background: linear-gradient(135deg, #4c1d95, #db2777 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-side p {
  font-size: 0.82rem;
  line-height: 1.55;
}

.stats {
  display: grid;
   grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.stat-card {
  padding: 12px 14px;
}

.stat-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fde68a, #fbcfe8);
  border: 1px solid rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.section--tight {
  margin-top: 8px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tag {
  font-weight: 900;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}

.callout {
  margin-top: 14px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(251, 146, 60, 0.3);
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #7c2d12;
}

.section {
  margin: 18px 0;
}

/* Homepage: ξεκάθαρο «κομμάτι» ανάμεσα σε βασικές ενότητες (π.χ. παιχνίδια / βιβλία) */
.section.home-section {
  position: relative;
  margin-top: clamp(26px, 5vw, 46px);
  margin-bottom: 12px;
  padding-top: clamp(20px, 3.2vw, 30px);
  border-top: 1px solid rgba(124, 58, 237, 0.12);
}

.section.home-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: min(88px, 24vw);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #e879f9);
  opacity: 0.65;
}

.section.home-section--after {
  margin-top: clamp(32px, 5.5vw, 52px);
  padding-top: clamp(22px, 3.5vw, 32px);
}

.section.home-section--after::before {
  background: linear-gradient(90deg, #a855f7, #fb7185);
  opacity: 0.55;
  width: min(72px, 20vw);
}

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

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.games-section .game-card-extra {
  display: none;
}

.games-section.is-expanded .game-card-extra {
  display: block;
  animation: extra-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes extra-pop {
  0%   { opacity: 0; transform: translateY(14px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.games-more {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.games-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.games-more-arrow {
  display: inline-block;
  font-size: 1.05rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.games-section.is-expanded .games-more-arrow {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .games-section.is-expanded .game-card-extra { animation: none; }
  .games-more-arrow { transition: none; }
}

.game-card {
  padding: 18px;
  min-height: 230px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.22s ease,
              border-color 0.2s ease;
}

.game-card::after {
  content: "✨";
  position: absolute;
  top: 18px;
  left: 18px;
  font-size: 1.1rem;
  opacity: 0;
  transform: rotate(-15deg) scale(0.6);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 18px 38px rgba(124, 58, 237, 0.22);
  border-color: rgba(255, 255, 255, 0.95);
}

.game-card:hover::after {
  opacity: 1;
  transform: rotate(8deg) scale(1.1);
}

.game-card:active {
  transform: translateY(-2px) scale(0.99);
}

.game-subtitle {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78em;
  color: var(--muted);
  letter-spacing: -0.005em;
  margin-left: 4px;
}

/* -------- Medals on game cards -------- */
.medal-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #fff;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.18);
  z-index: 4;
  animation: medal-pop 0.4s ease-out;
}

.medal-gold {
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.45), 0 0 0 3px rgba(251, 191, 36, 0.25);
}
.medal-silver {
  box-shadow: 0 8px 24px rgba(148, 163, 184, 0.45), 0 0 0 3px rgba(148, 163, 184, 0.25);
}
.medal-bronze {
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.4), 0 0 0 3px rgba(217, 119, 6, 0.22);
}

@keyframes medal-pop {
  0%   { transform: scale(0.4) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(8deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0deg);     opacity: 1; }
}

.medal-reveal {
  text-align: center;
  padding: 22px 16px 18px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffbeb, #fef3c7 60%, #fde68a);
  border: 2px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 8px 28px rgba(251, 191, 36, 0.2);
}

.medal-reveal-badge {
  font-size: 4.5rem;
  line-height: 1;
  display: block;
  animation: medal-reveal-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.medal-reveal-label {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #92400e;
}

@keyframes medal-reveal-pop {
  0%   { transform: scale(0) rotate(-25deg); opacity: 0; }
  55%  { transform: scale(1.5) rotate(12deg); opacity: 1; }
  75%  { transform: scale(0.88) rotate(-6deg); }
  100% { transform: scale(1) rotate(0deg);   opacity: 1; }
}

/* -------- Glossary cards (flip) -------- */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.gloss-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  perspective: 900px;
  font: inherit;
  color: inherit;
}

.gloss-front,
.gloss-back {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.6, -0.05, 0.4, 1.05);
  border: 1px solid rgba(91, 33, 182, 0.12);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.12);
}

.gloss-front {
  background: linear-gradient(155deg, #fef3c7, #fbcfe8 60%, #ddd6fe);
  transform: rotateY(0);
}

.gloss-back {
  background: linear-gradient(155deg, #cffafe, #c4b5fd 60%, #fbcfe8);
  color: var(--text);
  transform: rotateY(180deg);
}

.gloss-card.is-flipped .gloss-front { transform: rotateY(-180deg); }
.gloss-card.is-flipped .gloss-back  { transform: rotateY(0); }

.gloss-icon { font-size: 2.2rem; line-height: 1; }
.gloss-en {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.gloss-el {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
}
.gloss-flip-hint {
  position: absolute;
  bottom: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  opacity: 0.7;
}
.gloss-back-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.gloss-back-def {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.gloss-card:focus-visible .gloss-front,
.gloss-card:focus-visible .gloss-back {
  outline: 3px solid rgba(124, 58, 237, 0.55);
  outline-offset: 2px;
}

/* -------- Certificate CTA -------- */
.cert-cta {
  margin-top: 24px;
  padding: 22px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(135deg, #fde68a 0%, #fbcfe8 50%, #c4b5fd 100%);
  border: 2px dashed rgba(124, 58, 237, 0.4);
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.16);
  position: relative;
  overflow: hidden;
}

.cert-cta::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent 60%);
  animation: cert-shine 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cert-shine {
  0%, 100% { transform: translate(-20%, -20%); }
  50%      { transform: translate(20%, 20%); }
}

.cert-cta-emoji {
  font-size: 3rem;
  filter: drop-shadow(0 4px 8px rgba(124, 58, 237, 0.25));
  animation: cert-bounce 2s ease-in-out infinite;
}

@keyframes cert-bounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}

.cert-cta-text {
  flex: 1;
  min-width: 200px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.cert-cta-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  display: block;
}

.cert-cta .btn {
  position: relative;
  z-index: 1;
}

/* -------- Parents band (separate, distinct visual zone) -------- */
.parents-band {
  position: relative;
  margin: 0;
  padding: 56px 28px 64px;
  background:
    radial-gradient(900px 380px at 18% 10%, rgba(196, 181, 253, 0.35), transparent 60%),
    radial-gradient(700px 320px at 82% 90%, rgba(251, 207, 232, 0.45), transparent 60%),
    linear-gradient(170deg, #f5f3ff 0%, #fef3c7 50%, #ecfeff 100%);
  border: 1px dashed rgba(91, 33, 182, 0.2);
  border-radius: 28px;
  scroll-margin-top: 100px;
}

.screen-parents {
  padding-top: 12px;
}

.parents-top-actions {
  margin-bottom: 20px;
}

.parents-band::before,
.parents-band::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 96px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.45), transparent);
  transform: translateX(-50%);
}
.parents-band::before { top: 18px; }
.parents-band::after  { bottom: 18px; }

.parents-band-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.parents-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.parents-eyebrow {
  align-self: center;
}

.parents-intro h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #5b21b6, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.parents-lead {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.55;
  opacity: 0.85;
}

.parents-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.parents-side {
  display: grid;
  grid-template-rows: auto auto;
  gap: 20px;
}

.parents-tips-card,
.parents-printable-card,
.parents-checklist-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 22px;
}

.parents-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.parents-card-head h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.parents-card-head p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.parents-card-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #fde68a, #fbcfe8);
  font-size: 1.6rem;
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.28);
}

.parents-printable-card .parents-card-icon {
  background: linear-gradient(135deg, #c4b5fd, #fbcfe8);
  box-shadow: 0 6px 16px rgba(167, 139, 250, 0.32);
}

.parents-checklist-card .parents-card-icon {
  background: linear-gradient(135deg, #a7f3d0, #fde68a);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.28);
}

.parents-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.parents-bullets li {
  position: relative;
  padding: 10px 14px 10px 36px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.4;
}

.parents-bullets li::before {
  content: "✦";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-2);
  font-weight: 800;
}

.parents-cta-btn {
  align-self: flex-start;
  margin-top: auto;
}

.parents-checklist-card .checklist {
  margin-top: 4px;
  grid-template-columns: 1fr;
}

.parents-checklist-card .checklist li label {
  background: rgba(255, 255, 255, 0.85);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .parents-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .parents-band {
    margin: 36px -16px 0;
    padding: 36px 18px 44px;
    border-radius: 20px;
  }
}

/* highlight nav link for parents / about-me page */
.nav-link-parents,
.nav-link-about {
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.35), rgba(251, 207, 232, 0.4));
  border: 1px solid rgba(124, 58, 237, 0.18);
}

.me-page-title {
  font-size: clamp(1.55rem, 3.6vw, 2.05rem);
  margin: 0.35em 0 0.2em;
}

.me-page-footer {
  margin-top: 22px;
}

.tip {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 20px;
  background: linear-gradient(155deg, #ffffff, #faf5ff);
  border: 1px solid rgba(91, 33, 182, 0.1);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tip:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(124, 58, 237, 0.14);
}

.tip-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #fde68a, #fbcfe8);
  font-size: 1.5rem;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}

.tip h3,
.tip h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
}

.tip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 16px;
}

.checklist li label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(91, 33, 182, 0.08);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  line-height: 1.4;
}

.checklist li label:hover { background: rgba(255, 255, 255, 0.92); }

.checklist input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.eyebrow-soft {
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.6), rgba(251, 207, 232, 0.6));
  border-color: rgba(167, 139, 250, 0.45);
  color: #5b21b6;
}

/* -------- Printable cards dialog -------- */
.printable-dialog,
.cert-dialog {
  width: min(960px, 96vw);
  max-height: 92vh;
}

.printable-intro {
  margin: 4px 0 14px;
  font-weight: 600;
}

.printable-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-height: 56vh;
  overflow-y: auto;
  padding: 4px;
}

.print-card {
  position: relative;
  padding: 14px 12px;
  border-radius: 18px;
  background: linear-gradient(155deg, #ffffff, #faf5ff);
  border: 2px dashed rgba(91, 33, 182, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 200px;
}

.print-card-front {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}

.print-card-back {
  margin-top: 10px;
  background: linear-gradient(155deg, #fef3c7, #fbcfe8);
  border-color: rgba(124, 58, 237, 0.55);
}

.print-card-num {
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.print-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.print-card-scenario {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  flex: 1;
}

.print-card-prompt {
  font-family: var(--font-display);
  font-weight: 800;
  color: #5b21b6;
}

.print-card-answer {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 6px 12px;
  border-radius: 12px;
  display: inline-block;
  align-self: flex-start;
}

.print-card-answer.is-suspicious {
  background: rgba(248, 113, 113, 0.2);
  color: #b91c1c;
}

.print-card-answer.is-real {
  background: rgba(74, 222, 128, 0.22);
  color: #166534;
}

.print-card-explain {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.4;
  flex: 1;
}

.print-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* -------- Certificate dialog -------- */
.cert-preview-wrap {
  margin-top: 14px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(91, 33, 182, 0.08);
  padding: 10px;
}

.cert-preview-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.18);
}

[data-cert-name] {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  font: inherit;
  font-weight: 700;
  outline: none;
}

[data-cert-name]:focus {
  border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.18);
}

.cert-theme-picker {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.cert-theme-group-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.cert-theme-swatches {
  display: flex;
  gap: 8px;
}

.cert-swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.cert-swatch:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cert-swatch:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

.cert-swatch.is-active {
  border-color: var(--text);
  transform: scale(1.18);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* -------- Print stylesheet -------- */
@media print {
  /* Default: hide everything */
  body * { visibility: hidden !important; }

  /* Printable cards mode */
  body.is-printing [data-printable],
  body.is-printing [data-printable] * {
    visibility: visible !important;
  }

  body.is-printing [data-printable] {
    position: static !important;
    display: block !important;
    background: transparent !important;
    box-shadow: none !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    border: 0 !important;
    padding: 0 !important;
  }

  body.is-printing [data-printable] .hub-head,
  body.is-printing [data-printable] .hub-footer,
  body.is-printing [data-printable] .printable-intro {
    display: none !important;
  }

  body.is-printing [data-printable] .printable-sheet {
    max-height: none !important;
    overflow: visible !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8mm !important;
    padding: 0 !important;
  }

  body.is-printing .print-card {
    page-break-inside: avoid;
    break-inside: avoid;
    background: #fff !important;
    border: 1.5px dashed #5b21b6 !important;
    box-shadow: none !important;
  }

  body.is-printing .print-card-back {
    background: #fff7ed !important;
    border-color: #7c3aed !important;
  }

  /* Checklist print mode — only the checklist card */
  body.is-printing-checklist .parents-checklist-card,
  body.is-printing-checklist .parents-checklist-card * {
    visibility: visible !important;
  }

  body.is-printing-checklist .parents-checklist-card {
    position: absolute !important;
    inset: 0 !important;
    background: #fff !important;
    border: 2px solid #5b21b6 !important;
    box-shadow: none !important;
    padding: 24px !important;
  }

  body.is-printing-checklist .parents-checklist-card .parents-cta-btn {
    display: none !important;
  }

  @page {
    size: A4;
    margin: 12mm;
  }
}

/* -------- Mascot (floating helper) -------- */
.mascot {
  position: fixed;
  left: 18px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.mascot-btn {
  pointer-events: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #fff;
  font-size: 1.9rem;
  display: grid;
  place-items: center;
  cursor: grab;
  background: linear-gradient(135deg, #fde68a, #fbcfe8 60%, #c4b5fd);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: mascot-bob 3.4s ease-in-out infinite;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.mascot-btn:hover {
  transform: scale(1.08) rotate(-4deg);
}

.mascot-btn.wiggle {
  animation: mascot-wiggle 0.6s ease-in-out;
}

.mascot.is-dragging {
  cursor: grabbing;
}

.mascot.is-dragging .mascot-btn {
  cursor: grabbing;
  animation: none;
  transform: scale(1.12);
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.45);
  transition: none;
}

.mascot.is-dragging .mascot-bubble {
  opacity: 0;
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes mascot-wiggle {
  0%, 100% { transform: rotate(0); }
  20%      { transform: rotate(-12deg) scale(1.08); }
  40%      { transform: rotate(10deg) scale(1.08); }
  60%      { transform: rotate(-6deg) scale(1.04); }
  80%      { transform: rotate(4deg) scale(1.02); }
}

.mascot-bubble {
  pointer-events: none;
  position: relative;
  max-width: 260px;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.22);
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-bottom: 8px;
}

.mascot-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mascot-bubble::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 14px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}

@media (max-width: 720px) {
  .mascot { left: 12px; bottom: 84px; }
  .mascot-btn { width: 52px; height: 52px; font-size: 1.6rem; }
  .mascot-bubble { font-size: 0.85rem; max-width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .mascot-btn, .mascot-btn.wiggle { animation: none; }
}

@media print {
  .mascot, .to-top { display: none !important; }
}

.game-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -52px;
  bottom: -56px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), transparent 60%);
  pointer-events: none;
}

.game-card[data-id="passwordSafety"] {
  background: linear-gradient(135deg, #fbcfe8, #ddd6fe);
}
.game-card[data-id="bruteForce"] {
  background: linear-gradient(135deg, #fed7aa, #fde68a);
}
.game-card[data-id="caesar"] {
  background: linear-gradient(135deg, #bae6fd, #bbf7d0);
}
.game-card[data-id="phishing"] {
  background: linear-gradient(135deg, #fbcfe8, #fecaca);
}
.game-card[data-id="builder"] {
  background: linear-gradient(135deg, #cffafe, #d1fae5);
}
.game-card[data-id="duel"] {
  background: linear-gradient(135deg, #e9d5ff, #fbcfe8);
}
.game-card[data-id="glossary"] {
  background: linear-gradient(135deg, #ddd6fe, #fce7f3);
}

.game-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.14);
  margin-bottom: 12px;
}

.game-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.chip {
  font-size: 0.9rem;
  font-weight: 900;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

.footer-note {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.95rem;
}

.books-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.books-placeholder {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
}

.shelf {
  height: 90px;
  position: relative;
  border-bottom: 3px solid #c4b5fd;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 0;
}

.book {
  width: 26px;
  border-radius: 8px 8px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.15);
}
.book.b1 {
  height: 66px;
  background: linear-gradient(180deg, #f9a8d4, #fbcfe8);
}
.book.b2 {
  height: 56px;
  background: linear-gradient(180deg, #6ee7b7, #bbf7d0);
}
.book.b3 {
  height: 72px;
  background: linear-gradient(180deg, #c4b5fd, #ddd6fe);
}
.book.b4 {
  height: 58px;
  background: linear-gradient(180deg, #fdba74, #fde68a);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.contact-mini-form {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.contact-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.55), rgba(251, 207, 232, 0.55));
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
}

.contact-note-icon {
  font-size: 1.1rem;
}

.field span {
  display: block;
  font-weight: 1000;
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  resize: vertical;
  outline: none;
}

textarea:focus {
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.18);
}

.form-hint {
  margin: 0;
  font-size: 0.92rem;
}

/* -------- Game screen -------- */
.game-shell {
  padding: 20px;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.game-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 10px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.game-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-pill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  font-weight: 1000;
  color: var(--text);
}
.meta-pill.subtle {
  color: var(--muted);
}

.game-view {
  margin-top: 10px;
}

.panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

.panel + .panel {
  margin-top: 10px;
}

.panel-title {
  font-weight: 1000;
  margin-bottom: 6px;
}

.progress-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.progress {
  flex: 1;
  min-width: 220px;
  height: 14px;
  background: rgba(124, 58, 237, 0.12);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f9a8d4, #c084fc 50%, #7dd3fc);
  transition: width 0.22s ease;
}

.qbox {
  text-align: center;
  padding: 18px;
  background: linear-gradient(135deg, #fdf2f8, #ede9fe 50%, #e0f2fe);
  border-color: rgba(255, 255, 255, 0.9);
}

.big-code {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 1000;
  letter-spacing: -0.04em;
  word-break: break-word;
  font-variant-ligatures: none;
  color: #4c1d95;
}

.mid-code {
  font-size: clamp(1.3rem, 3.5vw, 2.1rem);
  font-weight: 1000;
  letter-spacing: -0.03em;
  word-break: break-word;
  font-variant-ligatures: none;
  color: #4c1d95;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.choice-btn {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 14px 14px;
  color: var(--text);
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.14);
  transition: transform 0.12s ease, filter 0.18s ease, opacity 0.18s ease;
}

.choice-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.choice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.choice-btn.is-correct,
.choice-btn.is-correct:disabled {
  opacity: 1 !important;
  background: linear-gradient(135deg, #86efac, #22c55e) !important;
  color: #052e16 !important;
  border: 2px solid #16a34a !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18), 0 18px 36px rgba(34, 197, 94, 0.25) !important;
  animation: choice-pulse 0.45s ease-out;
  position: relative;
}
.choice-btn.is-correct::before {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.1rem;
  font-weight: 900;
  color: #14532d;
}

.choice-btn.is-wrong,
.choice-btn.is-wrong:disabled {
  opacity: 1 !important;
  background: linear-gradient(135deg, #fca5a5, #f87171) !important;
  color: #7f1d1d !important;
  border: 2px solid #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18), 0 18px 36px rgba(220, 38, 38, 0.22) !important;
  animation: choice-shake 0.5s ease-in-out;
  position: relative;
}
.choice-btn.is-wrong::before {
  content: "✗";
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.1rem;
  font-weight: 900;
  color: #7f1d1d;
}

@keyframes choice-pulse {
  0% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes choice-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .choice-btn.is-correct,
  .choice-btn.is-wrong {
    animation: none;
  }
}

.choice-good {
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  color: #064e3b;
}
.choice-bad {
  background: linear-gradient(135deg, #fda4af, #fb7185);
  color: #7f1d1d;
}
.choice-alt {
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  color: #312e81;
}
.choice-warn {
  background: linear-gradient(135deg, #fdba74, #fb923c);
  color: #7c2d12;
}

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

.feedback-text {
  flex: 1;
  min-width: 220px;
  color: var(--muted);
  font-weight: 800;
}

.answers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.answer-item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  padding: 12px;
}

.answer-item strong {
  display: block;
  margin-bottom: 6px;
}

/* -------- Hub dialog -------- */
.hub {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  padding: 0;
  width: min(940px, calc(100% - 24px));
  background: rgba(255, 247, 251, 0.96);
  color: var(--text);
  box-shadow: 0 26px 90px rgba(124, 58, 237, 0.32);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.hub::backdrop {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.35), rgba(125, 211, 252, 0.35));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hub-inner {
  padding: 16px;
}

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

.hub-kicker {
  font-weight: 1000;
  color: var(--muted);
}

.hub-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.hub-close {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 1000;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hub-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* -------- Progress badge -------- */
.progress-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.6), rgba(251, 207, 232, 0.6));
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--text);
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 8px 22px rgba(251, 191, 36, 0.18);
}

.progress-badge.is-complete {
  background: linear-gradient(135deg, rgba(167, 243, 208, 0.7), rgba(186, 230, 253, 0.7));
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.22);
}

.progress-badge-icon {
  font-size: 1.05rem;
}

/* -------- Back to top -------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(135deg, #c084fc, #f472b6);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(124, 58, 237, 0.32);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 50;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.to-top:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 22px 44px rgba(124, 58, 237, 0.38);
}

/* -------- Responsive -------- */
@media (max-width: 980px) {
  .hero,
  .grid-two,
  .game-grid,
  .hub-grid,
  .answers-grid {
    grid-template-columns: 1fr;
  }
  .books-placeholder {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app {
    margin-top: 86px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .nav-menu {
    position: absolute;
    right: 14px;
    top: 66px;
    width: min(360px, calc(100vw - 28px));
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 70px rgba(124, 58, 237, 0.18);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
  }

  .nav-menu.is-open {
    display: flex;
    animation: pop-in 0.16s ease both;
  }

  .nav-link,
  .nav-cta {
    border-radius: 14px;
    justify-content: center;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
