/* Free Mahjong Solitaire - site and game styles */
:root {
  --jade-900: #072a20;
  --jade-800: #0b3d2e;
  --jade-700: #0f5138;
  --jade-600: #156b49;
  --felt-1: #1b7a52;
  --felt-2: #0d4a33;
  --gold: #e3b341;
  --gold-soft: #f6dc8a;
  --ivory: #fffdf6;
  --ivory-2: #efe6cc;
  --tile-side: #c6ad74;
  --tile-edge: #7d6233;
  --ink: #1d2521;
  --muted: #55615b;
  --paper: #fbf8f0;
  --card: #ffffff;
  --line: #e3dccb;
  --danger: #c0392b;
  --focus: #3aa0ff;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .18);
  /*
   * Appearance. These values are the Classic look; themes.css redefines them per theme
   * (loaded and set before the first paint by the inline script in layout.php). Page styles use these names.
   */
  --page-bg: var(--paper);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-soft: #33403a;
  --heading: var(--jade-800);
  --link: var(--jade-600);
  --link-hover: var(--jade-800);
  --surface: var(--card);
  --surface-2: #f4f1e8;
  --soft-btn-text: var(--jade-800);
  --header-1: var(--jade-900);
  --header-2: var(--jade-800);
  --header-line: var(--gold);
  --header-text: #fff;
  --header-link: #e8f3ec;
  --header-hover: rgba(255, 255, 255, .12);
  --brand-hover: var(--gold-soft);
  --felt-3: var(--jade-900);
  --felt-text: #fff;
  --felt-text-2: #d4ecdf;
  --felt-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  --felt-panel: rgba(0, 0, 0, .25);
  --felt-line: rgba(255, 255, 255, .12);
  --bar-text: #d9efe3;
  --status-text: #e6f5ec;
  --help-text: #b9dcc9;
  --kbd-bg: rgba(0, 0, 0, .3);
  --btn-bg: rgba(255, 255, 255, .1);
  --btn-hover: rgba(255, 255, 255, .2);
  --btn-line: rgba(255, 255, 255, .25);
  --btn-text: #fff;
  --btn-primary-bg: var(--gold);
  --btn-primary-hover: var(--gold-soft);
  --btn-primary-text: #2b2205;
  --select-bg: var(--jade-800);
  --rail-item: rgba(255, 255, 255, .07);
  --rail-hover: rgba(255, 255, 255, .16);
  --rail-small: #cfe3d8;
  --rail-link: var(--gold-soft);
  --tile-mid: #fbf5e3;
  --tile-ring: rgba(125, 98, 51, .35);
  --tile-shadow: rgba(0, 0, 0, .45);
  --tile-blocked: brightness(.74) saturate(.65);
  --tile-pick-1: #fff8d6;
  --tile-pick-2: var(--gold-soft);
  --tile-pick-ring: var(--gold);
  --tile-pick-side: #c99a2b;
  --footer-bg: var(--jade-900);
  --footer-text: #cfe3d8;
  --footer-link: #fff;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-bg);
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; color: var(--heading); }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { width: min(1100px, 100% - 32px); margin-inline: auto; }

/* ------------------------------------------------------------ header */
.site-header {
  background: linear-gradient(180deg, var(--header-1), var(--header-2));
  color: var(--header-text);
  border-bottom: 2px solid var(--header-line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--header-text); text-decoration: none; font-family: Georgia, serif; font-size: 1.2rem; font-weight: 700; }
.brand:hover { color: var(--brand-hover); }
.brand img { width: 34px; height: 34px; }
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--header-link); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.site-nav .nav-search { display: inline-flex; min-height: 36px; align-items: center; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--header-hover); color: var(--header-text); }

/* -------------------------------------------------------------- game */
.game-section {
  background: radial-gradient(ellipse at 50% 30%, var(--felt-1), var(--felt-2) 70%, var(--felt-3));
  color: var(--felt-text);
  padding: 14px 0 18px;
}
.game-intro { text-align: center; margin-bottom: 10px; }
.game-intro h1 { color: var(--felt-text); font-size: clamp(1.4rem, 3.2vw, 2.1rem); margin: 4px 0 2px; text-shadow: var(--felt-shadow); }
.game-intro p { margin: 0; color: var(--felt-text-2); font-size: .95rem; }

