:root {
  color-scheme: light;
  --paper: #fff7e9;
  --ink: #31251f;
  --muted: #665046;
  --line: #e7cdb2;
  --white: #fffdf7;
  --accent: #ad3e2a;
  --accent-hover: #8e2f20;
  --sage: #3f684d;
  --inverse: #ffffff;
  --accent-soft: #f7ded1;
  --sand: #f6e5ce;
  --hit: #296045;
  --miss: #992c25;
  --hint: #784709;
  --head: Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); scrollbar-color: var(--accent) var(--paper); }
body { color: var(--ink); font: 16px/1.55 var(--body); margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .22em; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.035em; line-height: 1.07; }
h1 { font-size: clamp(2.65rem, 6vw, 5.55rem); }
h2 { font-size: clamp(1.85rem, 3.5vw, 2.9rem); }
h3 { font-size: 1.42rem; }
p { color: var(--muted); }
.shell { width: min(1184px, calc(100% - 56px)); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; background: var(--white); padding: 10px 16px; }
.site-header { border-bottom: 1px solid var(--line); }
.header-row, .footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; }
.wordmark { display: inline-flex; min-height: 44px; gap: 9px; align-items: center; font: 700 1.48rem/1 var(--head); letter-spacing: -.05em; color: var(--ink); text-decoration: none; }
.wordmark span span { color: var(--accent); }
.header-row nav, .footer-row nav { display: flex; gap: clamp(10px, 3vw, 32px); }
.header-row nav a, .footer-row nav a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 650; display: inline-flex; min-height: 44px; align-items: center; }
.header-row nav a:hover, .footer-row nav a:hover { color: var(--accent); text-decoration: underline; }
.site-footer { margin-top: 78px; border-top: 1px solid var(--line); background: var(--sand); }
.footer-row { min-height: 94px; }
.intro { text-align: center; padding-block: 37px 28px; }
.intro h1 { max-width: 1100px; margin: 0 auto; font-size: clamp(2.65rem, 5.05vw, 4.5rem); text-wrap: balance; }
.intro p { font-size: clamp(1rem,2vw,1.25rem); margin-top: 13px; }
.stage { --dq-cover-height: clamp(390px, 43vw, 533px); position: relative; block-size: var(--dq-cover-height); background: var(--sand); border: 1px solid var(--line); overflow: hidden; border-radius: 27px; }
.stage-cover, .stage-loading, .stage iframe, .stage-failure { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-cover { display: grid; place-items: center; }
.cover-pictures { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--paper); overflow: hidden; }
.cover-pictures picture { display: block; min-width: 0; min-height: 0; }
.cover-pictures img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; object-position: center; }
.cover-pictures::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, color-mix(in srgb, var(--ink) 62%, transparent), transparent 58%); pointer-events: none; }
.cover-single { grid-template-columns: 1fr; }
.cover-content { position: absolute; z-index: 1; inset: auto 0 max(31px, 24%); display: grid; justify-items: center; gap: 11px; }
.cover-content p { color: var(--inverse); font-family: var(--head); font-size: clamp(1.55rem,3.2vw,2.35rem); line-height: 1.14; text-shadow: 0 2px 11px var(--ink), 0 1px 3px var(--ink); }
.primary-button, .quiet-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: 8px; border-radius: 999px; padding: 8px 18px; font-weight: 700; text-decoration: none; }
.primary-button { color: var(--inverse); background: var(--accent); border: 1px solid var(--accent); }
.primary-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.play-button { padding-inline: 26px; min-height: 53px; border: 2px solid var(--sand); box-shadow: 0 3px 12px color-mix(in srgb, var(--ink) 48%, transparent); font-size: 1.07rem; }
.play-button span { font-size: .75em; }
.quiet-button { background: var(--white); border: 1px solid var(--line); color: var(--ink); }
.quiet-button:hover { background: var(--sand); border-color: var(--accent); }
.quiet-button[aria-pressed="true"] { color: var(--accent-hover); border-color: var(--accent); background: var(--accent-soft); }
.stage iframe { border: 0; background: var(--paper); }
.stage[data-gf-state="playing"] { block-size: calc(var(--dq-player-height, var(--dq-cover-height)) + 2px); }
.stage-loading, .stage-failure { display: grid; place-content: center; justify-items: center; gap: 15px; color: var(--muted); font-weight: 650; }
.loading-mark { width: 38px; height: 38px; border: 3px solid var(--accent); border-radius: 50%; position: relative; animation: search .8s ease-in-out infinite alternate; }
.loading-mark::after { content: ""; width: 18px; height: 4px; position: absolute; right: -12px; bottom: -4px; background: var(--accent); border-radius: 30px; transform: rotate(44deg); }
@keyframes search { to { transform: translate(-8px, -6px) rotate(12deg); } }
.engagement { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-status:empty, [data-share-status]:empty, [data-gf-comment-msg]:empty { display: none; }
.share-status { color: var(--muted); }
.puzzles-section { margin-top: 47px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.puzzle-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.puzzle-card { color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 19px; overflow: hidden; text-decoration: none; transition: transform .18s, border-color .18s; }
.puzzle-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.puzzle-card picture { display: block; min-width: 0; }
.puzzle-card img { aspect-ratio: 16/9; width: 100%; height: auto; object-fit: cover; }
.card-label { position: relative; padding: 14px 39px 18px 16px; }
.card-label h3 { margin-top: 6px; }
.card-arrow { position: absolute; right: 16px; bottom: 17px; color: var(--accent); font-weight: 750; }
.difficulty { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .76rem; line-height: 1.8; font-weight: 750; color: var(--hit); background: var(--paper); }
.difficulty.medium { color: var(--hint); background: var(--sand); }
.difficulty.hard { color: var(--miss); background: var(--accent-soft); }
.how-to { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 27px; background: var(--sand); border-radius: 24px; padding: min(4vw,38px); margin-top: 58px; }
.how-to p, .faq p, .comments > p, .prose-page p { margin-top: 11px; }
.faq, .comments, .prose-page, .puzzle-copy, .answer, .next-puzzles { max-width: 780px; margin: 56px auto 0; }
.faq details, .answer { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); margin-top: 18px; }
summary { cursor: pointer; min-height: 44px; padding: 13px 5px; font-weight: 700; }
.faq details p { margin: 0; padding: 0 5px 16px; }
.comments { border-top: 1px solid var(--line); padding-top: 23px; }
.comment { padding-block: 10px; border-bottom: 1px solid var(--line); }
.comment time { font-size: .86rem; color: var(--muted); }
.comment-form { display: grid; gap: 10px; align-items: start; justify-items: start; margin-top: 18px; max-width: 540px; }
.comment-form label { display: grid; width: 100%; gap: 3px; font-weight: 650; }
.comment-form label span { display: contents; color: var(--muted); font-weight: 400; }
.comment-form input, .comment-form textarea { padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--muted) 68%, var(--line)); min-height: 44px; border-radius: 10px; color: var(--ink); background: var(--white); }
.prose-page h1, .puzzle-intro h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.prose-page h2 { margin-top: 29px; font-size: 1.6rem; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: .91rem; color: var(--muted); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.puzzle-intro { margin: 13px 0 24px; }
.puzzle-intro h1 { margin-top: 7px; }
.puzzle-intro p, .puzzle-copy p + p { margin-top: 12px; }
.answer { margin-top: 24px; border-top: 1px solid var(--line); }
.answer img { border-radius: 14px; width: 100%; height: auto; }
.next-puzzles { margin-top: 34px; }
.next-puzzles a { display: inline-flex; min-height: 44px; align-items: center; gap: 5px; }
.next-puzzles ul { color: var(--muted); margin: 6px 0 0; padding-inline-start: 22px; }
.player-document .game { max-width: 1440px; padding: 12px; margin-inline: auto; }
.solo-home { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 6px; font-weight: 650; }
.in-frame .solo-only { display: none !important; }
.game-page-title { font-size: clamp(2rem, 6vw, 4rem); margin: 0 0 16px; }
.current-puzzle-link { margin-top: 12px; }
.solo-copy { margin: 26px auto 52px; }
.game-top { display: flex; align-items: center; justify-content: space-between; gap: 5px 12px; }
.game-top > div:first-child { min-width: 0; }
.game-top h2 { font-size: clamp(1.35rem,4vw,2.2rem); margin-bottom: 4px; letter-spacing: -.03em; }
.game-progress { font-size: .88rem; }
.game-stats { display: flex; flex: 0 0 auto; align-items: center; min-width: 0; gap: clamp(7px,2vw,15px); white-space: nowrap; }
.game-stats > span { display: grid; justify-items: center; font-size: .72rem; line-height: 1.18; color: var(--muted); }
.game-stats > span strong { font-size: 1rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.progress-dots { display: inline-flex; gap: 3px; margin-left: 4px; }
.progress-dots i { width: 7px; height: 7px; border: 1px solid var(--sage); border-radius: 50%; }
.progress-dots .filled { background: var(--sage); }
.hint-button { font-size: .84rem; gap: 5px; padding-inline: 11px; }
.hint-button:disabled { cursor: default; opacity: .6; }
.game-message { min-height: 1.5em; margin-block: 3px 5px; font-size: .87rem; }
.boards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.board { aspect-ratio: 1672 / 941; position: relative; display: block; width: 100%; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 12px; background: var(--sand); cursor: crosshair; touch-action: manipulation; user-select: none; }
.board img { width: 100%; height: 100%; pointer-events: none; }
.board img:not([src]) { visibility: hidden; }
.board-marker, .crosshair { position: absolute; pointer-events: none; transform: translate(-50%,-50%); border-radius: 50%; }
.board-marker { width: max(var(--diameter, 10%), 44px); aspect-ratio: 1; border: 3px solid var(--hit); box-shadow: 0 0 0 2px var(--paper); }
.board-marker.hint { border: 3px dashed var(--hint); background: color-mix(in srgb, var(--hint) 23%, transparent); }
.board-marker.miss { --diameter: 0%; width: 25px; border-color: var(--miss); animation: miss .45s ease both; }
@keyframes miss { to { opacity: 0; transform: translate(-50%, -50%) scale(1.33); } }
.crosshair { width: 25px; height: 25px; border: 2px solid var(--inverse); box-shadow: 0 0 0 2px var(--ink); }
.crosshair::after { content: "+"; font: 700 19px/20px var(--body); position: absolute; inset: 0; color: var(--inverse); text-shadow: 1px 1px 2px var(--ink); }
.results { background: var(--white); color: var(--ink); max-width: min(470px, calc(100vw - 28px)); max-height: calc(100% - 28px); border: 1px solid var(--line); border-radius: 22px; padding: 0; box-shadow: 0 8px 32px color-mix(in srgb, var(--ink) 32%, transparent); }
.results::backdrop { background: color-mix(in srgb, var(--ink) 64%, transparent); }
.result-card { position: relative; padding: 28px 20px 20px; }
.result-card h2 { padding-right: 29px; font-size: clamp(1.6rem,5vw,2.22rem); }
.result-card p { margin-top: 9px; }
.result-close { position: absolute; top: 5px; right: 5px; padding: 0; width: 44px; font-size: 1.55rem; }
.result-actions, .round-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 13px; }
.round-actions a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 768px) {
  .boards { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .embedded-landscape .boards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) and (orientation: landscape) {
  .player-document:not(.in-frame) .boards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 28px); }
  .header-row { min-height: 61px; }
  .wordmark { font-size: 1.3rem; gap: 6px; }
  .wordmark svg { width: 30px; height: 30px; }
  .header-row nav a { font-size: .82rem; }
  .intro { padding-block: 23px 18px; }
  .intro h1 { font-size: clamp(2rem,8vw,3.3rem); }
  .intro p { margin-top: 8px; }
  .stage { --dq-cover-height: max(410px, 120px + (100vw - 54px) * 1.126); border-radius: 17px; }
  .cover-pictures { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .cover-pictures img { object-fit: cover; }
  .cover-single { grid-template-rows: 1fr; }
  .cover-content { bottom: 32%; }
  .puzzle-grid { grid-template-columns: 1fr; gap: 12px; }
  .puzzle-card { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1fr); min-height: 108px; }
  .puzzle-card img { height: 100%; min-height: 108px; }
  .card-label { align-self: center; }
  .puzzles-section { margin-top: 31px; }
  .how-to { grid-template-columns: 1fr; gap: 22px; padding: 20px; }
  .puzzle-intro h1, .prose-page h1 { font-size: clamp(2.15rem,9vw,3.3rem); }
  .game-top { flex-wrap: wrap; row-gap: 6px; }
  .game-top > div:first-child { flex: 1 1 100%; }
  .game-top h2 { font-size: 1.35rem; }
  .game-stats { gap: 7px; margin-left: 0; width: 100%; justify-content: space-between; white-space: normal; }
  .hint-button { min-height: 44px; }
  .player-document .game { padding: 10px 8px 8px; }
  .board { border-radius: 9px; }
}
.footer-row { flex-wrap: wrap; padding-block: 12px; }
.footer-row nav { flex-wrap: wrap; }
.catalog-head { margin: 22px 0 16px; }
.catalog-head h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); }
.catalog-head p, .catalog-copy p + p { margin-top: 9px; }
.catalog-copy { max-width: 72ch; margin-inline: 0; }
.return-links, .print-jumps { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.print-jumps a { display: inline-flex; align-items: center; min-height: 44px; }
.print-group { margin-top: 28px; scroll-margin-top: 12px; }
.catalog-filters { margin: 26px 0 36px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); display: flex; flex-wrap: wrap; gap: 16px 28px; }
.catalog-filters h2 { font: 700 .92rem/1.25 var(--body); margin-bottom: 7px; letter-spacing: 0; }
.catalog-filters ul { display: flex; flex-wrap: wrap; list-style: none; gap: 6px; padding: 0; margin: 0; }
.catalog-filters a { display: inline-flex; min-height: 40px; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 650; }
.catalog-filters a:hover, .catalog-filters a[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent); }
.catalog-filters a span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .88em; }
.catalog-end { margin: 24px 0; }
.guide-copy { max-width: 780px; margin: 54px auto 0; }
.guide-copy h2:not(:first-child) { margin-top: 32px; }
.guide-copy p, .guide-copy li + li { margin-top: 12px; }
.daily-copy { background: var(--sand); padding: min(5vw,30px); border-radius: 20px; }
.daily-page time { font-weight: 650; }
.daily-today { margin: 0 0 20px; }
.daily-today p { margin-top: 8px; }
.daily-article h2:not(:first-child) { margin-top: 22px; }
.daily-article h2 + p, .previous-daily { margin-top: 12px; }
.puzzle-links, .print-action { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 19px; }
.print-pair, .print-key { display: none; }
/* Player guides */
.geo-guide .guide-lede { font-size: 1.12rem; }
.geo-guide h3 { margin-top: 1.1rem; }
.geo-guide li + li { margin-top: .45rem; }
.geo-guide img { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.geo-guide .faq { margin-top: 32px; }
.answer-index details { margin-top: 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; }
.answer-index-scroll { overflow-x: auto; padding-block: 4px 12px; }
.answer-index table { width: 100%; min-width: 31rem; border-collapse: collapse; text-align: left; }
.answer-index th, .answer-index td { padding: 9px 10px; vertical-align: top; border-bottom: 1px solid var(--line); }
.answer-index thead th { background: var(--sand); }
.answer-index tbody th { min-width: 9rem; }

@media (max-width: 600px) {
  .answer-index-scroll { overflow: visible; }
  .answer-index table { display: block; min-width: 0; }
  .answer-index thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .answer-index tbody, .answer-index tbody tr { display: block; }
  .answer-index tbody tr { border-bottom: 1px solid var(--line); padding: 12px 0; }
  .answer-index tbody th, .answer-index td {
    display: block;
    min-width: 0;
    border: 0;
    padding: 0;
    overflow-wrap: anywhere;
  }
  .answer-index td:nth-child(2) {
    display: inline-block;
    margin: 4px 0 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--sand);
    font-size: .8rem;
  }
}
.printable-page .card-tip { margin: 6px 0 0; font-size: .88rem; }

