*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0b0e18;
  --bg2: #131724;
  --surface: #1b1f32;
  --text: #e8e6e1;
  --text2: #908d85;
  --accent: #5b8def;
  --accent2: #4a7ad4;
  --accent-glow: rgba(91, 141, 239, 0.2);
  --correct: #2ecc71;
  --wrong: #e74c3c;
  --border: #282d42;
  --cell-bg: #1e2338;
  --cell-active: rgba(91, 141, 239, 0.15);
  --cell-highlight: rgba(91, 141, 239, 0.08);
  --overlay-bg: rgba(11, 14, 24, 0.9);
  --radius: 12px;
  --font: "Ubuntu", sans-serif;
}

html.light {
  --bg: #f0ece4;
  --bg2: #e8e3da;
  --surface: #faf7f0;
  --text: #1a1520;
  --text2: #6b6575;
  --accent: #3a6fd8;
  --accent2: #2d5ab8;
  --accent-glow: rgba(58, 111, 216, 0.15);
  --border: #d0cab8;
  --cell-bg: #fff;
  --cell-active: rgba(58, 111, 216, 0.12);
  --cell-highlight: rgba(58, 111, 216, 0.06);
  --overlay-bg: rgba(240, 236, 228, 0.92);
}

html {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  transition:
    background 0.3s,
    color 0.3s;
}

/* ── Theme ── */
#themeToggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#themeToggle:hover {
  background: var(--border);
}

/* ── Screens ── */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}
.screen.hidden {
  display: none;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ── Welcome Landing ── */
.welcome-landing {
  justify-content: flex-start;
  overflow-y: auto;
  gap: 0;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(91, 141, 239, 0.04) 0%, transparent 50%),
    var(--bg);
}
html.light .welcome-landing {
  background:
    linear-gradient(135deg, rgba(58, 111, 216, 0.05) 0%, transparent 50%),
    var(--bg);
}

/* Hero */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 24px 60px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.hero-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.hero-label span {
  display: block;
  width: 36px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 24px;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
html.light .hero-title {
  color: var(--text);
}
.hero-tagline {
  color: var(--text2);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 40px;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── PRIMARY HERO BUTTON ── */
.btn-hero {
  max-width: none;
  width: auto;
  padding: 16px 32px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}
.btn-hero:hover {
  background: var(--accent2);
  transform: translateY(-1px);
}

/* ── OUTLINE HERO BUTTON — FIXED ── */
/* Was using background: var(--surface) which looks like a blank white box
   in light mode. Now uses transparent so only the border is visible. */
.btn-hero-outline {
  max-width: none;
  width: auto;
  padding: 16px 32px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.15s;
}
.btn-hero-outline:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Light mode: stronger border so it's clearly visible as a button */
html.light .btn-hero-outline {
  background: transparent;
  border-color: #a09888;
  color: var(--text);
}
html.light .btn-hero-outline:hover {
  background: rgba(58, 111, 216, 0.06);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-icon {
  font-size: 1.05rem;
}

/* Steps */
.steps-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 32px 60px;
}
.step {
  padding: 0 8px;
}
.step-num {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  line-height: 1.3;
}
.step-num span {
  color: var(--text);
}
.step p {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.6;
}

/* Image */
.image-section {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 32px 60px;
}
.image-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}
html.light .image-card {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}
.image-card img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.image-quote {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 28px 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
}

/* ── Nav ── */
.cw-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  position: relative;
  z-index: 2;
}
.cw-nav-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent);
}
.cw-nav-links {
  display: flex;
  gap: 28px;
}
.cw-nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.cw-nav-links a:hover {
  color: var(--text);
}

/* ── Nav theme toggle (inside welcome nav) ── */
.nav-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.nav-theme-toggle:hover {
  border-color: var(--text2);
  color: var(--text);
}

/* Hide fixed toggle on welcome, show nav toggle instead */
body:has(#welcomeScreen:not(.hidden)) #themeToggle {
  display: none;
}

/* ── Footer ── */
.cw-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 40px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
}
.cw-footer-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 4px;
}
.cw-footer-copy {
  font-size: 0.7rem;
  color: var(--text2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cw-footer-right {
  display: flex;
  gap: 24px;
}
.cw-footer-right a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.cw-footer-right a:hover {
  color: var(--text);
}

/* ── Buttons ── */
.btn {
  display: block;
  width: 100%;
  max-width: 340px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s,
    opacity 0.2s;
  text-align: center;
}
.btn:hover {
  background: var(--accent2);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--surface);
}
.btn-back {
  background: transparent;
  color: var(--text2);
  font-size: 0.9rem;
  margin-top: 4px;
}
.btn-back:hover {
  color: var(--text);
  background: transparent;
}
.btn-add {
  background: var(--surface);
  border: 2px dashed var(--border);
  color: var(--accent);
  font-weight: 500;
}
.btn-add:hover {
  border-color: var(--accent);
}
.btn-copy {
  width: auto;
  padding: 10px 20px;
  flex-shrink: 0;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  max-width: none;
  width: auto;
}

/* ── Back to Games ── */
.back-to-games {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text2);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  align-self: flex-start;
}
.back-to-games:hover {
  color: var(--text);
}

