/* iPassGame.com - Editorial Warm Paper Word & Trivia Suite */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #18181b;
  --muted: #52525b;
  --border: #e4e4e7;
  --indigo: #4f46e5;
  --sage: #15803d;
  --amber: #d97706;
  --rose: #e11d48;
  --yellow-tier: #facc15;
  --green-tier: #86efac;
  --blue-tier: #93c5fd;
  --purple-tier: #d8b4fe;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Georgia, serif;
  line-height: 1.6;
  min-height: 100vh;
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 14px; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand-badge {
  background: var(--ink);
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.88rem;
}
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-link {
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-link:hover, .nav-link.active {
  background: #f4f4f5;
  color: var(--ink);
  text-decoration: none;
}
.nav-link.active {
  border: 1px solid var(--ink);
}

.ad-slot {
  margin: 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}
.ad-leaderboard { min-height: 90px; max-width: 970px; }
.ad-rectangle { min-height: 250px; max-width: 728px; }
.ad-placeholder {
  width: 100%;
  min-height: inherit;
  border: 1px dashed #d4d4d8;
  background: #f4f4f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 8px;
  box-shadow: 0 8px 24px rgba(24, 24, 27, 0.06);
}
.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.game-title-wrap h1 {
  margin: 0;
  font-size: 1.4rem;
  font-family: Georgia, "Times New Roman", serif;
}
.game-subtitle { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); }
.hud-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill {
  background: #f4f4f5;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.84rem;
  color: var(--muted);
}
.stat-pill strong { color: var(--ink); margin-left: 4px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.btn {
  appearance: none;
  border: 1px solid #d4d4d8;
  background: #fff;
  color: var(--ink);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover:not(:disabled) { background: #f4f4f5; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-primary:hover:not(:disabled) { background: #27272a; }
.select-ctrl {
  border: 1px solid #d4d4d8;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.86rem;
  font-weight: 600;
}

.toast {
  min-height: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--indigo);
  margin-bottom: 10px;
}

/* Word Search */
.ws-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 18px;
  align-items: start;
}
.ws-grid {
  display: grid;
  gap: 4px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  max-width: 520px;
  margin: 0 auto;
}
.ws-cell {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.1s ease, transform 0.08s ease;
}
.ws-cell.selecting {
  background: #fef08a;
  border-color: #ca8a04;
  transform: scale(1.04);
}
.ws-cell.hinted {
  outline: 3px solid var(--indigo);
  animation: pulse 0.9s infinite alternate;
}
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.08); } }

