/* Clueffy — The Printed Puzzle Almanac (Warm Editorial Paper & Tactile Craft) */
@font-face {
  font-family: Display;
  src: url('/_a/dm-serif.22d9783c8e.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Library;
  src: url('/_a/dm-sans.a1908f3902.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --bg: #f6f0e6;
  --surface: #fffcf7;
  --surface-2: #ede4d5;
  --line: #d9ccb8;
  --line-strong: #b8a58b;
  --ink: #241c15;
  --muted: #615345;
  --accent: #a83b18;
  --accent-hover: #872e11;
  --correct: #2c7a56;
  --present: #9e6310;
  --absent: #5c5147;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(36, 28, 21, 0.06);
  --shadow-md: 0 10px 24px rgba(36, 28, 21, 0.09);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  color-scheme: light;
  scrollbar-color: var(--line-strong) var(--bg);
}
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(color-mix(in srgb, var(--line-strong) 26%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: Library, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 4px; }
button, input, textarea { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.48; }
[hidden] { display: none !important; }
svg { flex-shrink: 0; vertical-align: middle; }
::selection { background: var(--accent); color: var(--surface); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: -100px; left: 16px; z-index: 100;
  background: var(--accent); color: var(--surface);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Shared Editorial Header & Footer */
.directory main,
.library-footer {
  width: min(1160px, calc(100% - 64px));
  margin-inline: auto;
}
.library-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  padding-inline: max(32px, calc((100% - 1160px) / 2));
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.library-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-family: Display, Georgia, serif;
  font-size: 28px; line-height: 1; font-weight: 400;
  letter-spacing: -0.02em; text-decoration: none;
}
.library-brand span { color: var(--accent); margin-left: -8px; }
.library-brand svg { transition: transform 180ms ease; border-radius: 9px; box-shadow: 0 2px 0 var(--accent-hover); }
.library-brand svg rect { fill: var(--accent); }
.library-brand svg path { fill: var(--surface); stroke: var(--surface); }
.library-brand:hover svg { transform: translateY(-1px); }

.library-header nav { display: flex; align-items: center; gap: 6px; }
.library-header nav a,
.library-header .word-stats {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  min-height: 40px; padding: 6px 13px; border-radius: 999px;
  display: inline-flex; align-items: center; background: transparent; border: 1px solid transparent;
  white-space: nowrap; transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.library-header nav a:hover,
.library-header .word-stats:hover {
  color: var(--ink); background: var(--surface); border-color: var(--line);
}
.library-header nav a[aria-current="page"] {
  color: var(--ink); font-weight: 600;
  background: var(--surface); border-color: var(--line-strong);
  box-shadow: 0 2px 0 var(--line);
}

.library-footer {
  display: grid; grid-template-columns: 1fr auto; gap: 18px 48px;
  border-top: 2px solid var(--ink); padding: 36px 0 44px;
  margin-top: 36px; color: var(--ink); font-size: 13px;
}
.library-footer .library-brand { font-size: 24px; }
.library-footer p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.library-footer nav { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: flex-start; }
.library-footer nav a {
  color: var(--muted); text-decoration: none; font-weight: 500; min-height: 44px;
  display: inline-flex; align-items: center; transition: color 150ms ease;
}
.library-footer a:hover { color: var(--accent); }
.library-footer .independence { font-size: 12px; grid-column: 1 / -1; line-height: 1.75; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* Editorial Typography & Masthead Hero */
.directory a { text-decoration: none; }
.directory p { color: var(--muted); }
.directory h1, .directory h2, .directory h3 {
  font-family: Display, Georgia, serif; font-weight: 400; color: var(--ink);
  line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance;
}
.directory h1 span { color: var(--accent); }

.discovery-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 24px 48px;
  align-items: center;
  margin-top: 20px;
  padding: 30px 36px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--line), var(--shadow-sm);
}
.discovery-intro h1 {
  font-size: clamp(42px, 4.8vw, 62px);
  margin: 0;
  line-height: 0.98;
}
.discovery-intro > div {
  max-width: 540px;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}
.discovery-intro p { font-size: 16px; line-height: 1.6; margin: 0 0 14px; color: var(--ink); }
.discovery-intro .video-finder-intro { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.discovery-intro a[href="/daily-word-game"] {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 22px; margin-right: 10px;
  border-radius: 999px;
  background: var(--accent); color: var(--surface) !important;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 2px 0 var(--accent-hover);
  transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}
.discovery-intro a[href="/daily-word-game"]:hover {
  background: var(--accent-hover); transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--ink); text-decoration: none;
}
.discovery-intro a[href="/daily-word-game"]:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--accent-hover); }
.discovery-intro a:not([href="/daily-word-game"]) {
  font-size: 14px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 4px;
}
.discovery-intro a:not([href="/daily-word-game"]):hover { color: var(--accent-hover); text-decoration: underline; }

/* Clean arrow-free buttons, chips & links */
.discovery-intro a svg,
.search-submit svg,
.recognition button svg,
.play-link svg,
.primary-button svg,
.secondary-button svg,
.sponsored-link svg,
.source-note a svg,
.guide-sources > a svg,
.section-line > a svg,
.compact-games svg,
.guide-index > a > svg,
.home-faq > div > a svg,
html.cf-word .hint-link svg,
html.cf-word .primary svg,
html.cf-word .secondary svg { display: none; }


/* Adsterra Banners (Calm Editorial Slot) */
.adsterra-banner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; margin: 16px 0 22px; padding: 8px 12px;
  min-height: 70px; overflow: hidden;
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
}
.adsterra-banner small { font-size: 12px; color: var(--muted); letter-spacing: 0.03em; }
.adsterra-banner iframe { display: block; max-width: 100%; border-radius: 4px; }
.adsterra-banner[data-banner="rectangle"] { min-height: 274px; margin: 36px 0; }
@media (min-width: 900px) { .adsterra-banner[data-banner="leader"] { min-height: 112px; } }
.directory-ad { display: flex; justify-content: center; align-items: center; max-width: 100%; margin: 24px 0; min-height: 50px; overflow: hidden; }
.directory-ad iframe { display: block; border: 0; flex: none; max-width: 100%; }

