/* World Puzzle — global styles */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #1d2333;
  --muted: #5b6472;
  --border: #e3e7f0;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef0ff;
  --accent: #f59e0b;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --yellow: #eab308;
  --yellow-soft: #fef9c3;
  --gray-tile: #9ca3af;
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 10px rgba(29, 35, 51, 0.07);
  --shadow-lg: 0 10px 30px rgba(29, 35, 51, 0.12);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.55em; font-weight: 800; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  font-size: 1.1rem;
}
.brand-name span { color: var(--primary); }

.site-nav { display: flex; align-items: center; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  padding: 4px 12px;
  cursor: pointer;
  color: var(--text);
}
.nav-menu {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-menu a {
  display: block;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-menu a:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.nav-menu a.active { background: var(--primary-soft); color: var(--primary); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 14px;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open { display: flex; }
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 52px 0 30px;
}
.hero h1 { margin-bottom: 0.3em; }
.hero .accent { color: var(--primary); }
.hero-sub { max-width: 640px; margin: 0 auto 22px; color: var(--muted); font-size: 1.08rem; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-soft); }
.hero-features {
  display: flex;
  gap: 10px 22px;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.hero-features li::before { content: "✓ "; color: var(--green); font-weight: 800; }

/* ---------- sections ---------- */
.home-games, .home-categories, .home-guides, .home-about {
  padding: 34px 0 6px;
}
.page-hero { padding: 34px 0 10px; }
.page-hero p { color: var(--muted); max-width: 760px; }
.post-meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.2em; }

/* ---------- game cards ---------- */
.game-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 18px 0 26px;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.game-card-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  color: var(--text);
  height: 100%;
}
.game-card-link:hover { text-decoration: none; }
.game-icon { font-size: 1.9rem; line-height: 1; }
.game-card-title { font-weight: 800; font-size: 1.05rem; color: var(--text); }
.game-card-desc { font-size: 0.86rem; color: var(--muted); flex: 1; }
.game-card-cta { font-weight: 700; font-size: 0.88rem; color: var(--primary); }