.ws-wordlist {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.ws-wordlist h3 { margin: 0 0 8px; font-size: 0.95rem; }
.ws-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ws-word-chip {
  padding: 4px 9px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 700;
}
.ws-word-chip.found {
  text-decoration: line-through;
  opacity: 0.55;
  background: #dcfce7;
  border-color: #86efac;
}

/* Connections */
.conn-solved { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.conn-banner {
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
  color: #18181b;
}
.conn-banner strong { display: block; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em; }
.conn-banner span { font-size: 0.88rem; font-weight: 600; }
.tier-0 { background: var(--yellow-tier); }
.tier-1 { background: var(--green-tier); }
.tier-2 { background: var(--blue-tier); }
.tier-3 { background: var(--purple-tier); }

.conn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 640px;
  margin: 0 auto 14px;
}
.conn-tile {
  min-height: 68px;
  border-radius: 10px;
  border: 1px solid #d4d4d8;
  background: #f4f4f5;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px;
  transition: background 0.1s ease, color 0.1s ease;
}
.conn-tile.selected {
  background: #3f3f46;
  color: #fff;
  border-color: #18181b;
}
.mistakes-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  font-weight: 600;
}
.mistake-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3f3f46;
  display: inline-block;
}
.mistake-dot.lost { background: #e4e4e7; }

/* Hangman */
.hm-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: center;
}
.hm-gallows {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  justify-content: center;
}
.hm-word-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 14px 0 18px;
}
.hm-slot {
  width: 34px;
  height: 44px;
  border-bottom: 3px solid var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.hm-slot.space { border-bottom-color: transparent; width: 16px; }
.qwerty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.qwerty-row { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.key-btn {
  min-width: 36px;
  height: 42px;
  border-radius: 7px;
  border: 1px solid #d4d4d8;
  background: #f4f4f5;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.key-btn.good { background: #22c55e; color: #fff; border-color: #16a34a; }
.key-btn.bad { background: #e4e4e7; color: #a1a1aa; }

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 18px 0;
}
.section-card h2 {
  margin-top: 0;
  font-size: 1.28rem;
  font-family: Georgia, "Times New Roman", serif;
}
.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.variant-card {
  display: block;
  background: #fafaf9;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  color: var(--ink);
}
.variant-card:hover { border-color: var(--ink); text-decoration: none; }
.variant-card p { margin: 6px 0 0; font-size: 0.86rem; color: var(--muted); }

.faq-item { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq-item:last-child { border-bottom: none; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 14px 36px;
  margin-top: 24px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

@media (max-width: 780px) {
  .ws-layout, .hm-wrap { grid-template-columns: 1fr; }
  .ws-cell { font-size: 0.84rem; }
  .conn-tile { min-height: 56px; font-size: 0.76rem; }
  .key-btn { min-width: 28px; height: 38px; font-size: 0.8rem; }
}

/* Quick-Start Bar, Tutorial Modal, Catalog Grid & New Word Games */
.quickstart-bar {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin-bottom: 12px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
}
.qs-item { font-size: 0.8rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.qs-num {
  background: var(--ink); color: #fff; font-weight: 800; border-radius: 50%;
  width: 18px; height: 18px; min-width: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; margin-top: 2px;
}
.qs-item strong { color: var(--ink); }

.tut-backdrop {
  position: fixed; inset: 0; background: rgba(24, 24, 27, 0.58); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 14px;
}
.tut-backdrop.open { display: flex; }
.tut-modal {
  background: #fff; color: var(--ink); border: 1px solid var(--border);
  border-radius: 16px; max-width: 560px; width: 100%; padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  max-height: 90vh; overflow-y: auto;
}
.tut-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.tut-head h2 { margin: 4px 0 2px; font-size: 1.3rem; font-family: Georgia, serif; }
.tut-sub { margin: 0; font-size: 0.84rem; color: var(--muted); }
.tut-badge { background: #eef2ff; color: var(--indigo); padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; }
.tut-close { background: transparent; border: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.tut-goal { background: #f8fafc; border-left: 3px solid var(--indigo); padding: 8px 12px; border-radius: 6px; font-size: 0.88rem; margin-bottom: 12px; }
.tut-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tut-step { display: flex; gap: 10px; align-items: flex-start; background: #fafaf9; border: 1px solid var(--border); padding: 9px 11px; border-radius: 9px; }
.tut-num { background: var(--ink); color: #fff; font-weight: 800; width: 22px; height: 22px; min-width: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.tut-step p { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }
.tut-box { font-size: 0.84rem; margin-bottom: 10px; }
.tut-box ul { margin: 4px 0 0 18px; padding: 0; color: var(--muted); }
.tut-tip { background: #fefce8; border: 1px solid #fde047; padding: 8px 11px; border-radius: 8px; font-size: 0.84rem; margin-bottom: 14px; }
.tut-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.tut-check { font-size: 0.82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; cursor: pointer; }
.tut-start { background: var(--ink); color: #fff; border: none; padding: 9px 18px; border-radius: 999px; font-weight: 700; cursor: pointer; font-size: 0.9rem; }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; }
.catalog-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  background: #fafaf9; border: 1px solid var(--border); border-radius: 10px; padding: 12px; color: var(--ink);
}
.catalog-card:hover { border-color: var(--ink); text-decoration: none; background: #f4f4f5; }
.catalog-card.current { border-color: var(--indigo); background: #eef2ff; }
.catalog-card p { margin: 0; font-size: 0.8rem; color: var(--muted); }
.badge-pill { display: inline-block; align-self: flex-start; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #e0e7ff; color: #3730a3; }

/* Wordle, Crossword, Word Wipe, Flags, Trivia, Scramble, Typing */
.wdl-board { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; max-width: 320px; margin: 0 auto 14px; }
.wdl-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wdl-tile {
  aspect-ratio: 1; border: 2px solid #d4d4d8; border-radius: 6px; font-size: 1.5rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase; background: #fff;
}
.wdl-tile.correct { background: #16a34a; border-color: #16a34a; color: #fff; }
.wdl-tile.present { background: #ca8a04; border-color: #ca8a04; color: #fff; }
.wdl-tile.absent { background: #71717a; border-color: #71717a; color: #fff; }
.key-btn.present { background: #ca8a04; color: #fff; border-color: #ca8a04; }
.key-btn.absent { background: #71717a; color: #fff; border-color: #71717a; }

.cw-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.cw-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; background: #18181b; padding: 4px; border-radius: 8px; }
.cw-cell { aspect-ratio: 1; background: #fff; position: relative; display: flex; align-items: center; justify-content: center; }
.cw-cell.black { background: #18181b; }
.cw-cell.active { background: #fef08a; }
.cw-cell.bad input { color: var(--rose); }
.cw-num { position: absolute; top: 2px; left: 3px; font-size: 0.62rem; font-weight: 700; color: var(--muted); pointer-events: none; }
.cw-input { width: 100%; height: 100%; border: none; background: transparent; text-align: center; font-size: 1.25rem; font-weight: 800; text-transform: uppercase; outline: none; color: var(--ink); }
.cw-clues { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 0.84rem; }
.cw-clue-item { padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.cw-clue-item.active { background: #fef08a; font-weight: 700; }

.ww-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; max-width: 420px; margin: 0 auto 12px; }
.ww-tile { aspect-ratio: 1; border-radius: 7px; border: 1px solid #d4d4d8; background: #fff; font-weight: 800; font-size: 1.05rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ww-tile.selected { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.ww-tile.empty { background: #f4f4f5; border-style: dashed; color: transparent; cursor: default; }

.quiz-card { max-width: 620px; margin: 0 auto; text-align: center; }
.flag-box { font-size: 5.5rem; line-height: 1.1; margin: 10px 0 14px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.choice-btn { padding: 12px; border-radius: 10px; border: 1px solid #d4d4d8; background: #fff; font-weight: 700; font-size: 0.94rem; cursor: pointer; color: var(--ink); }
.choice-btn:hover:not(:disabled) { background: #f4f4f5; border-color: var(--ink); }
.choice-btn.right { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.choice-btn.wrong { background: #ffe4e6; border-color: #e11d48; color: #881337; }

.typing-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; line-height: 1.8; margin-bottom: 12px; }
.typ-ok { color: #16a34a; }
.typ-err { color: #e11d48; background: #ffe4e6; }
.typ-cur { border-bottom: 2px solid var(--indigo); }
.typing-input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #d4d4d8; font-size: 1rem; }

@media (max-width: 780px) {
  .quickstart-bar, .cw-layout, .cw-clues, .choice-grid { grid-template-columns: 1fr; }
}


/* ===== Expansion Pack (+15 Word, Trivia & Brain Games) ===== */

/* 1. Honeycomb Spelling Bee */
.sb-layout { display: grid; grid-template-columns: 1fr 270px; gap: 18px; align-items: start; }
.sb-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sb-rank-wrap { width: 100%; max-width: 360px; }
.sb-rank-label { font-size: 0.84rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-align: center; }
.sb-rank-bar { width: 100%; height: 10px; background: #e4e4e7; border-radius: 999px; overflow: hidden; }
.sb-rank-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #f59e0b, #4f46e5); transition: width 0.25s ease; }
.sb-word-display {
  min-height: 44px; min-width: 240px; padding: 6px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: #fafaf9;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  font-size: 1.55rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.sb-ch-center { color: var(--amber); }
.sb-cursor { width: 2px; height: 24px; background: var(--indigo); display: inline-block; animation: pulse 0.7s infinite alternate; }
.sb-hive { position: relative; width: 250px; height: 250px; margin: 4px auto; }
.sb-hex {
  position: absolute; transform: translate(-50%, -50%);
  width: 72px; height: 64px; border: none; cursor: pointer;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  font-size: 1.35rem; font-weight: 800; transition: transform 0.1s ease, filter 0.1s ease;
  display: flex; align-items: center; justify-content: center;
}
.sb-hex:hover { filter: brightness(0.95); }
.sb-hex:active { transform: translate(-50%, -50%) scale(0.93); }
.sb-hex.sb-outer { background: #e4e4e7; color: var(--ink); }
.sb-hex.sb-center { background: #facc15; color: #18181b; }
.sb-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sb-found-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px; min-height: 220px; }
.sb-found-box h3 { margin: 0 0 8px; font-size: 0.94rem; }
.sb-found-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-word-chip { padding: 3px 9px; border-radius: 6px; background: #fff; border: 1px solid var(--border); font-size: 0.82rem; font-weight: 700; }
.sb-word-chip.pangram { background: #fef08a; border-color: #ca8a04; color: #713f12; }
.sb-empty { font-size: 0.84rem; color: var(--muted); }

/* 2. Cryptogram Quotes */
.cg-author { text-align: center; font-weight: 700; color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; }
.cg-board { display: flex; flex-wrap: wrap; gap: 14px 18px; justify-content: center; max-width: 780px; margin: 0 auto 16px; padding: 10px; }
.cg-word { display: flex; gap: 4px; flex-wrap: nowrap; }
.cg-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 34px; padding: 4px 2px; border-radius: 7px; border: 1px solid #d4d4d8;
  background: #fff; cursor: pointer; font-family: inherit;
}
.cg-tile.selected { border-color: var(--indigo); background: #eef2ff; box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2); }
.cg-tile.conflict { border-color: var(--rose); background: #ffe4e6; }
.cg-tile.solved { border-color: #16a34a; background: #dcfce7; }
.cg-guess { font-size: 1.1rem; font-weight: 800; color: var(--ink); line-height: 1.2; border-bottom: 2px solid #a1a1aa; width: 22px; text-align: center; }
.cg-cipher { font-size: 0.72rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.key-btn.cg-used { background: #e0e7ff; border-color: #818cf8; }
.key-btn.cg-conflict { background: #ffe4e6; border-color: var(--rose); color: var(--rose); }

/* 3. Search Feud Autocomplete */
.feud-wrap { max-width: 660px; margin: 0 auto; }
.feud-prompt-box {
  background: #f8fafc; border: 2px solid var(--ink); border-radius: 12px;
  padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.feud-prompt-text { font-size: 1.25rem; font-weight: 800; font-family: Georgia, serif; }
.feud-strike-box { display: flex; gap: 6px; }
.feud-x {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid #d4d4d8; background: #fff;
  color: #d4d4d8; font-weight: 900; display: inline-flex; align-items: center; justify-content: center;
}
.feud-x.hit { background: var(--rose); border-color: var(--rose); color: #fff; }
.feud-form { display: flex; gap: 8px; margin-bottom: 12px; }
.feud-input { flex: 1; padding: 9px 12px; border-radius: 999px; border: 1px solid #d4d4d8; font-size: 0.96rem; }
.feud-board { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feud-slot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid #d4d4d8; background: #f4f4f5;
  font-weight: 700; min-height: 46px;
}
.feud-slot.revealed { background: #eef2ff; border-color: var(--indigo); }
.feud-rank { font-size: 0.78rem; color: var(--muted); min-width: 24px; }
.feud-ans { flex: 1; font-size: 0.92rem; text-transform: capitalize; }
.feud-hidden { color: #a1a1aa; letter-spacing: 0.08em; }
.feud-pts { background: var(--ink); color: #fff; border-radius: 6px; padding: 2px 7px; font-size: 0.78rem; }

/* 4, 5, 10, 13. Quiz / Badges */
.cap-badge, .syn-type-badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 800;
  background: #e0e7ff; color: #3730a3; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.syn-type-badge.syn { background: #dcfce7; color: #166534; }
.syn-type-badge.ant { background: #ffe4e6; color: #9f1239; }
.syn-word { font-size: 2rem; font-weight: 800; font-family: Georgia, serif; margin: 8px 0 12px; letter-spacing: 0.04em; }
.tq-question { font-size: 1.15rem; font-weight: 700; margin: 10px 0 14px; }
.eq-emojis { font-size: 3.3rem; line-height: 1.25; margin: 12px 0; letter-spacing: 0.08em; }

/* 6. Word Ladder */
.wl-wrap { max-width: 440px; margin: 0 auto; text-align: center; }
.wl-form { display: flex; gap: 8px; margin-bottom: 14px; }
.wl-input {
  flex: 1; padding: 9px 12px; border-radius: 999px; border: 1px solid #d4d4d8;
  font-size: 1.05rem; font-weight: 800; text-transform: uppercase; text-align: center; letter-spacing: 0.16em;
}
.wl-ladder { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.wl-rung { display: flex; gap: 6px; align-items: center; }
.wl-tile {
  width: 44px; height: 44px; border-radius: 8px; border: 2px solid #d4d4d8; background: #fff;
  font-size: 1.25rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.wl-tile.changed { background: #fef08a; border-color: #ca8a04; }
.wl-tile.match-goal { border-color: #16a34a; }
.wl-rung.start .wl-tile { background: #f4f4f5; }
.wl-rung.target .wl-tile { background: #16a34a; border-color: #16a34a; color: #fff; }
.wl-rung.goal-preview { margin-top: 6px; opacity: 0.85; }
.wl-tile.goal { background: #eef2ff; border-color: var(--indigo); border-style: dashed; color: var(--indigo); }
.wl-goal-tag { font-size: 0.72rem; font-weight: 800; color: var(--indigo); margin-left: 4px; }

/* 7. Waffle 5x5 */
.wf-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 340px; margin: 0 auto 12px; }
.wf-tile {
  aspect-ratio: 1; border-radius: 10px; border: 2px solid #d4d4d8; font-size: 1.45rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; cursor: pointer; background: #f4f4f5; color: var(--ink);
  transition: transform 0.08s ease;
}
.wf-tile.hole { background: transparent; border-color: transparent; cursor: default; }
.wf-tile.green { background: #16a34a; border-color: #16a34a; color: #fff; cursor: default; }
.wf-tile.yellow { background: #eab308; border-color: #ca8a04; color: #fff; }
.wf-tile.gray { background: #e4e4e7; border-color: #d4d4d8; color: #3f3f46; }
.wf-tile.selected { outline: 3px solid var(--indigo); transform: scale(1.06); }

/* 8. Wordle 6 */
.wdl6-board { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; max-width: 360px; margin: 0 auto 14px; }
.wdl6-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.wdl6-tile { font-size: 1.35rem; }

/* 9. Boggle 4x4 */
.bg-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.bg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; user-select: none; touch-action: none; }
.bg-cell {
  aspect-ratio: 1; border-radius: 12px; border: 2px solid #d4d4d8; background: #fff;
  font-size: 1.45rem; font-weight: 800; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 #d4d4d8;
}
.bg-cell.selected { background: #eef2ff; border-color: var(--indigo); color: var(--indigo); transform: translateY(1px); }
.bg-cell.selected.head { background: var(--indigo); color: #fff; }
.bg-current {
  text-align: center; font-size: 1.15rem; font-weight: 800; letter-spacing: 0.1em;
  padding: 6px 10px; margin-bottom: 8px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--border);
}
.bg-form { display: flex; gap: 6px; margin-top: 10px; }
.bg-input { flex: 1; padding: 7px 10px; border-radius: 999px; border: 1px solid #d4d4d8; font-weight: 700; text-transform: uppercase; }
.bg-found-panel { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px; min-height: 260px; }
.bg-found-panel h3 { margin: 0 0 8px; font-size: 0.94rem; }

/* 11. Anagram Sub-Word Builder */
.ana-wrap { max-width: 680px; margin: 0 auto; text-align: center; }
.ana-current {
  min-height: 44px; font-size: 1.45rem; font-weight: 800; letter-spacing: 0.14em;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px; padding: 6px 12px;
}
.ana-rack { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.ana-tile {
  width: 48px; height: 52px; border-radius: 10px; border: 2px solid #d4d4d8; background: #fefce8;
  font-size: 1.35rem; font-weight: 800; color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 #d4d4d8;
}
.ana-tile.used { opacity: 0.3; cursor: default; transform: translateY(2px); box-shadow: none; }
.ana-slots { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 14px; }
.ana-slot-word {
  padding: 5px 10px; border-radius: 7px; border: 1px solid var(--border); background: #f4f4f5;
  font-size: 0.82rem; font-weight: 700; color: var(--muted); min-width: 72px;
}
.ana-slot-word.solved { background: #dcfce7; border-color: #16a34a; color: #14532d; }

/* 12. Missing Vowels */
.mv-wrap { max-width: 580px; margin: 0 auto; text-align: center; }
.mv-puzzle {
  font-size: 1.85rem; font-weight: 900; letter-spacing: 0.14em; padding: 14px;
  background: #18181b; color: #facc15; border-radius: 12px; margin: 10px 0 8px; word-break: break-word;
}
.mv-hint-preview { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; font-weight: 700; color: var(--muted); margin-bottom: 12px; letter-spacing: 0.1em; }
.mv-form { display: flex; gap: 8px; }
.mv-input { flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid #d4d4d8; font-size: 1rem; font-weight: 700; }

/* 14. Mental Math */
.mm-card { max-width: 380px; margin: 0 auto; text-align: center; }
.mm-eq { font-size: 2rem; font-weight: 800; font-family: Georgia, serif; margin: 8px 0; }
.mm-typed {
  font-size: 1.65rem; font-weight: 800; padding: 8px 14px; border-radius: 10px;
  background: #f8fafc; border: 2px solid var(--indigo); margin-bottom: 12px; min-height: 48px;
}
.mm-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mm-key {
  padding: 12px; border-radius: 10px; border: 1px solid #d4d4d8; background: #fff;
  font-size: 1.2rem; font-weight: 800; cursor: pointer; color: var(--ink);
}
.mm-key:hover { background: #f4f4f5; }
.mm-enter { grid-column: span 3; background: var(--ink); color: #fff; border-color: var(--ink); }
.mm-enter:hover { background: #27272a; }

/* 15. True or False */
.tf-fact {
  font-size: 1.2rem; font-weight: 700; line-height: 1.5; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin: 10px 0 14px;
}
.tf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf-btn {
  padding: 16px; border-radius: 12px; border: 2px solid #d4d4d8; background: #fff;
  font-size: 1.15rem; font-weight: 800; cursor: pointer; color: var(--ink);
}
.tf-btn.tf-true:hover { border-color: #16a34a; background: #f0fdf4; }
.tf-btn.tf-false:hover { border-color: #e11d48; background: #fff1f2; }
.tf-btn.right { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.tf-btn.wrong { background: #ffe4e6; border-color: #e11d48; color: #881337; }

@media (max-width: 780px) {
  .sb-layout, .bg-layout, .feud-board, .tf-grid { grid-template-columns: 1fr; }
}


/* ===== Expansion Pack 2 (+10 Word, Quiz & Brain Games) ===== */

/* 16. Double Wordle Duet */
.qd-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 680px; margin: 0 auto 14px; }
.qd-board-card { background: #fafaf9; border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.qd-board-card.solved { border-color: #16a34a; background: #f0fdf4; }
.qd-board-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 800; margin-bottom: 8px; }
.qd-badge { padding: 2px 8px; border-radius: 999px; background: #e4e4e7; color: var(--ink); font-size: 0.72rem; }
.qd-board-card.solved .qd-badge { background: #16a34a; color: #fff; }
.qd-grid { display: grid; grid-template-rows: repeat(7, 1fr); gap: 5px; }
.qd-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.qd-tile { font-size: 1.15rem; border-radius: 6px; }
.qd-tile.typed { border-color: var(--ink); }
.qd-tile.locked { background: #e4e4e7; border-color: #e4e4e7; opacity: 0.4; }
.qd-key { position: relative; overflow: hidden; padding: 0; min-width: 34px; }
.qd-key-wide { min-width: 54px; padding: 0 8px; }
.qd-k-l, .qd-k-r { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 0; }
.qd-k-l { left: 0; }
.qd-k-r { right: 0; }
.qd-k-ch { position: relative; z-index: 1; }
.qd-st-correct { background: #16a34a; }
.qd-st-present { background: #ca8a04; }
.qd-st-absent { background: #71717a; }
.qd-st-none { background: transparent; }
.qd-key[data-s0="correct"] .qd-k-ch, .qd-key[data-s1="correct"] .qd-k-ch,
.qd-key[data-s0="present"] .qd-k-ch, .qd-key[data-s1="present"] .qd-k-ch,
.qd-key[data-s0="absent"][data-s1="absent"] .qd-k-ch { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }

/* 17. Word Chain Shiritori AI */
.wc-wrap { max-width: 640px; margin: 0 auto; }
.wc-stage {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px;
}
.wc-ai-box { display: flex; flex-direction: column; gap: 2px; }
.wc-ai-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.wc-ai-word { font-size: 1.75rem; font-weight: 900; letter-spacing: 0.08em; font-family: Georgia, serif; }
.wc-target-pill {
  background: var(--indigo); color: #fff; border-radius: 12px; padding: 8px 16px; text-align: center;
  font-size: 0.85rem; font-weight: 700;
}
.wc-target-pill strong { display: block; font-size: 1.8rem; line-height: 1.1; }
.wc-timer-track { width: 100%; height: 8px; background: #e4e4e7; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.wc-timer-fill { height: 100%; width: 100%; background: #16a34a; transition: width 0.35s linear, background 0.2s ease; }
.wc-timer-fill.warn { background: #eab308; }
.wc-timer-fill.danger { background: var(--rose); }
.wc-form { display: flex; gap: 8px; margin-bottom: 14px; }
.wc-input { flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid #d4d4d8; font-size: 1rem; font-weight: 700; text-transform: uppercase; }
.wc-history { display: flex; flex-wrap: wrap; gap: 7px; max-height: 180px; overflow-y: auto; padding: 10px; background: #fafaf9; border: 1px solid var(--border); border-radius: 10px; }
.wc-chip { padding: 4px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.wc-chip.you { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.wc-chip.ai { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* 18. English Idioms & Proverbs */
.idq-prompt { font-size: 1.45rem; font-weight: 800; font-family: Georgia, serif; margin: 10px 0 6px; line-height: 1.4; }
.idq-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.idq-choice { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.idq-num { color: var(--indigo); font-weight: 800; margin-right: 4px; }
.idq-en-sub { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.idq-example {
  margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: #fefce8;
  border: 1px solid #fde047; font-size: 0.88rem; color: var(--ink); display: none;
}
.idq-example.visible { display: block; }

/* 19. Periodic Table Elements */
.ptq-tile {
  max-width: 240px; margin: 10px auto 16px; padding: 16px; border-radius: 14px;
  border: 2px solid var(--ink); background: #f8fafc; text-align: center;
}
.ptq-tile.grp-nonmetal { background: #f0fdf4; border-color: #16a34a; }
.ptq-tile.grp-noble { background: #eef2ff; border-color: var(--indigo); }
.ptq-tile.grp-metal { background: #fffbeb; border-color: #d97706; }
.ptq-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 800; }
.ptq-num { font-size: 1.15rem; }
.ptq-tag { font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,0.8); border: 1px solid rgba(0,0,0,0.1); }
.ptq-sym { font-size: 3.1rem; font-weight: 900; font-family: Georgia, serif; line-height: 1.15; margin: 8px 0 4px; }
.ptq-name { font-size: 1.05rem; font-weight: 700; color: var(--muted); }

/* 20. Roman Numerals Speed Quiz */
.rmn-ref-bar {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin-bottom: 12px;
}
.rmn-ref-chip { padding: 3px 9px; border-radius: 6px; background: #fff; border: 1px solid var(--border); font-size: 0.82rem; font-weight: 800; }
.rmn-prompt { font-size: 2.6rem; font-weight: 900; font-family: Georgia, serif; letter-spacing: 0.08em; margin: 8px 0 14px; }
.rmn-choice { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.04em; }

/* 21. US 50 States & Capitals */
.uss-abbr {
  display: inline-flex; align-items: center; justify-content: center;
  width: 78px; height: 78px; border-radius: 16px; background: #eef2ff; border: 2px solid var(--indigo);
  font-size: 2rem; font-weight: 900; color: var(--indigo); margin: 8px auto 10px;
}

/* 22. Palindrome & Word Play */
.pal-prompt { font-size: 1.55rem; font-weight: 900; letter-spacing: 0.14em; margin: 8px 0 6px; font-family: Georgia, serif; }
.pal-slots { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.pal-slot {
  width: 42px; height: 46px; border-radius: 9px; border: 2px dashed #a1a1aa;
  background: #fafaf9; font-size: 1.35rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.pal-slot.filled { border-style: solid; border-color: var(--indigo); background: #eef2ff; color: var(--indigo); }
.pal-mini-ctrl { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.pal-riddle-parts { display: flex; flex-direction: column; gap: 6px; margin: 10px auto 14px; max-width: 460px; text-align: left; }
.pal-riddle-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; font-weight: 600; }

/* 23. Tricky Spelling Bee Pro */
.psp-phonetic { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.1rem; font-weight: 700; color: var(--indigo); margin-bottom: 6px; }
.psp-def { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; }
.psp-word-btn { font-size: 1.05rem; letter-spacing: 0.06em; }
.psp-type-form { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
.psp-input { flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid #d4d4d8; font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.psp-tip { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: #fefce8; border: 1px solid #fde047; font-size: 0.88rem; display: none; }
.psp-tip.visible { display: block; }

/* 24. Morse Code Decoder Lab */
.mrs-wrap { max-width: 660px; margin: 0 auto; text-align: center; }
.mrs-ref-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin-bottom: 12px; }
.mrs-ref-chip {
  padding: 5px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.mrs-ref-chip:hover { background: #eef2ff; border-color: var(--indigo); }
.mrs-ref-chip strong { font-size: 0.88rem; }
.mrs-ref-chip span { font-size: 0.72rem; color: var(--muted); font-family: ui-monospace, monospace; }
.mrs-target-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.mrs-target-word { font-size: 1.9rem; font-weight: 900; letter-spacing: 0.14em; font-family: Georgia, serif; }
.mrs-target-code { font-family: ui-monospace, monospace; font-size: 1rem; color: var(--indigo); font-weight: 700; margin-top: 4px; }
.mrs-screen { background: #18181b; color: #f8fafc; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.mrs-buffer { font-family: ui-monospace, monospace; font-size: 1.25rem; color: #facc15; min-height: 28px; }
.mrs-decoded { font-size: 1.7rem; font-weight: 900; letter-spacing: 0.15em; margin-top: 4px; }
.mrs-key-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.mrs-key-btn {
  min-width: 110px; padding: 14px 18px; border-radius: 12px; border: 2px solid var(--ink);
  background: #fff; color: var(--ink); font-size: 1.05rem; font-weight: 800; cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}
.mrs-key-btn:active { transform: translateY(2px); box-shadow: none; }
.mrs-dit { background: #fefce8; }
.mrs-dah { background: #eef2ff; }
.mrs-tx-wrap { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 8px; }
.mrs-tx-row { display: flex; gap: 8px; margin-bottom: 8px; }
.mrs-tx-out { font-family: ui-monospace, monospace; font-size: 1rem; font-weight: 700; color: var(--indigo); word-break: break-word; }

/* 25. Speed Reading & Recall */
.spd-wrap { max-width: 640px; margin: 0 auto; text-align: center; }
.spd-rsvp-box { background: #18181b; color: #f8fafc; border-radius: 14px; padding: 28px 16px; margin-bottom: 12px; }
.spd-word-stage { font-size: 2.35rem; font-weight: 800; letter-spacing: 0.03em; min-height: 54px; display: flex; align-items: center; justify-content: center; }
.spd-w-orp { color: #f87171; }
.spd-progress-track { width: 100%; height: 6px; background: #3f3f46; border-radius: 999px; overflow: hidden; margin: 18px 0 8px; }
.spd-progress-fill { height: 100%; width: 0%; background: #4f46e5; transition: width 0.08s linear; }
.spd-meta { font-size: 0.82rem; color: #a1a1aa; }
.spd-quiz-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.spd-q-num { font-size: 0.78rem; font-weight: 800; color: var(--indigo); text-transform: uppercase; margin-bottom: 4px; }
.spd-q-text { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.spd-result { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: left; }
.spd-result h3 { margin: 0 0 8px; }
.spd-full-text { font-size: 0.9rem; line-height: 1.65; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }

@media (max-width: 780px) {
  .qd-boards { grid-template-columns: 1fr; }
  .qd-key { min-width: 26px; }
  .qd-key-wide { min-width: 44px; font-size: 0.75rem; }
  .spd-word-stage { font-size: 1.85rem; }
}


/* ===== Expansion Pack 3 (+10 Bilingual Word, Grammar & Knowledge Games) ===== */

/* 26. Word Pyramid Builder */
.wp-wrap { max-width: 560px; margin: 0 auto; text-align: center; }
.wp-rows { display: flex; flex-direction: column; gap: 7px; align-items: center; margin: 8px 0 12px; }
.wp-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-radius: 10px; border: 1px solid var(--border); background: #fafaf9;
}
.wp-row.active { border-color: var(--indigo); background: #eef2ff; }
.wp-row.solved { border-color: #86efac; background: #f0fdf4; }
.wp-row.locked { opacity: 0.55; }
.wp-add-badge {
  min-width: 34px; padding: 3px 6px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 0.74rem; font-weight: 800;
}
.wp-row.solved .wp-add-badge { background: #16a34a; }
.wp-row.active .wp-add-badge { background: var(--indigo); }
.wp-row-tiles { display: flex; gap: 5px; }
.wp-tile {
  width: 34px; height: 38px; border-radius: 7px; border: 2px solid #d4d4d8;
  background: #fff; font-size: 1.15rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.wp-tile.filled { border-color: var(--indigo); color: var(--indigo); }
.wp-tile.done { border-color: #16a34a; background: #16a34a; color: #fff; }
.wp-clue {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; font-size: 0.9rem; font-weight: 700; margin-bottom: 10px;
}
.wp-typed {
  font-size: 1.15rem; font-weight: 800; letter-spacing: 0.14em; color: var(--indigo);
  min-height: 28px; margin-bottom: 8px;
}
.wp-pool { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.wp-pool-btn {
  width: 44px; height: 46px; border-radius: 10px; border: 2px solid var(--ink);
  background: #fff; color: var(--ink); font-size: 1.2rem; font-weight: 900;
  cursor: pointer; box-shadow: 0 2px 0 var(--ink);
}
.wp-pool-btn:hover:not(:disabled) { background: #eef2ff; }
.wp-pool-btn.used { opacity: 0.35; box-shadow: none; cursor: default; }
.wp-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* 27. Word Association Match */
.wa-wrap { max-width: 660px; margin: 0 auto; }
.wa-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.wa-col { display: flex; flex-direction: column; gap: 7px; }
.wa-col-head { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; color: var(--muted); text-align: center; }
.wa-card {
  padding: 11px 12px; border-radius: 10px; border: 2px solid #d4d4d8; background: #fff;
  color: var(--ink); font-size: 0.96rem; font-weight: 800; letter-spacing: 0.04em;
  cursor: pointer; text-align: center; transition: transform 0.08s ease, background 0.12s ease;
}
.wa-card:hover:not(:disabled) { border-color: var(--indigo); background: #f8fafc; }
.wa-card.selected { border-color: var(--indigo); background: #eef2ff; color: var(--indigo); transform: scale(1.02); }
.wa-card.matched { border-color: #86efac; background: #dcfce7; color: #166534; opacity: 0.55; cursor: default; }
.wa-card.wrong { border-color: #e11d48; background: #ffe4e6; color: #881337; }
.wa-card.hinted { border-color: #eab308; background: #fef9c3; }
.wa-matched-box { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.wa-pair-pill {
  padding: 4px 10px; border-radius: 999px; background: #dcfce7; border: 1px solid #86efac;
  color: #166534; font-size: 0.8rem; font-weight: 700;
}

/* 28. Spot The Grammar Bug */
.gf-sentence {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin: 10px 0 14px; line-height: 2.1; font-size: 1.08rem;
}
.gf-seg-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; margin: 2px;
  border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: var(--ink);
  font-size: 1rem; font-weight: 700; cursor: pointer;
}
.gf-seg-btn:hover { border-color: var(--indigo); background: #eef2ff; }
.gf-seg-btn.right { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.gf-seg-btn.wrong { background: #ffe4e6; border-color: #e11d48; color: #881337; }
.gf-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--indigo); color: #fff;
  font-size: 0.7rem; font-weight: 800;
}

/* 29-35. Quote Fill, Acronyms, Roots, Landmarks, Rhyme, Odd One Out, Syllables */
.pf-quote {
  font-size: 1.35rem; font-weight: 800; font-family: Georgia, serif;
  line-height: 1.5; margin: 12px 0 16px; padding: 14px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 12px;
}
.acq-term {
  font-size: 2.6rem; font-weight: 900; letter-spacing: 0.1em; color: var(--indigo);
  font-family: Georgia, serif; margin: 10px 0 14px;
}
.rw-root {
  font-size: 2.2rem; font-weight: 900; letter-spacing: 0.08em; color: var(--indigo);
  font-family: Georgia, serif; margin: 10px 0 4px;
}
.rw-examples { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.wlq-icon { font-size: 3.4rem; line-height: 1.1; margin: 6px 0 6px; }
.wlq-name { margin: 0 0 4px; font-size: 1.4rem; font-weight: 900; font-family: Georgia, serif; }
.wlq-clue { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.rhy-prompt {
  font-size: 2.25rem; font-weight: 900; letter-spacing: 0.08em;
  font-family: Georgia, serif; color: var(--ink); margin: 8px 0 4px;
}
.ooo-word-btn { font-size: 1.1rem; padding: 15px 12px; }
.syl-word {
  font-size: 2.2rem; font-weight: 900; letter-spacing: 0.08em;
  font-family: Georgia, serif; color: var(--indigo); margin: 10px 0 4px;
}
.syl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.syl-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; }
.syl-num { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.syl-lbl { font-size: 0.78rem; color: var(--muted); font-weight: 700; }

@media (max-width: 600px) {
  .wp-tile { width: 29px; height: 34px; font-size: 1rem; }
  .wp-pool-btn { width: 38px; height: 42px; font-size: 1.05rem; }
  .syl-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ===== Expansion Pack 4 (+10 Bilingual Word, Trivia & Brain Games) ===== */

/* 36. Quad Wordle (4 simultaneous boards, 9 guesses) */
.qw-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 700px; margin: 0 auto 14px; }
.qw-board-card { background: #fafaf9; border: 1px solid var(--border); border-radius: 12px; padding: 9px; }
.qw-board-card.solved { border-color: #16a34a; background: #f0fdf4; }
.qw-board-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; font-weight: 800; margin-bottom: 6px; }
.qw-badge { padding: 2px 7px; border-radius: 999px; background: #e4e4e7; color: var(--ink); font-size: 0.7rem; }
.qw-board-card.solved .qw-badge { background: #16a34a; color: #fff; }
.qw-grid { display: grid; grid-template-rows: repeat(9, 1fr); gap: 4px; }
.qw-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.qw-tile {
  aspect-ratio: 1; border: 2px solid #d4d4d8; border-radius: 5px; font-size: 0.95rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase; background: #fff;
}
.qw-tile.correct { background: #16a34a; border-color: #16a34a; color: #fff; }
.qw-tile.present { background: #ca8a04; border-color: #ca8a04; color: #fff; }
.qw-tile.absent { background: #71717a; border-color: #71717a; color: #fff; }
.qw-tile.typed { border-color: var(--ink); }
.qw-tile.locked { background: #e4e4e7; border-color: #e4e4e7; opacity: 0.4; }
.qw-key { position: relative; overflow: hidden; padding: 0; min-width: 34px; }
.qw-key-wide { min-width: 54px; padding: 0 8px; }
.qw-q { position: absolute; width: 50%; height: 50%; z-index: 0; }
.qw-q0 { top: 0; left: 0; }
.qw-q1 { top: 0; right: 0; }
.qw-q2 { bottom: 0; left: 0; }
.qw-q3 { bottom: 0; right: 0; }
.qw-k-ch { position: relative; z-index: 1; font-weight: 800; }
.qw-key[data-lit="1"] .qw-k-ch { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.45); }

/* 37 & 44. Homophones & Contractions Sentence Cards */
.hmq-sentence, .ctr-sentence {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin: 10px 0 14px; font-size: 1.15rem; font-weight: 700; line-height: 1.65;
}
.hmq-blank, .ctr-blank {
  display: inline-block; min-width: 84px; padding: 1px 10px; margin: 0 3px;
  border-bottom: 3px solid var(--indigo); color: var(--indigo); font-weight: 900;
  background: #eef2ff; border-radius: 6px 6px 0 0;
}
.hmq-blank.done, .ctr-blank.done { border-color: #16a34a; background: #dcfce7; color: #166534; }

/* 38 & 39. Compound Builder & Prefix Lab */
.cmp-wrap, .pfx-wrap { max-width: 680px; margin: 0 auto; }
.cmp-cols, .pfx-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.cmp-col, .pfx-col { display: flex; flex-direction: column; gap: 7px; }
.cmp-col-head, .pfx-col-head { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; color: var(--muted); text-align: center; }
.pfx-card {
  padding: 10px 12px; border-radius: 10px; border: 2px solid #d4d4d8; background: #fff;
  color: var(--ink); font-size: 0.92rem; font-weight: 700; cursor: pointer; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.08s ease, background 0.12s ease;
}
.pfx-card:hover:not(:disabled) { border-color: var(--indigo); background: #f8fafc; }
.pfx-card.selected { border-color: var(--indigo); background: #eef2ff; color: var(--indigo); transform: scale(1.02); }
.pfx-card.matched { border-color: #86efac; background: #dcfce7; color: #166534; opacity: 0.55; cursor: default; }
.pfx-card.wrong { border-color: #e11d48; background: #ffe4e6; color: #881337; }
.pfx-card.hinted { border-color: #eab308; background: #fef9c3; }
.pfx-origin { font-size: 0.68rem; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: #e0e7ff; color: #3730a3; }
.pfx-origin.greek { background: #fef3c7; color: #92400e; }

/* 40, 41, 42. Currencies, Mythology, Chem Quiz */
.cur-flag { font-size: 3.8rem; line-height: 1.1; margin: 6px 0 4px; }
.cur-country { font-size: 1.45rem; font-weight: 900; font-family: Georgia, serif; margin: 0 0 10px; }
.myt-icon { font-size: 3.1rem; line-height: 1.1; margin: 6px 0 8px; }
.chm-formula {
  display: inline-block; font-size: 2.3rem; font-weight: 900; font-family: Georgia, serif;
  color: var(--indigo); background: #eef2ff; border: 2px solid #c7d2fe; border-radius: 14px;
  padding: 10px 24px; margin: 8px 0 10px; letter-spacing: 0.04em;
}
.chm-formula sub { font-size: 0.62em; vertical-align: sub; }

/* 43. Word Morph */
.wmf-wrap { max-width: 500px; margin: 0 auto; text-align: center; }
.wmf-goal-banner {
  display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px;
  font-weight: 800; font-size: 1.05rem;
}
.wmf-op-pill {
  font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: #e0e7ff; color: #3730a3; margin-left: 6px;
}
.wmf-op-pill.add { background: #dcfce7; color: #166534; }
.wmf-op-pill.del { background: #ffe4e6; color: #9f1239; }
.wmf-op-pill.swap { background: #fef3c7; color: #92400e; }

/* 45. Caesar Shift Decoder */
.csr-wrap { max-width: 720px; margin: 0 auto; text-align: center; }
.csr-controls-card {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 12px;
}
.csr-slider-row { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.csr-slider { flex: 1; min-width: 180px; max-width: 340px; accent-color: var(--indigo); cursor: pointer; }
.csr-shift-pill {
  min-width: 78px; padding: 4px 10px; border-radius: 999px; background: var(--indigo); color: #fff;
  font-weight: 800; font-size: 0.88rem;
}
.csr-freq-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0 12px; }
.csr-freq-chip {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px;
  font-size: 0.78rem; font-weight: 700; color: var(--muted);
}
.csr-freq-chip strong { color: var(--indigo); margin-right: 3px; }
.csr-quote-box {
  background: #fff; border: 2px solid var(--border); border-radius: 12px; padding: 16px;
  display: flex; flex-wrap: wrap; gap: 12px 16px; justify-content: center; margin-bottom: 12px;
}
.csr-quote-box.solved { border-color: #16a34a; background: #f0fdf4; }
.csr-word { display: flex; gap: 3px; flex-wrap: nowrap; }
.csr-cell {
  display: flex; flex-direction: column; align-items: center; width: 28px; padding: 4px 2px;
  border-radius: 6px; border: 1px solid #e4e4e7; background: #fafaf9;
}
.csr-quote-box.solved .csr-cell { background: #dcfce7; border-color: #86efac; }
.csr-plain { font-size: 1.05rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.csr-ciph { font-size: 0.66rem; font-weight: 700; color: var(--muted); border-top: 1px solid #e4e4e7; width: 100%; margin-top: 2px; padding-top: 1px; }

@media (max-width: 780px) {
  .qw-boards { grid-template-columns: 1fr; }
  .qw-key { min-width: 26px; }
  .qw-key-wide { min-width: 44px; font-size: 0.75rem; }
  .cmp-cols, .pfx-cols { grid-template-columns: 1fr; }
}