/* Catalog Toolbar & Tactile Search */
.catalog-heading {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.catalog-heading h2 { font-size: 26px; margin: 0; }
.catalog-heading-right { display: flex; align-items: center; gap: 12px; }
.catalog-heading #result-count {
  font-size: 13px; font-weight: 500; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.surprise-btn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--ink); font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 0 var(--line);
  transition: border-color 150ms ease, background-color 150ms ease, transform 140ms ease;
}
.surprise-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.surprise-btn:active { transform: translateY(1px); box-shadow: none; }

.catalog-tools {
  margin-bottom: 22px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0 20px;
}
.catalog-tools > .game-search,
.catalog-tools > .recognition,
.catalog-tools > .filters { flex: 1 0 100%; width: 100%; }

.game-search {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: 12px; padding: 7px 8px 7px 16px; min-height: 60px;
  box-shadow: 0 3px 0 var(--line);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.game-search > svg { color: var(--muted); }
.game-search input {
  background: none; border: 0; color: var(--ink);
  padding: 6px 0; width: 100%; min-width: 0;
  font-size: 16px; outline: 0; min-height: 40px; caret-color: var(--accent);
}
.game-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 30%, var(--line)), 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.game-search input:focus-visible { outline: none; }
.game-search input::placeholder { color: var(--muted); opacity: 0.85; }
.search-kbd {
  display: inline-grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 5px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--muted);
  font-size: 12px; font-weight: 700; font-family: Library, Arial, sans-serif;
  box-shadow: 0 1px 0 var(--line-strong);
  user-select: none; pointer-events: none;
}
.game-search:focus-within .search-kbd { opacity: 0; }

.search-submit, .primary-button, .play-link {
  background: var(--accent); color: var(--surface) !important;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  font-weight: 600; white-space: nowrap;
  box-shadow: 0 2px 0 var(--accent-hover);
  transition: background-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.search-submit { padding: 10px 22px; min-height: 44px; font-size: 14px !important; }
.search-submit:hover, .primary-button:hover, .play-link:hover {
  background: var(--accent-hover); transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--ink);
}
.search-submit:active, .primary-button:active, .play-link:active {
  transform: translateY(1px); box-shadow: 0 1px 0 var(--accent-hover);
}
.game-search #clear-search {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  border-radius: 6px; padding: 6px 10px; min-height: 36px; font-size: 12px; font-weight: 600;
}
.game-search #clear-search:hover { border-color: var(--line-strong); }

/* Visual Clue Recognition Chips */
.recognition {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 0 12px; font-size: 13px; flex-wrap: wrap;
}
.recognition > span { color: var(--muted); font-size: 13px; font-weight: 500; margin-right: 4px; }
.recognition button {
  display: inline-flex; gap: 5px; align-items: center;
  color: var(--ink); border: 1px solid var(--line);
  background: var(--surface); padding: 5px 12px; min-height: 34px;
  border-radius: 999px; font-size: 13px; font-weight: 500;
  box-shadow: 0 1px 0 var(--line);
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.recognition button svg { width: 12px; height: 12px; color: var(--accent); }
.recognition button:hover { border-color: var(--accent); background: var(--surface-2); transform: translateY(-1px); }
.recognition button[aria-pressed="true"] {
  background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 600;
}
.recognition button[aria-pressed="true"] svg { color: var(--surface); }

/* Category Filters */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 14px;
}
.filters button {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 7px 14px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
  white-space: nowrap; transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.filters button:hover { color: var(--ink); border-color: var(--line); background: var(--surface); }
.filters button[aria-pressed="true"] {
  background: var(--ink); color: var(--surface); border-color: var(--ink);
  box-shadow: 0 2px 0 var(--line-strong);
}
.filter-count {
  font-size: 12px; color: var(--muted);
  background: var(--surface-2); padding: 1px 7px;
  border-radius: 999px; font-variant-numeric: tabular-nums; font-weight: 600;
}
.filters button[aria-pressed="true"] .filter-count {
  background: var(--accent); color: var(--surface);
}

/* Compact Sponsored & Source Meta Row */
.directory .sponsored-link {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; color: var(--muted); font-size: 12px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 4px;
}
.directory .sponsored-link:hover { color: var(--accent); }
.sponsored-link svg { width: 12px; height: 12px; }
.source-note { font-size: 12px; line-height: 1.6; margin: 10px 0 0; color: var(--muted); }
.catalog-tools > .source-note { margin: 0; padding-top: 6px; }
.source-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.source-note a svg { height: 12px; width: 12px; }

/* Recently Visited Strip */
.recent-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 20px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.recent-label { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; letter-spacing: 0.02em; }
.recent-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.recent-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; min-height: 32px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); transition: border-color 140ms ease, color 140ms ease;
}
.recent-pill:hover { border-color: var(--accent); color: var(--accent); }
.recent-clear {
  background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 500;
  padding: 4px 8px; min-height: 32px; text-decoration: underline; text-underline-offset: 3px;
}
.recent-clear:hover { color: var(--ink); }