/* ── Forms ── */
.form-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.form-container .input-group,
.form-container .words-list,
.form-container .edit-buttons,
.form-container .code-display,
.form-container .code-box,
.form-container .share-actions {
  width: 100%;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text2);
  text-align: center;
}
.input-group input,
.input-group textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--accent);
}
.input-group textarea {
  min-height: 80px;
  resize: vertical;
}
.helper {
  font-size: 0.75rem;
  color: var(--text2);
}
.hint {
  color: var(--text2);
  font-size: 0.9rem;
  text-align: center;
}
h2 {
  text-align: center;
  font-size: 1.5rem;
  color: var(--accent);
}
h3 {
  font-size: 1.2rem;
  color: var(--accent);
}
h4 {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Words list ── */
.words-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.word-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.word-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.word-info {
  flex: 1;
  overflow: hidden;
}
.word-answer {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.word-clue {
  font-size: 0.75rem;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.word-actions {
  display: flex;
  gap: 6px;
}
.word-action-btn {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: color 0.15s;
}
.word-action-btn:hover {
  color: var(--text);
}
.word-action-btn.delete:hover {
  color: var(--wrong);
}

.edit-buttons {
  display: flex;
  gap: 12px;
}
.edit-buttons .btn {
  flex: 1;
}

/* ── Share ── */
.share-container {
  align-items: center;
}
.preview-grid-wrap {
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
}
.preview-grid-wrap .cw-grid {
  transform-origin: top center;
}
.code-display {
  display: flex;
  gap: 8px;
  width: 100%;
}
.code-display input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: monospace;
  font-size: 0.75rem;
  outline: none;
}
.code-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.code-box textarea {
  width: 100%;
  height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: monospace;
  font-size: 0.6rem;
  resize: none;
  outline: none;
}
.copy-feedback {
  color: var(--correct);
  font-size: 0.85rem;
  text-align: center;
}
.share-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}
.share-actions .btn {
  flex: 1;
}

/* ── Play layout ── */
#playScreen {
  justify-content: flex-start;
  padding: 10px 16px;
}
.play-header {
  text-align: center;
  flex-shrink: 0;
  width: 100%;
}
.play-title {
  font-size: 1.15rem;
  margin-bottom: 2px;
}
.play-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 6px;
}
.play-progress {
  font-size: 0.8rem;
  color: var(--text2);
}
.play-timer {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.play-errors {
  font-size: 0.8rem;
  color: var(--wrong);
  font-weight: 500;
}

.play-body {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  overflow: hidden;
  min-height: 0;
}

.grid-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  min-height: 0;
}

.grid-container {
  flex-shrink: 0;
  display: inline-block;
}

.clues-panel {
  width: 240px;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}
.clues-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.clues-section li {
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.clues-section li:hover {
  background: var(--surface);
}
.clues-section li.active {
  background: var(--accent);
  color: #fff;
}
.clues-section li.active .clue-num {
  color: #fff;
}
.clues-section li.solved {
  color: var(--correct);
  opacity: 0.7;
}
.clues-section li.solved .clue-text {
  text-decoration: line-through;
}
.clue-num {
  font-weight: 700;
  color: var(--accent);
  margin-right: 6px;
  min-width: 22px;
  flex-shrink: 0;
}
.clue-text {
  flex: 1;
}
.clue-len {
  color: var(--text2);
  font-size: 0.75rem;
  margin-left: 4px;
  opacity: 0.7;
}

.play-actions {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 8px 0;
}

/* ── Crossword Grid ── */
.cw-grid {
  display: inline-grid;
  gap: 0;
  background: #000;
  border: 3px solid #000;
  border-radius: 2px;
  max-width: 100%;
}
.cw-cell {
  width: var(--cell-size, 38px);
  height: var(--cell-size, 38px);
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #333;
}
.cw-cell-black {
  background: #000;
  border-color: #000;
}
.cw-cell-white {
  background: var(--cell-bg);
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
html.light .cw-cell-white {
  background: #fff;
}
.cw-cell-white.highlight {
  background: var(--cell-highlight);
}
html.light .cw-cell-white.highlight {
  background: rgba(58, 111, 216, 0.12);
}
.cw-cell-white.active {
  background: var(--cell-active);
  box-shadow: inset 0 0 0 2px var(--accent);
}
html.light .cw-cell-white.active {
  background: rgba(58, 111, 216, 0.18);
}
.cw-cell-white.correct-cell {
  background: rgba(46, 204, 113, 0.18);
}
.cw-cell-white.wrong-cell {
  background: rgba(231, 76, 60, 0.22);
}
.cw-cell-white.wrong-cell input {
  color: var(--wrong);
}
.cw-cell-white.shake {
  animation: cellShake 0.4s ease;
}
@keyframes cellShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-3px);
  }
  40% {
    transform: translateX(3px);
  }
  60% {
    transform: translateX(-2px);
  }
  80% {
    transform: translateX(2px);
  }
}
.cw-cell-white.word-correct {
  animation: wordCorrectPop 0.4s ease;
}
@keyframes wordCorrectPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
    background: rgba(46, 204, 113, 0.25);
  }
  100% {
    transform: scale(1);
  }
}

