﻿:root {
  --paper: #f5efe7;
  --paper-strong: #e8dcc8;
  --ivory: #fffdf8;
  --ink: #1a221d;
  --ink-soft: #46524d;
  --forest: #17312e;
  --moss: #2d433d;
  --sage: #dfe8d1;
  --gold: #d9a658;
  --gold-deep: #b87b2a;
  --clay: #c77c5d;
  --rose: #f0d4c2;
  --sky: #dfeaf4;
  --mint: #dfeecf;
  --card: #fffefb;
  --muted: rgba(26, 34, 29, 0.7);
  --border: rgba(26, 34, 29, 0.12);
  --shadow: 0 24px 44px rgba(23, 49, 46, 0.14);
  --radius: 24px;
}

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f8f2e9 0%, #f4eee7 100%);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  max-width: 100%;
  display: block;
}

button, input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 34, 29, 0.08);
  box-shadow: 0 12px 24px rgba(23, 49, 46, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--forest);
  letter-spacing: -0.04em;
  font-size: 1.2rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--forest), var(--moss));
  color: var(--ivory);
  font-size: 1.25rem;
  border: 1px solid rgba(26, 34, 29, 0.08);
  box-shadow: 0 10px 20px rgba(23, 49, 46, 0.16);
  transform: rotate(-6deg);
}

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

.nav a {
  color: var(--ink-soft);
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  background: rgba(23, 49, 46, 0.06);
  color: var(--forest);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(26, 34, 29, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--forest);
  width: 46px;
  height: 46px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(23, 49, 46, 0.08);
}

.hero {
  position: relative;
  padding: 72px 0 54px;
  background: radial-gradient(circle at top left, rgba(217, 166, 88, 0.12), transparent 30%), linear-gradient(135deg, rgba(255, 253, 248, 0.98) 0%, rgba(245, 239, 231, 0.97) 100%);
  border-bottom: 1px solid rgba(26, 34, 29, 0.08);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(23, 49, 46, 0.03));
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(26, 34, 29, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--moss);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  text-transform: uppercase;
}

h1, h2, h3,
.brand,
.nav a,
.eyebrow,
.btn {
  font-family: "Cormorant Garamond", Georgia, serif;
}

h1, h2, h3 {
  margin: 0 0 14px;
  color: var(--forest);
  letter-spacing: -0.05em;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(3.2rem, 6vw, 6rem);
  line-height: 0.9;
  margin-top: 20px;
  text-transform: none;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 640px;
  margin-top: 18px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(26, 34, 29, 0.08);
  color: var(--forest);
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(23, 49, 46, 0.05);
}

.metric-pill strong {
  font-family: "Manrope", sans-serif;
}

.mode-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.mode-btn {
  appearance: none;
  border: 1px solid rgba(26, 34, 29, 0.1);
  background: rgba(255, 255, 255, 0.5);
  color: var(--forest);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.mode-btn:hover,
.mode-btn.active {
  background: rgba(23, 49, 46, 0.95);
  color: var(--ivory);
  border-color: rgba(23, 49, 46, 0.95);
  transform: translateY(-1px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 15px 22px;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid rgba(26, 34, 29, 0.08);
  box-shadow: 0 12px 24px rgba(23, 49, 46, 0.12);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--forest), var(--moss));
  color: var(--ivory);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--forest);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.42);
  color: var(--forest);
  box-shadow: none;
}

.hero-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(238, 233, 224, 0.94));
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 30px 26px;
}

.case-header {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(217, 166, 88, 0.12);
  color: var(--gold-deep);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel h2 {
  margin-top: 18px;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.case-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 12px;
}

.case-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(26, 34, 29, 0.08);
  color: var(--ink-soft);
}

.case-list li span {
  font-weight: 700;
}

.case-list li strong {
  color: var(--forest);
}

.mini-progress {
  margin-top: 28px;
}

.mini-progress small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.page-section {
  padding: 64px 0;
  background: rgba(255, 255, 255, 0.44);
}