/* Today's Daily Lineup (@clueffy Daily Routine Hub) */
.daily-hub {
  margin: 0 0 24px; padding: 18px 20px;
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: 0 3px 0 var(--line), var(--shadow-sm);
}
.daily-hub-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.daily-hub h2 { font-size: 24px; margin: 0; line-height: 1.15; }
.daily-hub-head p { font-size: 13px; margin: 4px 0 0; color: var(--muted); }
.daily-hub-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.daily-progress, .daily-streak, .daily-clock {
  display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
}
.daily-progress.is-complete { background: var(--correct); color: var(--surface); border-color: var(--correct); }
.daily-streak { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.daily-clock { color: var(--muted); }
.daily-unplayed-btn {
  display: inline-flex; align-items: center; min-height: 36px; padding: 5px 13px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 600;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
.daily-unplayed-btn:hover { border-color: var(--accent); color: var(--accent); }
.daily-unplayed-btn[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--surface);
}
.daily-queue {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px; margin-top: 14px;
}
.daily-slot {
  display: flex; flex-direction: column; gap: 8px; padding: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color 150ms ease, transform 150ms ease, background-color 150ms ease;
}
.daily-slot:hover { border-color: var(--accent); transform: translateY(-1px); }
.daily-slot.is-done { border-color: var(--correct); background: var(--surface); }
.daily-slot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daily-step {
  font-size: 12px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
}
.daily-check {
  width: 30px; height: 30px; min-height: 30px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted);
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.daily-check:hover { border-color: var(--correct); color: var(--correct); }
.daily-check[aria-pressed="true"] { background: var(--correct); border-color: var(--correct); color: var(--surface); }
.daily-slot-link { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.daily-slot-link strong { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.daily-slot-link span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.daily-slot-link:hover strong { color: var(--accent); }

.game-card.is-played { border-color: var(--correct); }
.card-done-btn {
  width: 40px; height: 40px; min-height: 40px; flex-shrink: 0; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--muted);
  font-size: 14px; font-weight: 700; display: grid; place-items: center;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.card-done-btn:hover { border-color: var(--correct); color: var(--correct); }
.card-done-btn[aria-pressed="true"] {
  background: var(--correct); border-color: var(--correct); color: var(--surface);
}

/* Framed Almanac Game Grid & Cards (with subtle CSS catalog numbers 01–33) */
.game-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px; counter-reset: catalog;
}
.game-card {
  counter-increment: catalog;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column; min-width: 0;
  box-shadow: 0 2px 0 var(--line), var(--shadow-sm);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease, box-shadow 200ms ease;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 4px 0 var(--line-strong), var(--shadow-md);
}
.game-card.is-picked {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent), var(--shadow-md);
  animation: card-pick 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes card-pick {
  0% { transform: scale(0.985); }
  45% { transform: translateY(-5px) scale(1.015); }
  100% { transform: translateY(0) scale(1); }
}
.game-preview {
  display: block; width: 100%; flex-shrink: 0; aspect-ratio: 1200 / 630; overflow: hidden;
  background: var(--ink); border-bottom: 1px solid var(--line);
}
.game-preview img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.game-card:hover .game-preview img { transform: scale(1.03); }
.game-preview img.game-image-contain,
.detail-visual img.game-image-contain { object-fit: contain; background: var(--ink); }

.game-info {
  position: relative; padding: 18px 20px 20px;
  display: flex; flex-direction: column; flex: 1;
}
.game-info::before {
  content: counter(catalog, decimal-leading-zero);
  position: absolute; top: 19px; right: 20px;
  font-size: 12px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
}
.game-category {
  font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.4;
  display: inline-block; align-self: flex-start; max-width: calc(100% - 34px);
  padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.game-info h3 { font-size: 25px; margin: 10px 0 8px; }
.game-info h3 a:hover { color: var(--accent); }
.game-info > p { font-size: 14px; line-height: 1.62; margin: 0 0 18px; max-width: 42ch; flex: 1; }
.game-actions { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.play-link { padding: 9px 18px; font-size: 13px; min-height: 44px; }
.guide-link {
  font-size: 13px; font-weight: 600; min-height: 44px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--ink); display: inline-flex; align-items: center;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
.guide-link:hover { border-color: var(--accent); background: var(--surface-2); color: var(--accent); }

.empty-results {
  text-align: center; padding: 56px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.empty-results h3 { font-size: 28px; margin: 0; }
.empty-results p { max-width: 52ch; margin: 12px auto 20px; }
.empty-results button {
  background: var(--accent); color: var(--surface); font-weight: 600;
  border: 0; border-radius: 999px; min-height: 44px; padding: 10px 22px;
  box-shadow: 0 2px 0 var(--accent-hover);
}
.empty-results button:hover { background: var(--accent-hover); }

/* Editorial Word-Game Feature Card & Home FAQ */
.word-banner {
  margin: 56px 0; display: flex; align-items: center; gap: 28px;
  padding: 28px 32px; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--line-strong);
  box-shadow: 0 4px 0 var(--line), var(--shadow-sm);
}
.word-banner h2 { font-size: 26px; margin: 0 0 6px; }
.word-banner p { font-size: 15px; max-width: 56ch; margin: 0; }
.word-banner > div:nth-child(2) { flex: 1; }
.word-symbol { display: grid; grid-template-columns: repeat(2, 30px); gap: 5px; transform: rotate(-6deg); }
.word-symbol span {
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 6px; height: 30px;
  box-shadow: 0 2px 0 var(--line-strong);
}
.word-symbol span:first-child { background: var(--correct); color: var(--surface); border-color: var(--correct); }
.secondary-button {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); border: 0;
  padding: 12px 24px; border-radius: 999px; font-size: 14px; font-weight: 600;
  min-height: 46px; white-space: nowrap; color: var(--surface);
  box-shadow: 0 2px 0 var(--muted);
  transition: background-color 140ms ease, transform 140ms ease;
}
.secondary-button:hover { background: var(--accent); transform: translateY(-1px); }

.home-faq { display: grid; grid-template-columns: 0.95fr 2fr; gap: 56px; margin-bottom: 56px; }
.home-faq h2 { font-size: 34px; margin: 0 0 16px; }
.home-faq > div > a {
  font-size: 14px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.home-faq > div > a:hover { color: var(--accent-hover); text-decoration: underline; }

.questions details {
  border-bottom: 1px solid var(--line);
  transition: background-color 150ms ease;
}
.questions details[open] {
  background: var(--surface); padding-inline: 16px;
  border: 1px solid var(--line); border-radius: 10px; margin-block: 6px;
  box-shadow: var(--shadow-sm);
}
.questions summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; cursor: pointer; padding: 18px 0;
  font-size: 15px; font-weight: 600; color: var(--ink); list-style: none;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary svg { transition: transform 200ms ease; color: var(--accent); }
.questions details[open] summary svg { transform: rotate(45deg); }
.questions details p { font-size: 15px; line-height: 1.75; margin: 0 24px 18px 0; max-width: 70ch; }
.questions details a { color: var(--accent); font-weight: 500; text-decoration: underline; }


/* Inner Pages: Page Intro, Game Details, Guides, Reading */
.page-intro { padding: 34px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.page-intro h1 { font-size: clamp(36px, 4.2vw, 54px); margin: 0 0 14px; }
.page-intro > p { font-size: 17px; max-width: 65ch; margin: 0; line-height: 1.65; }
.page-intro + .catalog { margin-bottom: 60px; }

.breadcrumbs {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 0 14px; color: var(--muted); font-size: 13px; flex-wrap: wrap;
}
.breadcrumbs a { font-weight: 500; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }

.game-detail {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px;
  align-items: center; padding: 8px 0 34px;
}
.detail-visual {
  background: var(--surface); padding: 10px; border-radius: 18px;
  border: 1px solid var(--line); box-shadow: 0 3px 0 var(--line), var(--shadow-md);
}
.detail-visual img {
  display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630;
  object-fit: cover; border-radius: 10px;
}
.detail-visual p { font-size: 12px; margin: 10px 4px 2px; }
.detail-visual a { text-decoration: underline; text-underline-offset: 4px; color: var(--accent); }
.detail-intro h1 { font-size: clamp(38px, 4.4vw, 54px); margin: 10px 0 10px; }
.detail-intro > p { font-size: 15px; max-width: 52ch; margin: 10px 0; line-height: 1.7; }
.detail-intro .recognition-cue { font-size: 19px; color: var(--ink); font-weight: 500; line-height: 1.45; }
.detail-intro .round-facts {
  display: flex; width: fit-content; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; margin: 14px 0 18px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.primary-button { font-size: 15px; min-height: 48px; padding: 12px 28px; }
.detail-intro .external-note { font-size: 12px; line-height: 1.75; margin-top: 12px; }

.guide-layout {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 52px; border-top: 1px solid var(--line); padding: 16px 0 48px; align-items: start;
}
.guide-copy h2, .reading-page h2, .editorial-block h2 { font-size: 28px; margin: 32px 0 14px; }
.guide-copy p, .guide-copy li, .reading-page p, .reading-page li, .editorial-block p {
  color: var(--muted); font-size: 16px; line-height: 1.8; max-width: 70ch;
}
.play-steps { list-style: none; padding: 0; margin: 16px 0 24px; counter-reset: step; }
.play-steps li {
  counter-increment: step; position: relative; padding: 14px 18px 14px 54px;
  margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; color: var(--ink); box-shadow: var(--shadow-sm);
}
.play-steps li::before {
  content: counter(step); position: absolute; left: 15px; top: 14px;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  color: var(--accent); font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}

.guide-sources {
  position: sticky; top: 90px;
  padding: 24px; background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--line), var(--shadow-sm);
}
.guide-sources h2 { font-size: 22px; margin: 0 0 14px; }
.guide-sources h2 + h2, .guide-sources a + h2, .guide-sources p + h2 { margin-top: 24px; }
.guide-sources > .play-link {
  display: inline-flex; justify-content: center; gap: 10px;
  padding: 11px 16px; border: 0; width: 100%;
}
.guide-sources > a:not(.play-link) {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; padding: 11px 0;
  border-bottom: 1px solid var(--line); color: var(--ink);
  transition: color 140ms ease;
}
.guide-sources > a:not(.play-link):hover { color: var(--accent); }
.guide-sources p { font-size: 13px; line-height: 1.7; margin: 14px 0; }

.more-games { padding: 16px 0 56px; }
.section-line { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.section-line h2 { font-size: 28px; margin: 0; }
.section-line > a { font-size: 13px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.section-line > a:hover { color: var(--accent-hover); text-decoration: underline; }
.compact-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.compact-games a {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: grid; grid-template-columns: 1fr; gap: 6px;
  box-shadow: 0 2px 0 var(--line);
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.compact-games a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 0 var(--line-strong); }
.compact-games strong { font-family: Display, Georgia, serif; font-weight: 400; font-size: 21px; color: var(--ink); }
.compact-games span { grid-row: 2; font-size: 13px; color: var(--muted); line-height: 1.5; }
.compact-games svg { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--accent); }

.reading-page { max-width: 780px; margin-bottom: 60px; }
.reading-page a, .editorial-block a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.reading-page a:hover, .editorial-block a:hover { color: var(--accent-hover); }
.reading-page > .questions { margin-bottom: 32px; }
.credit-list { padding-left: 22px; }
.credit-list li { margin-bottom: 14px; }
.editorial-block { max-width: 760px; margin: 32px 0 60px; }

/* Guides Directory Cards + Quick Filter */
.guide-filter {
  display: flex; align-items: center; gap: 12px; margin-bottom: 22px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 10px;
  padding: 6px 14px; min-height: 52px; max-width: 560px;
  box-shadow: 0 2px 0 var(--line);
}
.guide-filter:focus-within {
  border-color: var(--accent);
  box-shadow: 0 2px 0 var(--line), 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.guide-filter > svg { color: var(--muted); }
.guide-filter input {
  background: none; border: 0; color: var(--ink); width: 100%; min-width: 0;
  font-size: 15px; outline: 0; min-height: 38px;
}
.guide-filter input::placeholder { color: var(--muted); }
.guide-filter-count { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.guide-filter-clear {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  border-radius: 6px; padding: 5px 10px; min-height: 32px; font-size: 12px; font-weight: 600;
}

.guide-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide-index > a {
  position: relative; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: block; box-shadow: 0 2px 0 var(--line);
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.guide-index > a:hover {
  border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 0 var(--line-strong);
}
.guide-index h2 { font-size: 24px; margin: 8px 0 6px; color: var(--ink); }
.guide-index p { font-size: 14px; margin: 0; line-height: 1.55; }
.guide-index > a > svg {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--accent); transition: transform 150ms ease;
}
.guide-index > a:hover > svg { transform: translate(2px, -52%); }
.guide-index > a:hover h2 { color: var(--accent); }

/* More Games Recommendations */
html.cf-more .recommended-detail { grid-template-columns: 1fr; max-width: 820px; }
html.cf-more .recommended-detail .detail-intro > p { max-width: 65ch; }
html.cf-more .recommendation-intro { padding-bottom: 24px; }
html.cf-more .recommendation-picks { max-width: 820px; margin: 0 0 36px; }
html.cf-more .recommendation-picks .guide-index { grid-template-columns: 1fr; }
html.cf-more .recommendation-picks .guide-index h3 { font-size: 26px; margin: 0 0 10px; color: var(--ink); }
html.cf-more .recommendation-picks .guide-index > a:hover h3 { color: var(--accent); }
html.cf-more .recommendation-picks .guide-index p + p { margin-top: 10px; }
html.cf-more .recommendation-picks .guide-index .round-facts { font-size: 13px; font-weight: 600; color: var(--accent); }

/* Floating Back to Top */
.back-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 35;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink);
  font-size: 18px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 2px 0 var(--line-strong), var(--shadow-md);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, border-color 140ms ease, color 140ms ease;
}
.back-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { border-color: var(--accent); color: var(--accent); }

/* Daily Word Game Desk & Guides (Warm Archival Tabletop Edition) */
html.cf-word body { background-color: var(--bg); color: var(--ink); font-family: Library, Arial, sans-serif; font-size: 16px; line-height: 1.6; }
html.cf-word button { min-height: 44px; }
html.cf-word main { max-width: 1120px; margin: auto; padding: 14px 32px 0; }
html.cf-word h1, html.cf-word h2 { font-family: Display, Georgia, serif; font-weight: 400; color: var(--ink); letter-spacing: -0.015em; }

.word-identity { font-family: Library, Arial, sans-serif; color: var(--muted); font-size: 13px; padding: 0; margin: 0 0 8px; }
.word-identity a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.word-identity a:hover { color: var(--accent-hover); }

html.cf-word .game-heading {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
html.cf-word h1 { font-size: clamp(32px, 3.8vw, 44px); line-height: 1.08; margin: 0 0 4px; }
html.cf-word .heading-dot { color: var(--accent); }
html.cf-word .game-heading p { margin: 0; color: var(--muted); font-size: 14px; }
html.cf-word .edition {
  display: flex; flex-direction: column; text-align: right;
  font-size: 12px; color: var(--muted); gap: 3px; font-variant-numeric: tabular-nums;
}
html.cf-word .edition > span:first-child { font-weight: 700; color: var(--ink); font-size: 13px; }

html.cf-word .mode-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 14px; flex-wrap: wrap;
}
html.cf-word .mode-switch {
  display: flex; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 4px; gap: 4px;
}
html.cf-word .mode-switch button {
  border: 0; background: transparent; color: var(--muted);
  border-radius: 7px; padding: 7px 20px; font-size: 13px; font-weight: 600;
  transition: background-color 150ms ease, color 150ms ease;
}
html.cf-word .mode-switch button[aria-pressed="true"] {
  background: var(--accent); color: var(--surface); box-shadow: 0 2px 0 var(--accent-hover);
}
html.cf-word .mode-bar > p { font-size: 13px; color: var(--muted); margin: 0; }

html.cf-word .game-layout {
  display: grid; grid-template-columns: minmax(260px, 0.88fr) minmax(0, 1.12fr);
  gap: 44px; align-items: start; padding-bottom: 36px;
}
html.cf-word .clue-panel { padding-top: 4px; }
html.cf-word .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
html.cf-word h2 { font-size: 24px; line-height: 1.25; margin: 0; }
html.cf-word .section-heading > span { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
html.cf-word .panel-description { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 6px 0 18px; }

html.cf-word #clues { list-style: none; margin: 0; padding: 0; }
html.cf-word #clues li {
  display: flex; gap: 14px; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
html.cf-word #clues li:first-child { padding-top: 0; }
html.cf-word #clues .clue-index {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 7px; display: grid; place-items: center;
  min-width: 32px; height: 32px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
html.cf-word #clues .active {
  align-items: flex-start; padding: 16px 18px; margin-bottom: 8px;
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-left: 4px solid var(--accent); border-radius: 10px;
  box-shadow: 0 2px 0 var(--line), var(--shadow-sm);
  animation: open-clue 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
html.cf-word #clues .active .clue-index { background: var(--accent); color: var(--surface); border-color: var(--accent); margin-top: 2px; }
html.cf-word #clues p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
html.cf-word #clues .active p { font-size: 19px; line-height: 1.45; color: var(--ink); font-weight: 600; }
html.cf-word #clues .locked .clue-index { background: var(--bg); color: var(--muted); }
html.cf-word #clues .locked p { font-size: 12px; color: var(--muted); }
html.cf-word .lock-icon { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 1.8; margin-left: auto; flex-shrink: 0; }
html.cf-word .quiet-button {
  border: 0; background: none; color: var(--accent); padding: 6px 0;
  font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
html.cf-word #clue-history { display: none; }
html.cf-word .clue-tip { display: none; }
html.cf-word .side-note { padding-top: 16px; }
html.cf-word .mini-tiles,
html.cf-word .side-note h2,
html.cf-word .side-note > p:not(.independent-note) { display: none; }
html.cf-word .hint-link {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: 13px; font-weight: 600; color: var(--accent); min-height: 44px;
}
html.cf-word .hint-link:hover { color: var(--accent-hover); text-decoration: underline; }
html.cf-word .daily-reset {
  display: flex; align-items: center; gap: 10px;
  padding-top: 16px; border-top: 1px solid var(--line); margin-top: 14px;
  color: var(--muted); font-size: 12px;
}
html.cf-word .live-dot { width: 8px; height: 8px; background: var(--correct); border-radius: 50%; flex-shrink: 0; }
html.cf-word .daily-reset strong { font-variant-numeric: tabular-nums; color: var(--ink); font-size: 14px; font-weight: 700; display: inline-block; margin-top: 2px; }
html.cf-word .side-note .independent-note { font-size: 12px; margin: 14px 0 0; color: var(--muted); line-height: 1.7; }

/* Board Panel & Tactile Letterpress Tiles */
html.cf-word .board-panel {
  padding: 16px 24px 14px; background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 4px 0 var(--line), var(--shadow-md);
}
html.cf-word .board-caption {
  display: flex; justify-content: space-between; gap: 8px;
  color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 10px; font-variant-numeric: tabular-nums;
}
html.cf-word #assisted-label { color: var(--present); font-weight: 700; }
html.cf-word #board { display: grid; gap: 6px; max-width: 316px; margin: auto; cursor: text; }
html.cf-word .board-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
html.cf-word .board-row.shake { animation: row-shake 340ms ease; }
@keyframes row-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
html.cf-word .tile {
  aspect-ratio: 1; min-height: 0; display: grid; place-items: center;
  font-size: 24px; line-height: 1; font-weight: 700;
  background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 8px; text-transform: uppercase; color: var(--ink);
  box-shadow: 0 2px 0 var(--line);
  transition: border-color 140ms ease, background-color 140ms ease;
}
html.cf-word .board-row.current .tile { border-color: var(--line-strong); background: var(--surface); }
html.cf-word .board-panel:focus-within .board-row.current .tile { border-color: var(--accent); }
html.cf-word .tile.filled { border-color: var(--ink); background: var(--surface); box-shadow: 0 2px 0 var(--ink); }
html.cf-word .tile.pop { animation: tile-pop 140ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes tile-pop {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.07); }
  100% { transform: scale(1); }
}
html.cf-word .tile.correct, html.cf-word .key.correct, html.cf-word .color-key .correct {
  background: var(--correct); color: var(--surface); border-color: var(--correct); box-shadow: 0 2px 0 var(--ink);
}
html.cf-word .tile.present, html.cf-word .key.present, html.cf-word .color-key .present {
  background: var(--present); color: var(--surface); border-color: var(--present); box-shadow: 0 2px 0 var(--ink);
}
html.cf-word .tile.absent, html.cf-word .key.absent, html.cf-word .color-key .absent {
  background: var(--absent); color: var(--surface); border-color: var(--absent); box-shadow: 0 2px 0 var(--ink);
}
html.cf-word .board-row.latest .tile {
  animation: letter-reveal 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i) * 45ms);
}
@keyframes letter-reveal {
  from { opacity: 0.7; transform: translateY(4px) scale(0.95); }
  to { opacity: 1; transform: none; }
}
@keyframes open-clue {
  from { opacity: 0.5; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

html.cf-word #answer-form { max-width: 316px; margin: 10px auto 0; }
html.cf-word #answer {
  width: 100%; min-height: 44px; background: var(--bg);
  border: 1.5px solid var(--line-strong); color: var(--ink);
  border-radius: var(--radius-sm); font-size: 16px; padding: 8px 12px;
  caret-color: var(--accent); letter-spacing: 0.06em; font-weight: 600;
}
html.cf-word #answer::placeholder { color: var(--muted); letter-spacing: 0; font-weight: 400; }
html.cf-word #feedback {
  min-height: 20px; font-size: 13px; font-weight: 600; line-height: 1.45;
  color: var(--accent); text-align: center; margin: 5px 0 6px;
}
html.cf-word #keyboard { display: flex; flex-direction: column; gap: 6px; margin: auto; max-width: 416px; }
html.cf-word .keyboard-row { display: flex; justify-content: center; gap: 5px; }
html.cf-word .key {
  border: 1px solid var(--line-strong); border-radius: 7px;
  color: var(--ink); background: var(--surface-2);
  padding: 0; min-width: 0; flex: 1; height: 44px; min-height: 44px;
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 2px 0 var(--line-strong);
  transition: transform 80ms ease, background-color 120ms ease;
}
html.cf-word .key:hover:not(:disabled) { background: var(--bg); }
html.cf-word .key:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
html.cf-word .key.wide { flex: 1.65; font-size: 12px; }
html.cf-word .key.enter { background: var(--accent); color: var(--surface); border-color: var(--accent); box-shadow: 0 2px 0 var(--accent-hover); }
html.cf-word .key.enter:hover:not(:disabled) { background: var(--accent-hover); }
html.cf-word .key svg { width: 18px; height: 18px; }
html.cf-word .keyboard-note { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 12px; }
html.cf-word .color-key {
  display: flex; justify-content: center; gap: 16px;
  font-size: 12px; font-weight: 500; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line);
}
html.cf-word .color-key > span { display: flex; align-items: center; gap: 6px; }
html.cf-word .color-key i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; box-shadow: none !important; }

html.cf-word #result { max-width: 380px; border-top: 1px solid var(--line); margin: 20px auto 0; padding-top: 18px; }
html.cf-word #result h2 { font-size: 26px; }
html.cf-word #result-copy { font-size: 14px; color: var(--muted); margin: 8px 0 16px; line-height: 1.7; }
html.cf-word .result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
html.cf-word .primary, html.cf-word .secondary {
  border: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 10px 20px;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
html.cf-word .primary { background: var(--accent); color: var(--surface); box-shadow: 0 2px 0 var(--accent-hover); }
html.cf-word .primary:hover { background: var(--accent-hover); }
html.cf-word .primary.copied { background: var(--correct); color: var(--surface); box-shadow: 0 2px 0 var(--ink); }
html.cf-word .secondary { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); }
html.cf-word #share-message { font-size: 12px; color: var(--muted); }
html.cf-word textarea {
  width: 100%; min-height: 104px; background: var(--bg);
  border: 1px solid var(--line-strong); color: var(--ink); border-radius: var(--radius-sm); padding: 12px;
}

html.cf-word .stats-panel {
  padding: 20px 24px; background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: 12px; margin-bottom: 20px; box-shadow: 0 2px 0 var(--line);
}
html.cf-word .stats-panel h2 { margin-bottom: 14px; font-size: 20px; }
html.cf-word #stats-values { display: flex; gap: 36px; flex-wrap: wrap; }
html.cf-word #stats-values div { display: flex; flex-direction: column; }
html.cf-word #stats-values strong { font-family: Display, Georgia, serif; font-size: 32px; font-variant-numeric: tabular-nums; color: var(--ink); }
html.cf-word #stats-values span { font-size: 12px; font-weight: 600; color: var(--muted); }
html.cf-word .stats-panel p { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

html.cf-word .daily-help, html.cf-word .how-to-play, html.cf-word .faq {
  border-top: 1px solid var(--line); padding: 36px 0;
}
html.cf-word .content-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
html.cf-word .content-heading h2 { font-size: 26px; }
html.cf-word .content-heading > p { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0; }
html.cf-word .section-description { font-size: 14px; color: var(--muted); margin: 10px 0 22px; max-width: 80ch; }
html.cf-word .section-description a { color: var(--accent); font-weight: 600; }
html.cf-word .hint-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
html.cf-word .hint-list details { border-bottom: 1px solid var(--line); }
html.cf-word .hint-list details:first-child { border-top: 1px solid var(--line); }
html.cf-word summary {
  cursor: pointer; min-height: 48px; display: flex; align-items: center;
  gap: 12px; list-style: none; font-size: 14px; font-weight: 600; color: var(--ink); padding: 12px 0;
}
html.cf-word summary::-webkit-details-marker { display: none; }
html.cf-word summary > span:first-child { color: var(--accent); font-size: 12px; font-weight: 700; }
html.cf-word .plus-icon {
  stroke: var(--accent); stroke-width: 2; fill: none;
  width: 16px; height: 16px; margin-left: auto; flex-shrink: 0; transition: transform 180ms ease;
}
html.cf-word details[open] .plus-icon { transform: rotate(45deg); }
html.cf-word details > p { font-size: 14px; color: var(--muted); line-height: 1.75; margin: 0 0 16px; }
html.cf-word .answer-reveal {
  padding: 8px 20px 14px; background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: 12px; align-self: start; box-shadow: 0 2px 0 var(--line);
}
html.cf-word .answer-reveal summary { gap: 14px; padding: 14px 0; }
html.cf-word .answer-reveal summary > .answer-symbol {
  display: grid; place-items: center; width: 36px; height: 36px;
  background: var(--surface-2); color: var(--accent); font-family: Display, Georgia, serif;
  font-size: 22px; border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0;
}
html.cf-word .answer-reveal small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 400; }
html.cf-word .answer-reveal .spoiler-note { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
html.cf-word #answer-explanation .answer-word {
  display: block; font-family: Display, Georgia, serif; font-size: 30px; font-weight: 400;
  letter-spacing: 0.08em; color: var(--correct); margin: 10px 0 14px; text-transform: uppercase;
}
html.cf-word #answer-explanation ol { padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.75; }
html.cf-word #answer-explanation li { padding: 3px 0; }

html.cf-word .rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 24px; }
html.cf-word .rules article {
  position: relative; padding: 20px 20px 20px 56px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 2px 0 var(--line);
}
html.cf-word .step-number {
  position: absolute; left: 18px; top: 18px; color: var(--accent);
  border: 1px solid var(--line-strong); background: var(--surface-2);
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
html.cf-word .rules h3 { font-size: 16px; margin: 0 0 8px; font-weight: 700; color: var(--ink); }
html.cf-word .rules p { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 0; }

html.cf-word .faq h2 { font-size: 26px; margin-bottom: 18px; }
html.cf-word .faq details { max-width: 800px; border-bottom: 1px solid var(--line); }
html.cf-word .faq summary::after { content: '+'; margin-left: auto; color: var(--accent); font-size: 20px; }
html.cf-word .faq details[open] summary::after { content: '−'; }
html.cf-word .faq details > p { font-size: 14px; max-width: 72ch; }
html.cf-word .storage-notice { padding: 14px; text-align: center; background: var(--present); color: var(--surface); font-size: 13px; font-weight: 600; }

/* Word-Game Guide & Archive Pages */
html.cf-word .legal { max-width: 820px; padding: 28px 32px 48px; }
html.cf-word .guide h1 { max-width: 24ch; line-height: 1.12; margin-bottom: 14px; }
html.cf-word .guide h2 { font-size: 26px; margin: 34px 0 14px; }
html.cf-word .guide p, html.cf-word .guide li { font-size: 16px; line-height: 1.8; color: var(--muted); }
html.cf-word .guide a { color: var(--accent); font-weight: 500; text-decoration: underline; }
html.cf-word .guide ol { padding-left: 24px; }
html.cf-word .guide li { margin: 8px 0; }
html.cf-word .guide table, html.cf-word .daily-guide-table {
  width: 100%; border-collapse: collapse; font-size: 14px; margin: 18px 0 24px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
html.cf-word .guide caption, html.cf-word .daily-guide-table caption { text-align: left; color: var(--ink); font-weight: 700; margin-bottom: 10px; }
html.cf-word .guide th, html.cf-word .guide td,
html.cf-word .daily-guide-table th, html.cf-word .daily-guide-table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top;
}
html.cf-word .guide th, html.cf-word .daily-guide-table th { color: var(--ink); font-weight: 700; background: var(--surface-2); }
html.cf-word .guide td, html.cf-word .daily-guide-table td { color: var(--muted); }
html.cf-word .daily-guide-table tbody tr:hover { background: var(--bg); }
html.cf-word .breadcrumbs, html.cf-word .review-date { font-size: 12px !important; color: var(--muted) !important; }
html.cf-word .guide-faq { border-top: 0; padding-top: 8px; }
html.cf-word .guide .primary { color: var(--surface); text-decoration: none; margin: 10px 0; }
html.cf-word .daily-guide-clues { list-style: decimal; padding-left: 22px; margin: 16px 0; }
html.cf-word .daily-guide-clues li { padding: 4px 0; }
html.cf-word .daily-guide-clues details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0 14px;
}
html.cf-word .daily-guide-spoiler {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 2px 16px; margin: 14px 0; box-shadow: var(--shadow-sm);
}

/* Responsive Breakpoints */
@media (min-width: 1450px) {
  .library-header { padding-inline: max(48px, calc((100% - 1200px) / 2)); }
  .directory main, .library-footer { width: min(1200px, calc(100% - 96px)); }
}

@media (max-width: 1050px) {
  .library-header { padding-inline: 28px; }
  .directory main, .library-footer { width: calc(100% - 56px); }
  .discovery-intro { gap: 20px 32px; }
  .game-grid { gap: 18px; }
  .game-info { padding: 16px; }
  .game-detail { gap: 32px; }
  .guide-layout { gap: 36px; }
  .home-faq { gap: 36px; }
  .word-symbol { display: none; }
  html.cf-word main { padding: 20px 24px 0; }
  html.cf-word .game-layout { gap: 30px; }
}

@media (max-width: 760px) {
  .library-header { padding: 12px 18px 0; min-height: 0; flex-wrap: wrap; gap: 6px; }
  .directory main, .library-footer { width: calc(100% - 36px); }
  .library-brand { font-size: 25px; }
  .library-header nav {
    width: 100%; gap: 4px; overflow-x: auto; white-space: nowrap;
    padding-bottom: 10px; scrollbar-width: none;
  }
  .library-header nav::-webkit-scrollbar { display: none; }
  .library-header nav a, .library-header .word-stats { font-size: 13px; padding: 6px 11px; min-height: 40px; }

  .discovery-intro { display: block; margin-top: 14px; padding: 20px 18px; }
  .discovery-intro h1 { font-size: 40px; margin-bottom: 14px; }
  .discovery-intro > div { max-width: 100%; padding-left: 0; border-left: 0; }
  .discovery-intro p { font-size: 15px; }

  .search-kbd { display: none; }
  .game-search { gap: 8px; padding: 6px 7px 6px 12px; min-height: 54px; }
  .search-submit { font-size: 13px !important; padding: 9px 14px; min-height: 44px; }
  .recognition { gap: 6px; padding: 10px 0; }
  .recognition > span { width: 100%; font-size: 12px; }
  .recognition button { font-size: 12px; min-height: 34px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 12px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { padding: 6px 12px; font-size: 12px; min-height: 40px; }

  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .daily-hub { padding: 14px; }
  .daily-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .daily-slot:last-child { grid-column: 1 / -1; }
  .game-info { padding: 16px; }
  .game-info::before { top: 17px; right: 16px; }
  .game-info h3 { font-size: 22px; }
  .game-info > p { font-size: 13px; }
  .game-category { font-size: 12px; }
  .game-actions { flex-wrap: wrap; gap: 8px; }
  .play-link, .guide-link { font-size: 12px; padding: 8px 12px; }

  .word-banner { margin: 40px 0; display: block; padding: 22px 20px; }
  .word-banner > a { margin-top: 16px; }
  .home-faq { display: block; margin-bottom: 44px; }
  .home-faq h2 { font-size: 28px; }
  .home-faq h2 br { display: none; }
  .home-faq > div:first-child { margin-bottom: 18px; }
  .library-footer { display: block; padding: 28px 0 36px; }
  .library-footer nav { margin-top: 16px; }
  .library-footer .independence { margin-top: 16px; font-size: 12px; }

  .page-intro { padding: 26px 0 18px; }
  .page-intro h1 { font-size: 34px; }
  .page-intro > p { font-size: 15px; }
  .game-detail { display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding-bottom: 24px; }
  .detail-visual { order: 1; }
  .detail-intro { order: 0; }
  .detail-intro h1 { font-size: 38px; }
  .detail-intro .recognition-cue { font-size: 17px; }
  .guide-layout { display: block; padding-bottom: 28px; }
  .guide-sources { position: static; margin-top: 28px; }
  .section-line { display: block; }
  .section-line h2 { font-size: 24px; margin-bottom: 10px; }
  .compact-games { grid-template-columns: 1fr; gap: 12px; }
  .guide-index { grid-template-columns: 1fr; gap: 12px; }
  .back-top { right: 16px; bottom: 16px; }

  /* Mobile Daily Word Game */
  html.cf-word main, html.cf-word .legal { padding: 16px 18px 28px; }
  html.cf-word .game-heading { align-items: center; margin-bottom: 14px; }
  html.cf-word h1 { font-size: 30px; }
  html.cf-word .mode-switch { width: 100%; }
  html.cf-word .mode-switch button { flex: 1; padding: 8px 14px; }
  html.cf-word .mode-bar > p { display: none; }
  html.cf-word .game-layout { display: flex; flex-direction: column; gap: 16px; padding-bottom: 28px; }
  html.cf-word .clue-panel { width: 100%; padding: 0; }
  html.cf-word .panel-description, html.cf-word .side-note { display: none; }
  html.cf-word #clues { margin-top: 10px; }
  html.cf-word #clues .locked, html.cf-word #clues .past { display: none; }
  html.cf-word #clues.show-history .past { display: flex; padding: 10px 0; border-bottom: 1px solid var(--line); }
  html.cf-word #clues .active p { font-size: 17px; }
  html.cf-word #clue-history.visible { display: block; min-height: 36px; margin-top: 6px; }
  html.cf-word .board-panel { width: 100%; padding: 16px 14px; border-radius: 14px; }
  html.cf-word #board, html.cf-word #answer-form { max-width: 300px; }
  html.cf-word #board, html.cf-word .board-row { gap: 5px; }
  html.cf-word .tile { font-size: 22px; }
  html.cf-word .hint-grid, html.cf-word .rules { grid-template-columns: 1fr; gap: 16px; }
  html.cf-word .guide th, html.cf-word .guide td,
  html.cf-word .daily-guide-table th, html.cf-word .daily-guide-table td { padding: 9px 8px; font-size: 13px; }
}

@media (max-width: 500px) {
  .game-grid { grid-template-columns: 1fr; gap: 18px; }
  .game-info { padding: 18px; }
  .game-info h3 { font-size: 24px; }
  .game-info > p { font-size: 14px; max-width: 100%; }
  .game-actions { flex-wrap: nowrap; gap: 12px; }
  .play-link, .guide-link { font-size: 13px; padding: 10px 14px; }
}

@media (max-width: 350px) {
  .directory main, .library-footer { width: calc(100% - 24px); }
  .library-header { padding-inline: 12px; }
  .discovery-intro h1 { font-size: 34px; }
  html.cf-word main { padding-inline: 12px; }
  html.cf-word .tile { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
