/* ═══════════════════════════════════════════════════════════════════════════════
   Let's Fib! — Shared Article Styles
   Light (Cupcake) default, Dark (Dim) via prefers-color-scheme
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   Hero Banner
   ═══════════════════════════════════════════════════════════════════════════════ */

.hero-banner {
  max-width: 760px;
  margin: 0 auto;
}
.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 0 16px 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Article
   ═══════════════════════════════════════════════════════════════════════════════ */

.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.intro { margin-bottom: 1rem; }
.intro p { margin-bottom: 1rem; }

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
  scroll-margin-top: 5rem;
}

/* ── Table of Contents ── */

.article-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  margin-bottom: 1.5rem;
}
.article-toc .toc-heading {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
}
.article-toc .toc-heading::marker,
.article-toc .toc-heading::-webkit-details-marker { display: none; }
.article-toc .toc-heading::after {
  content: '\25B8';
  float: right;
  transition: transform 0.2s;
}
.article-toc[open] .toc-heading::after {
  transform: rotate(90deg);
}
.article-toc[open] .toc-heading {
  margin-bottom: 0;
}
.article-toc ul {
  margin: 0;
  padding: 0 1.5rem 1.25rem 2.75rem;
  list-style: disc;
}
.article-toc li {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}
.article-toc a {
  color: var(--link);
  text-decoration: none;
}
.article-toc a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Content Cards (Game Sections, List Items, etc.)
   ═══════════════════════════════════════════════════════════════════════════════ */

.game-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Two-column game grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.game-grid .game-section {
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .game-grid { grid-template-columns: 1fr; }
  .game-grid .game-section { margin-bottom: 0; }
}
.game-section h2 {
  margin-top: 0;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.game-section h2 .game-tag {
  flex-shrink: 0;
}
.game-section h2 .game-tag:first-of-type {
  margin-left: auto;
}
.game-section h3 {
  font-size: 1.1rem;
  font-weight: 650;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}
.game-section p { margin-bottom: 0.7rem; }
.game-section p:last-child { margin-bottom: 0; }
.game-section ul {
  margin: 0.5rem 0 0.7rem 1.5rem;
  list-style: disc;
}
.game-section ol {
  margin: 0.5rem 0 0.7rem 1.5rem;
  list-style: decimal;
}
.game-section li {
  margin-bottom: 0.4rem;
}

.highlight-section {
  border-color: var(--border-highlight);
  background: var(--bg-highlight);
  box-shadow: var(--highlight-shadow);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Tags
   ═══════════════════════════════════════════════════════════════════════════════ */

.game-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.6rem;
}
.game-tag { background: var(--tag-default-bg); color: var(--tag-default-fg); }
.tag-free { background: var(--tag-free-bg); color: var(--tag-free-fg); }
.tag-no-material { background: var(--tag-default-bg); color: var(--tag-default-fg); }
.tag-paid { background: var(--tag-paid-bg); color: var(--tag-paid-fg); }
.tag-browser { background: var(--tag-browser-bg); color: var(--tag-browser-fg); }
.tag-app { background: var(--tag-app-bg); color: var(--tag-app-fg); }
.tag-recommended { background: var(--tag-recommended-bg); color: var(--tag-recommended-fg); border: 1px solid var(--tag-recommended-border); font-weight: 600; }
.tag-chill { background: var(--tag-chill-bg); color: var(--tag-chill-fg); }

.occasion-grid { display: flex; flex-direction: column; gap: 0.5rem; margin: 1.5rem 0; }
.occasion-card { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.7rem 1rem; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: border-color 0.2s, background 0.2s; }
.occasion-card:hover { border-color: var(--link); background: var(--bg-highlight); }
.occasion-card strong { flex-shrink: 0; min-width: 180px; font-size: 0.9rem; color: var(--text); }
.occasion-card span { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 600px) { .occasion-card { flex-direction: column; gap: 0.2rem; } .occasion-card strong { min-width: auto; } }

.article-image-small { float: right; width: 320px; margin: 0 0 1rem 1.5rem; }
.article-image-small img { border-radius: 12px; width: 100%; height: auto; display: block; }
@media (max-width: 600px) { .article-image-small { float: none; width: 100%; margin: 0 0 1rem 0; } }
.tag-action { background: var(--tag-action-bg); color: var(--tag-action-fg); }
.tag-cozy { background: var(--tag-cozy-bg); color: var(--tag-cozy-fg); }

/* ── Checklist ── */

.game-section .checklist {
  list-style: none;
  margin: 0.5rem 0 0.7rem;
  padding: 0;
}
.checklist li {
  position: relative;
  padding: 0.45rem 0 0.45rem 2rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}
.checklist li:last-child {
  border-bottom: none;
}
.checklist li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 1.4rem;
  height: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tag-free-fg);
  background: var(--tag-free-bg);
  border-radius: 4px;
}