.page-section + .page-section {
  border-top: 1px solid rgba(26, 34, 29, 0.08);
}

.alt-panel {
  background: linear-gradient(180deg, rgba(223, 232, 209, 0.38), rgba(255, 255, 255, 0.1));
}

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

.section-heading h2 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.section-subtitle {
  color: var(--muted);
  max-width: 500px;
}

.steps-grid,
.preview-grid,
.blog-grid,
.feature-grid,
.article-grid,
.footer-grid,
.mode-grid {
  display: grid;
  gap: 24px;
}

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

.mode-card,
.step-card,
.preview-card,
.blog-card,
.feature-card,
.article-card {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 28px;
  box-shadow: 0 20px 36px rgba(23, 49, 46, 0.08);
}

.mode-card {
  padding: 28px 22px;
}

.mode-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(217, 166, 88, 0.18), rgba(23, 49, 46, 0.05));
  color: var(--forest);
}

.mode-card h3,
.feature-card h3,
.step-card h3,
.blog-card-body h3 {
  font-size: clamp(1.7rem, 2vw, 2.1rem);
  margin-bottom: 8px;
}

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

.feature-card {
  padding: 28px 22px;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(23, 49, 46, 0.06);
  font-weight: 800;
  color: var(--forest);
  margin-bottom: 18px;
}

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

.step-card {
  padding: 28px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(232, 238, 228, 0.6));
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold), #f4d79d);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--forest);
  margin-bottom: 18px;
}

.preview-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}

.preview-card {
  padding: 28px;
}

.preview-ladder {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.level-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(223, 232, 209, 0.58);
  border-radius: 16px;
  border: 1px solid rgba(26, 34, 29, 0.08);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--forest);
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 14px;
  background: rgba(26, 34, 29, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest), var(--gold));
}

.preview-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.preview-stat {
  background: linear-gradient(135deg, rgba(223, 232, 209, 0.7), rgba(255,255,255,0.8));
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 22px;
  padding: 22px 20px;
}

.preview-stat strong {
  display: block;
  font-size: 2rem;
  color: var(--forest);
  margin-top: 8px;
}

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

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

.blog-card {
  overflow: hidden;
}

.blog-card figure {
  margin: 0;
  height: 190px;
  position: relative;
  border-bottom: 1px solid rgba(26, 34, 29, 0.08);
}

.blog-card figure.clue { background: linear-gradient(135deg, rgba(232, 212, 194, 0.8), rgba(240, 212, 194, 0.7)); }
.blog-card figure.strategy { background: linear-gradient(135deg, rgba(223, 234, 244, 0.9), rgba(255,255,255,0.8)); }
.blog-card figure.practice { background: linear-gradient(135deg, rgba(223, 232, 209, 0.9), rgba(255,255,255,0.8)); }

.blog-card figure span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 900;
  color: var(--forest);
}

.blog-card-body {
  padding: 22px;
}

.meta-line {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 800;
  margin-bottom: 12px;
}

.page-surface {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 28px;
  padding: clamp(18px, 3vw, 38px);
  box-shadow: 0 20px 32px rgba(23, 49, 46, 0.06);
}

.content-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.content-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 18px;
}

.content-list li {
  background: rgba(223, 232, 209, 0.6);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(26, 34, 29, 0.08);
}

.feature-box {
  background: linear-gradient(135deg, rgba(223, 232, 209, 0.65), rgba(255,255,255,0.75));
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(26, 34, 29, 0.08);
  box-shadow: 0 18px 30px rgba(23, 49, 46, 0.08);
}