/* ---------- categories ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 14px 0 20px;
}
.category-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--text);
  box-shadow: var(--shadow);
}
.category-card:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-2px); }
.category-card strong { font-size: 1.05rem; }
.category-card span { font-size: 0.88rem; color: var(--muted); }

/* ---------- content sections ---------- */
.content-section, .game-content, .policy-page, .blog-post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin: 18px 0; }
.content-section h2 { margin-top: 0; }
.game-intro { color: var(--muted); }
.how-to-list { margin: 0 0 1.4em; padding-left: 1.3em; }
.how-to-list li { margin-bottom: 0.45em; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { padding: 16px 0 2px; font-size: 0.88rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs li[aria-current="page"] { color: var(--text); font-weight: 600; }
.breadcrumbs li[aria-hidden="true"] { color: var(--border); }

/* ---------- FAQ ---------- */
.faq { margin: 22px 0 6px; }
.faq-list { display: grid; gap: 10px; margin-top: 14px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--primary); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 14px; color: var(--muted); }

/* ---------- related ---------- */
.related-games, .related-posts { margin: 26px 0 10px; }
.related-posts ul { padding-left: 1.2em; }
.related-posts li { margin-bottom: 0.4em; }

/* ---------- blog ---------- */
.blog-list { display: grid; gap: 16px; margin: 20px 0; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.blog-card h2 { margin-bottom: 0.2em; }
.blog-card h2 a { color: var(--text); }
.blog-card h2 a:hover { color: var(--primary); }
.read-more { font-weight: 700; }

/* ---------- game embed ---------- */
.game-embed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 14px;
  margin: 18px 0;
}
.game-app { max-width: 100%; }

/* ---------- footer ---------- */
.site-footer {
  background: #141a2c;
  color: #aeb6c8;
  margin-top: 44px;
  padding: 44px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 30px;
}
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 0.8em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.45em; }
.footer-col a { color: #aeb6c8; }
.footer-col a:hover { color: #fff; }
.footer-brand { color: #fff; font-weight: 800; font-size: 1.15rem; }
.footer-brand span { color: #818cf8; }
.footer-about p { font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid #273049;
  padding: 18px 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   GAME-SPECIFIC STYLES
   ============================================================ */

.game-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.game-topbar .game-title { font-weight: 800; font-size: 1.15rem; }
.game-status { font-weight: 700; min-height: 1.5em; }
.game-status.win { color: var(--green); }
.game-status.lose { color: var(--danger); }
.game-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.g-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.g-btn:hover { border-color: var(--primary); color: var(--primary); }
.g-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.g-btn.primary:hover { background: var(--primary-dark); }
.g-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.stats-line { font-size: 0.9rem; color: var(--muted); }

/* --- wordle --- */
.wordle-board {
  display: grid;
  gap: 6px;
  width: min(100%, 350px);
  margin: 0 auto;
}
.wordle-row { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 6px; }
.w-tile {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.3rem, 5vw, 1.9rem);
  font-weight: 800;
  text-transform: uppercase;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  animation: pop 0.25s ease;
}
@keyframes pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.w-tile.fill { border-color: #a7b0c2; }
.w-tile.correct { background: var(--green); border-color: var(--green); color: #fff; }
.w-tile.present { background: var(--yellow); border-color: var(--yellow); color: #fff; }
.w-tile.absent { background: var(--gray-tile); border-color: var(--gray-tile); color: #fff; }

.wordle-keys { display: grid; gap: 5px; margin-top: 16px; width: min(100%, 460px); margin-inline: auto; }
.wordle-key-row { display: flex; gap: 5px; justify-content: center; }
.w-key {
  flex: 1;
  max-width: 46px;
  height: 50px;
  border: none;
  border-radius: 6px;
  background: #e5e8f0;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  text-transform: uppercase;
  color: var(--text);
}
.w-key.wide { flex: 1.6; font-size: 0.78rem; max-width: 68px; }
.w-key:hover { background: #d4d9e6; }
.w-key.correct { background: var(--green); color: #fff; }
.w-key.present { background: var(--yellow); color: #fff; }
.w-key.absent { background: var(--gray-tile); color: #fff; }
@media (max-width: 480px) {
  .w-key { max-width: 34px; height: 44px; font-size: 0.8rem; }
  .w-key.wide { max-width: 52px; font-size: 0.68rem; }
}

/* --- sudoku --- */
.sudoku-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  border: 2px solid var(--text);
  width: min(100%, 420px);
  background: var(--surface);
}
.sudoku-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cdd3e0;
  font-size: clamp(1.05rem, 4.5vw, 1.5rem);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  position: relative;
  background: var(--surface);
}
.sudoku-cell:nth-child(3n) { border-right: 2px solid var(--text); }
.sudoku-cell:nth-child(9n) { border-right: none; }
.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid var(--text); }
.sudoku-cell.given { color: var(--text); background: #f2f3f8; }
.sudoku-cell.selected { background: var(--primary-soft) !important; }
.sudoku-cell.same { background: #eef1fb; }
.sudoku-cell.error { color: var(--danger) !important; background: #fee2e2 !important; }
.sudoku-cell.pencil-cell { font-size: clamp(0.55rem, 2.4vw, 0.78rem); font-weight: 600; color: var(--muted); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 1px; }
.sudoku-cell.pencil-cell span { display: flex; align-items: center; justify-content: center; }
.sudoku-pad { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sudoku-pad button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
}
.sudoku-pad button:hover { border-color: var(--primary); color: var(--primary); }
.sudoku-pad button.wide { width: auto; padding: 0 14px; font-size: 0.85rem; }
.sudoku-info { display: flex; gap: 16px; font-weight: 700; color: var(--muted); }

/* --- crossword --- */
.cw-layout { display: grid; grid-template-columns: 1fr 260px; gap: 20px; align-items: start; }
@media (max-width: 760px) { .cw-layout { grid-template-columns: 1fr; } }
.cw-grid {
  display: grid;
  border: 2px solid var(--text);
  width: min(100%, 400px);
  background: var(--surface);
}
.cw-cell {
  aspect-ratio: 1;
  border: 1px solid #cdd3e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  background: var(--surface);
  position: relative;
}
.cw-cell.block { background: #1d2333; border-color: #1d2333; cursor: default; }
.cw-cell .num { position: absolute; top: 1px; left: 2px; font-size: 0.55rem; font-weight: 700; color: var(--muted); }
.cw-cell.selected { background: var(--yellow-soft); }
.cw-cell.revealed { background: var(--green-soft); color: var(--green); }
.cw-clues h3 { font-size: 1rem; margin-top: 10px; }
.cw-clues ol { margin: 0 0 1em; padding-left: 1.2em; font-size: 0.95rem; }
.cw-clues li { margin-bottom: 0.4em; }

/* --- word search --- */
.ws-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ws-grid { display: grid; border: 2px solid var(--text); background: var(--surface); width: min(100%, 480px); }
.ws-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.75rem, 3vw, 1rem);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  border: 1px solid #eef0f6;
  border-radius: 4px;
  background: var(--surface);
}
.ws-cell.highlight { background: var(--yellow-soft); }
.ws-cell.found { background: var(--green-soft); color: var(--green); }
.ws-words { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 520px; }
.ws-word { padding: 5px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.ws-word.found { background: var(--green-soft); color: var(--green); text-decoration: line-through; }

/* --- jigsaw --- */
.jigsaw-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.jigsaw-board { border: 3px solid var(--border); border-radius: 12px; background: #e8ebf3; position: relative; overflow: hidden; width: min(100%, 520px); aspect-ratio: 4/3; touch-action: none; }
.jigsaw-tray { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; width: min(100%, 520px); min-height: 60px; padding: 8px; background: #eef1f8; border-radius: 12px; }
.jigsaw-piece { position: absolute; cursor: grab; user-select: none; touch-action: none; }
.jigsaw-piece.tray-piece { position: static; width: 52px !important; height: 39px !important; border-radius: 4px; }

/* --- memory --- */
.memory-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.memory-grid { display: grid; gap: 8px; width: min(100%, 480px); }
.mem-card {
  aspect-ratio: 4/5;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  color: transparent;
  user-select: none;
  transition: transform 0.15s ease;
  box-shadow: var(--shadow);
}
.mem-card:hover { transform: scale(1.03); }
.mem-card.flipped { background: var(--surface); color: var(--text); border-color: var(--primary); }
.mem-card.matched { background: var(--green-soft); color: var(--green); border-color: var(--green); }

/* --- minesweeper --- */
.ms-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ms-board { display: grid; border: 2px solid var(--text); background: var(--surface); }
.ms-cell {
  width: clamp(24px, 5.5vw, 34px);
  height: clamp(24px, 5.5vw, 34px);
  border: 1px solid #cdd3e0;
  background: #eef0f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}
.ms-cell.revealed { background: var(--surface); }
.ms-cell.mine { background: var(--danger); color: #fff; }
.ms-cell.flag { background: #fde68a; color: #92400e; }
.ms-cell.n1 { color: #2563eb; } .ms-cell.n2 { color: #16a34a; } .ms-cell.n3 { color: #dc2626; }
.ms-cell.n4 { color: #7c3aed; } .ms-cell.n5 { color: #b45309; } .ms-cell.n6 { color: #0e7490; }
.ms-cell.n7 { color: #1d2333; } .ms-cell.n8 { color: #64748b; }

/* --- 2048 --- */
.g2048-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.g2048-board {
  width: min(100%, 420px);
  aspect-ratio: 1;
  background: #b9bfd0;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px;
  touch-action: none;
}
.g2048-cell { border-radius: 8px; background: #d4d9e6; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: clamp(1.3rem, 6vw, 2.2rem); }
.g2048-cell.t2 { background: #eef0f6; }
.g2048-cell.t4 { background: #e8e6d8; }
.g2048-cell.t8 { background: #f9c07a; }
.g2048-cell.t16 { background: #f5a86a; }
.g2048-cell.t32 { background: #f28a6a; }
.g2048-cell.t64 { background: #ef6f5f; }
.g2048-cell.t128 { background: #f3d970; }
.g2048-cell.t256 { background: #edd34f; }
.g2048-cell.t512 { background: #e8c22f; }
.g2048-cell.t1024 { background: #f0b13f; }
.g2048-cell.t2048 { background: #e2a13b; color: #fff; }
.g2048-cell.t4096, .g2048-cell.t8192, .g2048-cell.t16384 { background: #1d2333; color: #fff; }

/* --- scramble --- */
.scramble-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.scramble-tiles { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 440px; }
.s-tile {
  width: 46px;
  height: 46px;
  border: 2px solid var(--primary);
  border-radius: 10px;
  background: var(--primary-soft);
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.s-tile.used { border-color: var(--border); background: var(--surface); color: var(--muted); }
.s-tile.correct { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.scramble-answer { min-height: 50px; font-size: 1.4rem; font-weight: 800; letter-spacing: 6px; text-transform: uppercase; color: var(--text); }

/* --- hangman --- */
.hangman-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hangman-canvas { width: min(100%, 300px); }
.hangman-word { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 1.9rem; font-weight: 800; letter-spacing: 4px; }
.hangman-word .blank { border-bottom: 3px solid var(--text); min-width: 24px; text-align: center; }
.hangman-keys { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 480px; }
.h-key {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
}
.h-key:hover { border-color: var(--primary); color: var(--primary); }
.h-key.used { opacity: 0.35; pointer-events: none; }

/* --- tic tac toe --- */
.ttt-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ttt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 320px); }
.ttt-cell {
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 3rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ttt-cell:hover { border-color: var(--primary); }
.ttt-cell.x { color: var(--primary); }
.ttt-cell.o { color: var(--accent); }
.ttt-cell.win { background: var(--green-soft); }

/* --- connections --- */
.conn-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.conn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(100%, 520px); }
.conn-cell {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px 6px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  user-select: none;
  transition: background 0.12s ease;
}
.conn-cell.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.conn-cell.solved { background: var(--yellow); border-color: var(--yellow); color: #fff; pointer-events: none; }
.conn-cell.solved.g2 { background: var(--green); border-color: var(--green); }
.conn-cell.solved.g3 { background: #0891b2; border-color: #0891b2; }
.conn-cell.solved.g4 { background: #7c3aed; border-color: #7c3aed; }
.conn-mistakes { font-weight: 700; }
.conn-mistakes .dot { color: #cdd3e0; }
.conn-mistakes .dot.lost { color: var(--danger); }
.conn-cat { font-weight: 800; font-size: 1.05rem; margin: 10px 0 4px; }

/* --- trivia --- */
.trivia-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 560px; margin: 0 auto; }
.trivia-q { font-size: 1.15rem; font-weight: 700; text-align: center; }
.trivia-options { display: grid; gap: 10px; width: 100%; }
.trivia-opt {
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 13px 16px;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
}
.trivia-opt:hover:not(:disabled) { border-color: var(--primary); }
.trivia-opt.correct { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.trivia-opt.wrong { background: #fee2e2; border-color: var(--danger); color: var(--danger); }
.trivia-opt:disabled { cursor: default; }
.trivia-score { font-size: 1.1rem; font-weight: 800; color: var(--primary); }

/* ---------- misc ---------- */
.home-about { color: var(--muted); }
.home-about h2 { color: var(--text); }
.home-guides .guide-list { display: grid; gap: 8px; padding-left: 1.1em; }
@media (max-width: 560px) {
  .content-section, .policy-page, .blog-post, .game-embed { padding: 18px 14px; }
}