/* ── Game Info List (compact, no card) ── */

.game-info-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 1.5rem;
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  padding: 0.6rem 0;
  position: relative;
}
.game-info-list::before,
.game-info-list::after {
  content: '';
  position: absolute;
  left: -1.5rem;
  right: 0;
  height: 1px;
  background: var(--border);
}
.game-info-list::before { top: 0; }
.game-info-list::after { bottom: 0; }
.game-info-list li {
  margin-bottom: 0;
  padding: 0.15rem 0 0.15rem 1rem;
  list-style: none;
  position: relative;
}
.game-info-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-highlight);
}
.game-info-list strong {
  font-weight: 650;
  color: var(--text);
}
@media (max-width: 640px) {
  .game-info-list {
    grid-template-columns: 1fr;
  }
  .game-info-list::before,
  .game-info-list::after {
    left: -1.2rem;
    right: -1.2rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Summary / Prose Sections
   ═══════════════════════════════════════════════════════════════════════════════ */

.summary-section {
  margin-top: 3rem;
  margin-bottom: 2rem;
}
.summary-section p { margin-bottom: 1rem; }

/* ═══════════════════════════════════════════════════════════════════════════════
   Comparison Table
   ═══════════════════════════════════════════════════════════════════════════════ */

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}
.comparison-table th,
.comparison-table td {
  padding: 0.65rem 0.8rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.comparison-table thead th {
  font-weight: 650;
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.comparison-table thead th:first-child { color: transparent; }
.comparison-table tbody td:first-child {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.comparison-table tbody td:nth-child(2) { color: var(--text-muted); }
.comparison-table tbody td:nth-child(3) { color: var(--accent); font-weight: 500; }
.comparison-table .table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.comparison-table .highlight-row {
  background: var(--bg-highlight);
}
.comparison-table .highlight-row td {
  font-weight: 600;
  color: var(--text);
}
.comparison-table .game-tag {
  font-size: 0.7em;
  vertical-align: middle;
  padding: 0.3em 0.6em;
  white-space: nowrap;
  line-height: 1.5;
  margin-left: 0.3em;
}
@media (max-width: 600px) {
  .comparison-table table { font-size: 0.82rem; }
  .comparison-table th,
  .comparison-table td { padding: 0.45rem 0.5rem; }
  .comparison-table tbody td:first-child { white-space: normal; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CTA Box
   ═══════════════════════════════════════════════════════════════════════════════ */

.cta-box {
  text-align: center;
  padding: 2.5rem 2rem;
  margin: 3rem 0;
  background: var(--cta-bg);
  border-radius: 16px;
  border: 2px solid var(--border-highlight);
}
.cta-box h2 {
  margin-top: 0;
  font-size: 1.6rem;
}
.cta-box p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}
.cta-social-proof {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.cta-social-proof strong {
  color: var(--text);
  font-weight: 650;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 2.5rem;
  background: var(--cta-btn);
  color: var(--cta-btn-text);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  text-align: center;
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--cta-btn-shadow);
  text-decoration: none;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}
@media (min-width: 600px) {
  .cta-buttons .cta-primary { order: 2; }
}
.cta-primary {
  background: var(--cta-btn);
  color: var(--cta-btn-text);
}
.cta-primary:hover {
  color: var(--cta-btn-text);
}
.cta-secondary {
  background: transparent;
  border: 2px solid var(--border-highlight);
  color: var(--text);
}
.cta-secondary:hover {
  color: var(--text);
}

.highlight-cta {
  margin-top: 1.2rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Screenshot Gallery (Thumbnails + Lightbox)
   ═══════════════════════════════════════════════════════════════════════════════ */

.screenshot-gallery-wrap {
  position: relative;
  margin-top: 1.2rem;
  max-height: 185px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.screenshot-gallery-wrap.expanded {
  max-height: 600px;
}
.screenshot-gallery-wrap:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg-card));
  pointer-events: none;
  border-radius: 0 0 12px 12px;
}
.screenshot-expand {
  display: block;
  margin: 0.5rem auto 0;
  padding: 0.3rem 1rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.screenshot-expand:hover {
  border-color: var(--border-highlight);
  color: var(--text);
}

.screenshot-gallery {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.screenshot-thumb {
  width: 110px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s;
}
.screenshot-thumb:hover {
  transform: scale(1.05);
}

.screenshot-thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.screenshot-thumb figcaption {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.screenshot-hint {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Inline article illustrations — edge-to-edge inside game-section */
.game-section > .article-image:first-child {
  margin: -1.5rem -1.5rem 1.2rem;
  border-radius: 11px 11px 0 0;
  overflow: hidden;
}
.article-image {
  margin: 0 0 1.2rem;
  border-radius: 10px;
  overflow: hidden;
}
.article-image img {
  width: 100%;
  height: auto;
  display: block;
}
.article-image figcaption {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Lightbox overlay */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 100;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 1.5rem;
}
.lightbox.active {
  display: flex;
}
.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 95vh;
  max-width: 92vw;
}
.lightbox img {
  max-height: 85vh;
  max-width: 92vw;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.lightbox-caption {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}
.lightbox-note {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  max-width: 90vw;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}
.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 640px) {
  .lightbox-arrow { width: 2.2rem; height: 2.2rem; font-size: 1.5rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FAQ Section
   ═══════════════════════════════════════════════════════════════════════════════ */

.faq-section { margin-top: 3rem; }
.faq-section h2 { margin-bottom: 1rem; }

.faq-section details {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
}

.faq-section summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-section summary::marker,
.faq-section summary::-webkit-details-marker { display: none; }

.faq-section summary::before {
  content: '\25B8';
  margin-right: 0.5rem;
  transition: transform 0.2s;
  display: inline-block;
}
.faq-section details[open] summary::before {
  transform: rotate(90deg);
}

.faq-section details p {
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Related Articles
   ═══════════════════════════════════════════════════════════════════════════════ */

.related-section {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.related-section h2 { margin-bottom: 1rem; }

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.related-card:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--highlight-shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.related-card-text strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.related-card-text span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.related-arrow {
  flex-shrink: 0;
  font-size: 1.3rem;
  color: var(--link);
  transition: transform 0.2s;
}
.related-card:hover .related-arrow {
  transform: translateX(3px);
}

@media (min-width: 540px) {
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  .article-container { padding: 1.5rem 1rem 3rem; }
  .game-section { padding: 1.2rem; }
  .game-section > .article-image:first-child { margin: -1.2rem -1.2rem 1rem; }
  .cta-box { padding: 1.5rem 1.2rem; }
  .cta-buttons { flex-direction: column; align-items: stretch; }
  .header-btn { padding: 0.35rem 0.6rem; font-size: 0.78rem; }
  .hamburger-btn { padding: 0.3rem 0.4rem; }
  .screenshot-thumb { width: 90px; }
  .screenshot-thumb img { height: 115px; }
  .screenshot-gallery-wrap { max-height: 155px; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Interactive Quiz
   ═══════════════════════════════════════════════════════════════════════════════ */

.quiz-container { margin: 2rem 0; }

.quiz-progress {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
.quiz-progress .progress-bar {
  display: block;
  margin: 0.5rem auto 0;
  max-width: 280px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.quiz-progress .progress-fill {
  height: 100%;
  background: var(--cta-btn);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.quiz-question {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  margin-bottom: 1rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.quiz-js .quiz-question { display: none; }
.quiz-js .quiz-question.active {
  display: block;
  animation: quizFadeIn 0.35s ease;
}
@keyframes quizFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-question h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.quiz-question .quiz-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.2rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  text-align: left;
  line-height: 1.4;
}
.quiz-option:hover {
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}
.quiz-option:active { transform: scale(0.98); }
.quiz-option.selected {
  border-color: var(--border-highlight);
  background: var(--bg-highlight);
}
.quiz-option .option-emoji {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.quiz-result {
  background: var(--bg-card);
  border: 2px solid var(--border-highlight);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  animation: quizFadeIn 0.5s ease;
}
.quiz-result h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.quiz-result .result-game {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.quiz-result .result-reason {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.quiz-result .result-cta {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--cta-btn);
  color: var(--cta-btn-text);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.quiz-result .result-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--cta-btn-shadow);
  text-decoration: none;
  color: var(--cta-btn-text);
}
.quiz-result .result-also {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.quiz-restart {
  display: inline-block;
  margin-top: 1.2rem;
  padding: 0.5rem 1.2rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.quiz-restart:hover {
  border-color: var(--border-highlight);
  color: var(--text);
}

@media (max-width: 640px) {
  .quiz-question { padding: 1.4rem 1.1rem; }
  .quiz-question h3 { font-size: 1.1rem; }
  .quiz-option { padding: 0.85rem 1rem; font-size: 0.95rem; }
  .quiz-result .result-game { font-size: 1.5rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Directory (Article Overview)
   ═══════════════════════════════════════════════════════════════════════════════ */

.directory-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* Section base */
.directory-page > section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.directory-page > section h2 {
  margin-top: 0;
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.directory-page > section h2 .cat-icon {
  flex-shrink: 0;
  color: var(--border-highlight);
}

/* Card list: single column for better readability */
.directory-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
.directory-card {
  margin: 0;
  padding: 0;
}
.directory-card-link {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
  height: 100%;
  box-sizing: border-box;
}
.directory-card-link:hover {
  border-color: var(--border-highlight);
  background: var(--bg-highlight);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}
.directory-card-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--border);
}
.directory-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.directory-card-titlerow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 0.75rem;
}
.directory-card-title {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--link);
  overflow-wrap: anywhere;
  min-width: 0;
}
.directory-card-link:hover .directory-card-title {
  color: var(--link-hover, var(--link));
  text-decoration: underline;
}
.directory-card-readtime {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}
.directory-card-readtime svg {
  opacity: 0.7;
}
.directory-card-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .directory-grid { gap: 0.7rem; }
  .directory-page > section { padding: 1.2rem; }
}

@media (max-width: 480px) {
  .directory-card-link { gap: 0.65rem; padding: 0.7rem; }
  .directory-card-thumb { width: 48px; height: 48px; }
  .directory-card-title { font-size: 0.94rem; }
}

/* Pillar highlight (Hub box) — prominent gradient card grid at top */
.pillar-highlight {
  background: var(--bg-highlight) !important;
  border: 1px solid var(--border-highlight) !important;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.08);
}
.pillar-highlight h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}
.pillar-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.pillar-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.18);
  text-decoration: none;
}
.pillar-card-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--border);
}
.pillar-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.pillar-card-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--border-highlight);
  background: rgba(249, 115, 22, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}
.pillar-card-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--link);
  line-height: 1.3;
}
.pillar-card:hover .pillar-card-label { text-decoration: underline; }
.pillar-card-subtitle {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pillar-arrow {
  flex-shrink: 0;
  color: var(--border-highlight);
  transition: transform 0.2s;
}
.pillar-card:hover .pillar-arrow { transform: translateX(3px); }

@media (max-width: 720px) {
  .pillar-grid { grid-template-columns: 1fr; gap: 0.7rem; }
  .pillar-card { padding: 0.7rem 0.85rem; }
}

/* Legacy fallback: keep .directory-desc working in case anything still uses it */
.directory-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Play page intro + mode cards */
.play-intro { color: var(--text-muted); font-size: 1.05rem; margin: 0 0 1.5rem; line-height: 1.5; }
.play-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0; }
.play-mode-card { text-align: center; padding: 1.5rem; margin-bottom: 0; }
.play-mode-card p { font-size: 0.95rem; color: var(--text-muted); margin: 0.5rem 0 0; }
.play-mode-card .cta-button { margin-top: 1rem; display: block; width: 100%; text-align: center; box-sizing: border-box; }
.play-mode-highlight { border-color: var(--border-highlight); background: var(--bg-highlight); box-shadow: var(--highlight-shadow); }
@media (max-width: 640px) { .play-modes { grid-template-columns: 1fr; gap: 0.75rem; } .play-mode-card { padding: 1rem; } }
/* Reduce container padding when play-modes is the main content */
.article-container:has(.play-modes) { padding-top: 1.5rem; padding-bottom: 2rem; }