.site-footer {
  background: linear-gradient(180deg, #1a221d 0%, #101714 100%);
  color: rgba(255, 255, 255, 0.88);
  padding: 48px 0 34px;
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-grid {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 22px;
  padding-top: 18px;
  text-align: center;
  color: rgba(255,255,255,0.62);
}

.page-hero {
  padding: 60px 0 22px;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  text-transform: none;
}

.article-grid {
  grid-template-columns: 1.4fr 0.6fr;
  margin-top: 18px;
}

.article-card {
  padding: 0;
  overflow: hidden;
}

.article-card .blog-card-body {
  padding: 24px;
}

.article-card .blog-card-body h3 {
  font-size: 1.6rem;
}

.sidebar-card {
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 30px rgba(23, 49, 46, 0.08);
}

.article-content {
  font-size: 1.05rem;
  color: var(--ink);
}

.article-content p {
  margin: 0 0 18px;
}

.article-content h2,
.article-content h3 {
  margin-top: 26px;
}

.inline-list {
  margin: 18px 0;
  padding-left: 18px;
  color: var(--ink);
}

.inline-list li {
  margin-bottom: 10px;
}

.game-layout {
  padding: 40px 0 60px;
}

.game-shell {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(26, 34, 29, 0.08);
  background: linear-gradient(135deg, rgba(223, 232, 209, 0.9), rgba(255,255,255,0.68));
}

.game-stats,
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(217, 166, 88, 0.14);
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.label-tag {
  background: rgba(23, 49, 46, 0.06);
}

.stat-pill {
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  color: var(--forest);
  box-shadow: 0 10px 20px rgba(23, 49, 46, 0.06);
}

.game-body {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

.puzzle-panel {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 28px rgba(23, 49, 46, 0.06);
}

.question-tag {
  display: inline-block;
  border-radius: 999px;
  background: rgba(199, 124, 93, 0.1);
  border: 1px solid rgba(199, 124, 93, 0.18);
  color: var(--clay);
  padding: 8px 12px;
  font-weight: 800;
  margin-bottom: 14px;
}

.puzzle-question {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  line-height: 1.35;
  margin-bottom: 22px;
  color: var(--forest);
}

.puzzle-decor {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 28px;
}

.spark {
  display: inline-block;
  color: var(--gold-deep);
  font-size: 1.2rem;
  opacity: 0.85;
  animation: twinkle 2s ease-in-out infinite;
}

.sparkle-two { animation-delay: 0.4s; }
.sparkle-three { animation-delay: 0.8s; }

@keyframes twinkle {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

.answer-form {
  display: grid;
  gap: 16px;
}

.answer-input,
.answer-select {
  width: 100%;
  border: 1px solid rgba(26, 34, 29, 0.12);
  border-radius: 14px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.8);
  color: var(--ink);
  font-size: 1.02rem;
}

.answer-input:focus,
.answer-select:focus {
  outline: 3px solid rgba(23, 49, 46, 0.08);
  border-color: rgba(26, 34, 29, 0.2);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.small-btn {
  border: 1px solid rgba(26, 34, 29, 0.12);
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(23, 49, 46, 0.08);
}

.small-btn.primary { background: linear-gradient(135deg, var(--forest), var(--moss)); color: white; }
.small-btn.alt { background: linear-gradient(135deg, var(--gold), #f0d79a); color: var(--forest); }
.small-btn.warn { background: rgba(217, 166, 88, 0.16); color: var(--forest); }
.small-btn.soft { background: rgba(26, 34, 29, 0.04); color: var(--forest); }
.small-btn.danger { background: rgba(199, 124, 93, 0.12); color: var(--clay); }

.feedback {
  min-height: 28px;
  font-weight: 800;
  margin-top: 8px;
}

.feedback.success { color: #1d7e62; }
.feedback.error { color: #b34141; }
.feedback.info { color: var(--forest); }

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-card {
  background: linear-gradient(180deg, rgba(223, 232, 209, 0.5), rgba(255,255,255,0.78));
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 22px rgba(23, 49, 46, 0.06);
}

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

.mission-card {
  background: linear-gradient(135deg, rgba(23, 49, 46, 0.96), rgba(45, 67, 61, 0.96));
  color: rgba(255,255,255,0.9);
}

.mission-card h3,
.mission-card li strong,
.mission-card li span {
  color: rgba(255,255,255,0.96);
}

.mission-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.mission-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.mission-list span {
  opacity: 0.8;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.clue-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: min(80vh, 680px);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--ivory);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(23, 49, 46, 0.28);
}

.clue-dialog[open] {
  animation: dialog-enter 220ms ease-out both;
}

.clue-dialog::backdrop {
  background: rgba(23, 49, 46, 0.56);
  backdrop-filter: blur(4px);
}

.clue-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.clue-dialog h2 {
  margin: 8px 0 12px;
  color: var(--forest);
}

.clue-dialog p {
  margin: 0 0 24px;
  line-height: 1.7;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--paper);
  color: var(--forest);
  font-size: 1.5rem;
  cursor: pointer;
}

.clue-dialog .btn {
  font-size: 1rem;
}

@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.puzzle-panel,
.completion-screen {
  position: relative;
  overflow: hidden;
}

.fireworks-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
}

.firework-particle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--spark-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--spark-color), transparent 25%);
  animation: firework-burst 1050ms cubic-bezier(0.12, 0.72, 0.24, 1) var(--spark-delay) both;
}

.firework-particle:nth-child(3n) {
  width: 6px;
  height: 14px;
  border-radius: 2px;
}

.firework-particle:nth-child(3n + 1) {
  width: 7px;
  height: 7px;
  border-radius: 1px;
}

@keyframes firework-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(0deg); }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--spark-x), var(--spark-y), 0) scale(0.35) rotate(240deg);
  }
}