.cw-cell-num {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: calc(var(--cell-size, 38px) * 0.26);
  font-weight: 700;
  color: var(--text2);
  pointer-events: none;
  line-height: 1;
}
.cw-cell input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: calc(var(--cell-size, 38px) * 0.42);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  caret-color: var(--accent);
  padding: 0;
}
.cw-cell input.revealed {
  color: var(--correct);
}

/* ── Complete ── */
#completeScreen {
  overflow-y: auto;
}
.complete-container {
  text-align: center;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
}
.complete-icon {
  font-size: 4rem;
  animation: celebrateBounce 0.6s ease;
}
@keyframes celebrateBounce {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.complete-title {
  color: var(--accent);
  font-size: 1.6rem;
  animation: fadeSlideUp 0.5s ease 0.2s both;
}
.complete-subtitle {
  color: var(--text);
  font-size: 1.05rem;
  animation: fadeSlideUp 0.5s ease 0.35s both;
}
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.complete-stats {
  font-size: 0.9rem;
  color: var(--text2);
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.5s ease 0.5s both;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.complete-message {
  color: var(--text);
  line-height: 1.8;
  font-size: 1.05rem;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  white-space: pre-wrap;
  width: 100%;
  animation: fadeSlideUp 0.5s ease 0.65s both;
  position: relative;
}
.complete-message::before {
  content: "\201C";
  position: absolute;
  top: 6px;
  left: 12px;
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}
.final-from {
  color: var(--text2);
  font-size: 0.95rem;
  font-style: italic;
}
.final-actions {
  display: flex;
  gap: 12px;
}

/* ── Keepsake CTA ── */
.pdf-cta {
  margin-top: 20px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  width: 100%;
}
.pdf-cta-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}
.pdf-cta-sub {
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 14px;
  line-height: 1.5;
}
.pdf-cta-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-family: var(--font);
  transition: background 0.2s;
}
.pdf-cta-btn:hover {
  background: var(--accent2);
}

/* ── Confetti ── */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero-section {
    padding: 60px 20px 40px;
  }
  .hero-title {
    font-size: 3rem;
  }
  .hero-tagline {
    font-size: 0.95rem;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    gap: 12px;
  }
  .btn-hero,
  .btn-hero-outline {
    width: 100%;
    justify-content: center;
    padding: 15px 24px;
  }
  .steps-section {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 24px 40px;
    max-width: 400px;
  }
  .cw-nav {
    padding: 16px 20px;
  }
  .cw-nav-links {
    gap: 20px;
  }
  .cw-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 12px;
  }
  .cw-footer-right {
    flex-wrap: wrap;
    gap: 16px;
  }
  .image-section {
    padding: 0 20px 40px;
  }
  .image-quote {
    font-size: 1rem;
    padding: 30px 20px 18px;
  }

  .play-body {
    flex-direction: column;
    overflow-y: auto;
    max-width: 100%;
  }
  .grid-scroll {
    overflow: auto;
    max-height: none;
    flex: none;
    justify-content: flex-start;
  }
  .clues-panel {
    width: 100%;
    flex-direction: row;
    gap: 12px;
    overflow-y: visible;
    flex-shrink: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
  }
  .clues-section {
    flex: 1;
    min-width: 0;
  }
  .play-meta {
    gap: 10px;
    flex-wrap: wrap;
  }
}

@media (max-width: 380px) {
  .play-header {
    padding: 0 4px;
  }
}

/* Question bank pills */
.ok-pill {
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--muted, #888);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ok-pill.active {
  background: var(--accent, #fff);
  color: var(--bg, #0d0d1a);
  border-color: var(--accent, #fff);
}
.ok-pill:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text, #fff);
}

/* Question bank items */
.bank-q {
  padding: 10px 12px;
  font-size: 0.83rem;
  cursor: pointer;
  border-radius: 8px;
  color: var(--muted, #999);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.05));
  transition:
    background 0.12s,
    color 0.12s;
  line-height: 1.45;
}
.bank-q:last-child {
  border-bottom: none;
}
.bank-q:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #fff);
}

/* Scrollbar */
#bankQuestions::-webkit-scrollbar {
  width: 4px;
}
#bankQuestions::-webkit-scrollbar-track {
  background: transparent;
}
#bankQuestions::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}