@media screen and (min-width: 651px) {
  .printable-page .puzzle-card picture {
    aspect-ratio: 16 / 9;
    content-visibility: auto;
  }
}

@media print {
  .site-header, .site-footer, .puzzle-page > :not(.puzzle-intro, .print-pair, .print-key) { display: none !important; }
  html, body { background: var(--inverse); }
  .puzzle-page { width: 100%; margin: 0; }
  .puzzle-intro h1 { font-size: 24pt; }
  .print-pair { display: grid; margin-top: 8mm; grid-template-columns: 1fr 1fr; gap: 5mm; break-inside: avoid; }
  .print-pair img { width: 100%; height: auto; }
  .print-key { display: block; break-before: page; }
  .print-key h2 { font-size: 20pt; margin-bottom: 6mm; }
  .print-key img { width: min(100%, 180mm); height: auto; }
  .printable-page .puzzle-grid { display: block; }
  .printable-page .puzzle-card { display: block; min-height: 0; break-inside: avoid; border: 0; }
  .printable-page .puzzle-card picture, .printable-page .puzzle-card img,
  .printable-page .card-arrow, .printable-page .card-tip, .printable-page .print-jumps { display: none; }
  .printable-page .card-label { padding: 3pt 0; }
  .printable-page .card-label h3 { display: inline; margin-left: 3pt; font-size: 11pt; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