.spelling-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 166, 88, 0.34);
  border-radius: 14px;
  background: rgba(217, 166, 88, 0.12);
  color: var(--forest);
}

.spelling-suggestion strong {
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  .clue-dialog[open],
  .firework-particle {
    animation: none;
  }
}

.hidden {
  display: none !important;
}

.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(100%, 320px);
  border: 1px solid rgba(26, 34, 29, 0.12);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.chess-square {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 700;
}

.chess-square.light { background: #f5f0e9; }
.chess-square.dark { background: #dde8d8; }

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

.visual-shape {
  border-radius: 16px;
  min-height: 80px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  border: 1px solid rgba(26, 34, 29, 0.12);
  background: rgba(223, 234, 244, 0.6);
}

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

.memory-item {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(199, 124, 93, 0.12);
  font-size: 1.8rem;
  font-weight: 800;
  border: 1px solid rgba(26, 34, 29, 0.12);
}

.completion-screen {
  padding: 36px 28px;
  text-align: center;
}

.completion-screen h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 18px;
}

.completion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 28px;
}

.completion-stat {
  background: linear-gradient(135deg, rgba(223, 232, 209, 0.7), rgba(255,255,255,0.8));
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 16px;
  padding: 18px 12px;
  box-shadow: 0 12px 22px rgba(23, 49, 46, 0.06);
}

.completion-stat strong {
  display: block;
  font-size: 2rem;
  color: var(--forest);
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-box {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(26, 34, 29, 0.08);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 16px 28px rgba(23, 49, 46, 0.06);
}

.contact-box a {
  color: var(--clay);
  font-weight: 800;
}

@media (max-width: 900px) {
  .hero-grid,
  .preview-grid,
  .content-grid,
  .game-body,
  .contact-card,
  .article-grid,
  .footer-grid,
  .steps-grid,
  .blog-grid,
  .feature-grid,
  .mode-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 16px;
    right: 16px;
    background: rgba(255,255,255,0.96);
    padding: 16px;
    border: 1px solid rgba(26, 34, 29, 0.08);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(23, 49, 46, 0.12);
    flex-direction: column;
    align-items: flex-start;
  }

  .nav.open { display: flex; }

  .nav-toggle { display: grid; place-items: center; }
}

@media (max-width: 640px) {
  .hero { padding-top: 48px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .game-header { flex-direction: column; align-items: flex-start; }
  .completion-grid { grid-template-columns: 1fr; }
}