.game { width: min(1240px, 100% - 16px); margin-inline: auto; }
.game-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  background: var(--felt-panel); border: 1px solid var(--felt-line);
  border-radius: var(--radius); padding: 8px 10px; margin-bottom: 10px;
}
.game-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--bar-text); }
.game-stats b { color: var(--felt-text); font-variant-numeric: tabular-nums; }
.game-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--btn-line); background: var(--btn-bg);
  color: var(--btn-text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--btn-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn[aria-pressed="false"] { opacity: .65; }
.select {
  min-height: 38px; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: .9rem;
  border: 1px solid var(--btn-line); background: var(--select-bg); color: var(--btn-text);
}

.board-wrap { display: flex; justify-content: center; align-items: flex-start; min-height: 300px; padding: 4px; overflow: hidden; }
.board { position: relative; margin: 0 auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; --tile-depth: 5px; }
.board-loading { color: var(--felt-text-2); padding: 40px 0; text-align: center; }
[data-mahjong].is-ready .board-loading { display: none; }

.tile {
  position: absolute; padding: 0; margin: 0; border: 0; cursor: pointer;
  border-radius: calc(var(--tile-depth) * 1.3);
  background: linear-gradient(150deg, var(--ivory) 0%, var(--tile-mid) 55%, var(--ivory-2) 100%);
  box-shadow:
    inset 0 0 0 1px var(--tile-ring),
    calc(var(--tile-depth) * .5) calc(var(--tile-depth) * .5) 0 0 var(--tile-side),
    var(--tile-depth) var(--tile-depth) 0 0 var(--tile-side),
    calc(var(--tile-depth) + 1px) calc(var(--tile-depth) + 1px) 2px 0 var(--tile-shadow);
  transition: filter .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.tile img { display: block; width: 100%; height: 100%; padding: 4% 5%; pointer-events: none; }
.highlight-free .tile.is-blocked { filter: var(--tile-blocked); }
.tile.is-blocked { cursor: default; }
.tile.is-free:hover { filter: brightness(1.06); }
.tile.is-selected {
  background: linear-gradient(150deg, var(--tile-pick-1), var(--tile-pick-2));
  box-shadow:
    inset 0 0 0 3px var(--tile-pick-ring),
    var(--tile-depth) var(--tile-depth) 0 0 var(--tile-pick-side),
    calc(var(--tile-depth) + 1px) calc(var(--tile-depth) + 1px) 4px 0 rgba(0, 0, 0, .5);
  transform: translate(-1px, -2px);
}
.tile.is-hint { animation: hint-pulse .9s ease-in-out 3; }
.tile.is-denied { animation: shake .32s ease; }
.tile.is-removing { animation: vanish .26s ease forwards; pointer-events: none; }

@keyframes hint-pulse {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 8px #7fffd4) brightness(1.15); }
}
@keyframes shake {
  0%, 100% { translate: 0; }
  25% { translate: -4px 0; }
  75% { translate: 4px 0; }
}
@keyframes vanish {
  to { opacity: 0; transform: scale(.7) translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .tile.is-hint, .tile.is-denied, .tile.is-removing { animation: none; transition: none; }
  .tile.is-hint { box-shadow: inset 0 0 0 3px #7fffd4; }
}

.game-status { min-height: 1.6em; margin: 8px 0 0; text-align: center; color: var(--status-text); font-size: .92rem; }
.game-help { margin: 4px 0 0; text-align: center; color: var(--help-text); font-size: .8rem; }
.game-help kbd { background: var(--kbd-bg); border-radius: 4px; padding: 0 5px; font-size: .78rem; }

.game-dialog {
  border: 0; border-radius: 16px; padding: 22px 24px; max-width: min(420px, 92vw);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); text-align: center;
}
.game-dialog::backdrop { background: rgba(4, 24, 16, .6); }
.game-dialog h2, .game-dialog .dialog-title { margin: 0 0 8px; }
.game-dialog .dialog-title { font-family: Georgia, "Times New Roman", serif; font-size: 1.5em; font-weight: 700; line-height: 1.2; color: var(--heading); }
.game-dialog p { margin: 0 0 16px; color: var(--text-muted); }
.game-dialog .dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.game-dialog .btn { color: var(--soft-btn-text); border-color: var(--line); background: var(--surface-2); }
.game-dialog .btn-primary { background: var(--gold); border-color: var(--gold); color: #2b2205; }

.noscript-note { background: #fff3cd; color: #5c4400; padding: 12px; border-radius: 8px; text-align: center; }

/* ----------------------------------------------------------- content */
.content { padding: 34px 0 10px; }
.content section, .page-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.content h2 { margin-top: 0; font-size: 1.45rem; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 20px; }
.content-grid section { margin-bottom: 0; }
.tile-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.tile-legend li { display: flex; flex-direction: column; align-items: center; font-size: .78rem; color: var(--text-muted); width: 64px; text-align: center; }
.tile-legend img { width: 42px; height: 56px; background: var(--ivory); border-radius: 5px; box-shadow: 2px 2px 0 var(--tile-side), 0 0 0 1px var(--tile-ring) inset; padding: 2px; }
.faq dt { font-weight: 700; margin-top: 12px; }
.faq dd { margin: 4px 0 0; color: var(--text-soft); }
.page-article { max-width: 820px; margin-inline: auto; }
.page-article h1 { margin-top: 0; }
.page-article table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: .95rem; }
.page-article th, .page-article td { overflow-wrap: anywhere; padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.page-article thead th { background: var(--surface-2); }
.page-article .updated { color: var(--text-muted); font-size: .9rem; }
@media (max-width: 560px) { .page-article table { font-size: .85rem; } .page-article th, .page-article td { padding: 5px 6px; } }

/* ------------------------------------------------------- game cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.game-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 16px; background: var(--surface); color: var(--text);
  text-decoration: none; box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(7, 42, 32, .08); transition: transform .16s ease, box-shadow .16s ease;
}
.game-card-media { position: relative; display: block; overflow: hidden; background: var(--jade-800); }
.game-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.game-card:hover { color: var(--text); transform: translateY(-3px); box-shadow: 0 0 0 2px var(--gold), 0 12px 24px rgba(7, 42, 32, .18); }
.game-card:hover img { transform: scale(1.04); }
.game-card-new { position: absolute; left: 10px; top: 10px; padding: 1px 10px; border-radius: 999px; background: var(--gold); color: #2b2205; font-size: .75rem; font-weight: 700; }
.game-card-name { padding: 10px 14px 2px; font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--heading); }
.game-card-text { padding: 0 14px; font-size: .88rem; line-height: 1.45; color: var(--text-muted); }
.card-grid-lead li:not(:first-child) .game-card-text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin-inline: 14px; padding: 0; }
.game-card-play { align-self: flex-start; margin: 14px 20px 4px; padding: 8px 26px; border-radius: 999px; background: var(--gold); color: #2b2205; font-weight: 700; }
.game-card:hover .game-card-play { background: var(--gold-soft); }
.game-card-tag { margin: auto 14px 12px; padding-top: 8px; font-size: .78rem; font-weight: 600; color: var(--link); }
.more { margin: 14px 0 0; font-weight: 600; }
/* Home page: what lies below the game is laid out when the visitor comes near it. */
.explore, .explore ~ * { content-visibility: auto; contain-intrinsic-size: auto 320px; }
.explore { contain-intrinsic-size: auto 800px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: .92rem; }
.chips a:hover { border-color: var(--link); }
.chips a[aria-current="page"] { background: var(--jade-600); border-color: var(--jade-600); color: #fff; }
@media (min-width: 900px) {
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid-lead { grid-template-columns: repeat(4, 1fr); }
  .card-grid-lead li:first-child { grid-column: span 2; grid-row: span 2; }
  .card-grid-lead li:first-child .game-card-name { padding: 16px 20px 4px; font-size: 1.5rem; }
  .card-grid-lead li:first-child .game-card-text { padding: 0 20px; font-size: 1.02rem; }
  .card-grid-lead li:first-child .game-card-tag { margin-inline: 20px; }
}
@media (min-width: 761px) and (max-width: 1500px) {
  .has-rail [data-action="highlight"] .btn-label, .has-rail [data-action="sound"] .btn-label { display: none; }
  .has-rail .game-actions .btn { padding-inline: 10px; }
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .explore { contain-intrinsic-size: auto 1000px; }
  .card-grid-lead li:first-child { grid-column: 1 / -1; }
  .card-grid li:not(:first-child) .game-card-text { display: none; }
  .card-grid:not(.card-grid-lead) .game-card-text { display: none; }
  .game-card-play { margin: 10px 10px 2px; }
  .card-grid-lead li:not(:first-child) .game-card-text { display: none; }
  .game-card-name { padding: 8px 10px 0; font-size: .98rem; }
  .game-card-text { padding: 0 10px; }
  .game-card-tag { margin: auto 10px 10px; padding-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-card, .game-card img { transition: none; }
  .game-card:hover, .game-card:hover img { transform: none; }
}

/* ------------------------------------------------------------ layout pages */
.game-intro .breadcrumb ol { justify-content: center; color: var(--felt-text-2); }
.game-intro .breadcrumb a { color: var(--felt-text); }
.layout-facts, .layout-table { width: 100%; border-collapse: collapse; margin: 4px 0 16px; font-size: .95rem; }
.layout-facts th, .layout-facts td, .layout-table th, .layout-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.layout-facts th { width: 38%; color: var(--heading); }
.layout-table thead th { background: var(--surface-2); white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.layout-level::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-right: 6px; border-radius: 50%; background: var(--jade-600); }
.layout-level-medium::before { background: var(--gold); }
.layout-level-hard::before { background: #d9822b; }
.layout-level-expert::before { background: var(--danger); }
@media (max-width: 560px) {
  .layout-facts th, .layout-facts td, .layout-table th, .layout-table td { padding: 6px; font-size: .88rem; }
  .layout-facts th { width: 42%; }
}

/* ------------------------------------------ games next to the board (wide screens) */
.game-rail { display: none; }
@media (min-width: 1180px) {
  .play-area.has-rail { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 18px; width: min(1520px, 100% - 32px); margin-inline: auto; }
  .play-area.has-rail > .game, .play-area.has-rail > .player { width: 100%; }
  .game-rail { display: block; align-self: start; padding: 12px; border: 1px solid var(--felt-line); border-radius: var(--radius); background: var(--felt-panel); }
  .game-rail h2 { margin: 0 0 8px; color: var(--felt-text); font-size: 1.05rem; }
  .game-rail ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .game-rail li a { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; overflow: hidden; border-radius: 10px; background: var(--rail-item); color: var(--felt-text); text-decoration: none; line-height: 1.25; }
  .game-rail li a:hover { background: var(--rail-hover); }
  .game-rail img { display: block; width: 92px; height: 69px; object-fit: cover; background: var(--jade-800); }
  .game-rail b { display: block; font-size: .92rem; }
  .game-rail small { color: var(--rail-small); font-size: .76rem; }
  .game-rail p { margin: 10px 0 0; }
  .game-rail p a:hover { color: var(--felt-text); }
  .game-rail p a { color: var(--rail-link); font-weight: 600; font-size: .92rem; }
}
/* One line only where it fits with a scrollbar and long numbers. */
@media (min-width: 1366px) {
  .has-rail .game-bar, .has-rail .game-actions { flex-wrap: nowrap; }
  .has-rail .game-stats { flex-wrap: nowrap; gap: 4px 12px; white-space: nowrap; }
}
/* Without scripts the <noscript> picture is shown instead. */
@media (scripting: none) {
  img[data-src] { display: none !important; }
}

/* ------------------------------------------------------------ footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 30px; padding: 22px 0; font-size: .9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--footer-link); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0; padding: 0; }
.theme-pick { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.theme-pick select {
  min-height: 36px; padding: 4px 10px; border: 1px solid var(--footer-text); border-radius: 8px;
  background: var(--footer-bg); color: var(--footer-link); font: inherit;
}
/* The choice is applied by a script; without scripts it would do nothing. */
@media (scripting: none) {
  .theme-pick { display: none; }
}

/* --------------------------------------------------------- error page */
.error-page { text-align: center; padding: 60px 0; }
.error-page .btn { color: #2b2205; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* German and French only (English pages have no such markup or lang): the long "moves left" label gives way to its
   short form on phones, and between the phone layout and 1024px Free tiles and Sound show their icon only (their
   aria-label and title name them), as they do next to the games rail, so the toolbar keeps one row where English does. */
.stat-short { display: none; }
@media (max-width: 440px) {
  .stat-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stat-short { display: inline; }
}
@media (min-width: 761px) and (max-width: 1023px) {
  html[lang="de"] [data-action="highlight"] .btn-label, html[lang="de"] [data-action="sound"] .btn-label,
  html[lang="fr"] [data-action="highlight"] .btn-label, html[lang="fr"] [data-action="sound"] .btn-label { display: none; }
}
/* German compounds ("Datenschutzerklärung") are wider than a phone: headings break (with a hyphen where the browser can). */
html[lang="de"] h1, html[lang="de"] h2, html[lang="de"] h3,
html[lang="fr"] h1, html[lang="fr"] h2, html[lang="fr"] h3 { overflow-wrap: break-word; hyphens: auto; }

.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 560px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: var(--surface); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px;
}
.consent p { margin: 0; flex: 1 1 260px; font-size: .9rem; }
.consent .btn { color: var(--soft-btn-text); border-color: var(--line); background: var(--surface-2); }
.consent .btn-primary { background: var(--gold); border-color: var(--gold); color: #2b2205; }

/* Languages (2.5.0): footer links to the same page in German or French, and the one-line suggestion that
   site.js shows on an English page when the browser prefers one of them (never while the consent box is open). */
.site-footer .lang-switch ul { gap: 14px; }
.lang-suggest {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 49; max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .9rem;
  background: var(--surface); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px;
}
.lang-suggest a { font-weight: 600; }
.lang-suggest button { margin-left: auto; }
.consent:not([hidden]) ~ .lang-suggest { display: none; }
.game-card-plain { cursor: default; }
.game-card-plain:hover { transform: none; box-shadow: none; }
.game-card-plain:hover img { transform: none; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 760px) {
  .site-header .container { min-height: 48px; padding: 4px 0; gap: 8px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .site-nav a { padding: 4px 6px; font-size: .85rem; }
  .game-section { padding-top: 8px; }
  .game-intro h1 { font-size: 1.3rem; }
  .game-intro p { font-size: .85rem; }
  .game-bar { padding: 6px; gap: 6px; }
  .game-stats { width: 100%; justify-content: space-between; font-size: .82rem; gap: 4px 10px; }
  .game-actions { width: 100%; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .game-actions .btn { min-height: 42px; padding: 4px; }
  .game-actions .btn svg { width: 20px; height: 20px; }
  .game-actions .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .game-actions .select { grid-column: 1 / -1; grid-row: 2; width: 100%; min-height: 36px; }
  .game-help { display: none; }
  .content section, .page-article { padding: 18px 16px; }
}
@media (max-width: 560px) {
  .site-nav .nav-wide { display: none; }
  .site-nav ul { flex-wrap: nowrap; }
  .site-nav a { white-space: nowrap; }
  .brand { line-height: 1.2; }
}
@media (max-width: 370px) {
  .site-nav .nav-mid { display: none; }
}
@media (max-width: 420px) {
  .site-nav li:first-child { display: none; }
}
/* "Daily" fits from 600px up; below it would wrap the bar onto another line (phones: footer and home page text). */
@media (max-width: 600px) {
  .site-nav .nav-daily { display: none; }
}
