@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");
:root {
  --paper: #f5f4ee;
  --ink: #192c36;
  --muted: #68747a;
  --line: #deded5;
  --lime: #d3ee68;
  --blue: #2d65ed;
  --orange: #f2a665;
  --radius: 20px;
  font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 0;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.topbar {
  max-width: 1380px;
  margin: auto;
  padding: 27px 44px;
  display: flex;
  align-items: center;
  gap: 60px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  background: var(--ink);
  color: var(--lime);
  font-size: 38px;
  border-radius: 12px;
}
.brand strong {
  font-size: 22px;
  letter-spacing: 1px;
}
.brand strong span {
  display: block;
  font:
    10px "Space Grotesk",
    sans-serif;
  letter-spacing: 2px;
  margin-top: 3px;
}
.topbar nav {
  display: flex;
  gap: 26px;
}
.nav {
  padding: 12px 0;
  font-size: 14px;
  color: var(--muted);
}
.nav.active {
  color: var(--ink);
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
}
#fav-count {
  font-size: 11px;
  border-radius: 50%;
  background: #e5e6dc;
  padding: 3px 6px;
}
.header-note {
  margin-left: auto;
  font-size: 12px;
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #7eaa47;
  border-radius: 50%;
  margin-right: 6px;
}
main {
  max-width: 1380px;
  margin: auto;
  padding: 0 44px;
}
.hero {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 460px;
  border-bottom: 1px solid var(--line);
  padding: 45px 0 48px;
}
.eyebrow {
  font-family: "Space Grotesk", "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.hero h1 {
  font-size: clamp(42px, 4.6vw, 65px);
  letter-spacing: -3px;
  line-height: 1.3;
  margin: 19px 0;
}
.accent {
  display: block;
}
.hero p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.9;
  margin: 16px 0 25px;
}
.hero-cta,
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  padding: 16px 23px;
  font-size: 14px;
  font-weight: 600;
}
.hero-cta span {
  color: var(--lime);
  font-size: 24px;
}
.hero-stat {
  font-size: 11px;
  color: var(--muted);
  margin-top: 23px;
}
.hero-stat b {
  font-size: 15px;
  color: var(--ink);
}
.hero-stat span {
  margin: 0 11px;
}
.hero-art {
  height: 348px;
  position: relative;
  border-radius: 22px;
  background: #e5e9db;
  overflow: visible;
  display: grid;
  place-items: center;
  background-image: radial-gradient(#aeb9a8 0.7px, transparent 0.7px);
  background-size: 14px 14px;
}
.art-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  transform: rotate(-8deg);
  background: var(--ink);
  padding: 14px;
  border-radius: 19px;
  box-shadow: 15px 18px 0 #b8c2a8;
  width: 252px;
  height: 252px;
}
.tile {
  display: grid;
  place-items: center;
  border-radius: 8px;
  font:
    700 31px "Space Grotesk",
    sans-serif;
  background: #eef0dc;
  color: var(--ink);
}
.t4 {
  background: #d9e4a9;
}
.t8 {
  background: #d3ee68;
}
.t16 {
  background: #e9c587;
}
.t32 {
  background: #f2a665;
}
.t64 {
  background: #d75c45;
  color: white;
}
.t128 {
  background: #528e86;
  color: white;
  font-size: 27px;
}
.t256 {
  background: #2d65ed;
  color: white;
  font-size: 27px;
}
.t2048 {
  background: #d3ee68;
  font-size: 24px;
}
.art-label {
  position: absolute;
  top: 18px;
  left: 20px;
  font: 10px "Space Grotesk";
  letter-spacing: 1px;
}
.art-sticker {
  position: absolute;
  right: 9px;
  bottom: 28px;
  transform: rotate(11deg);
  background: #2d65ed;
  color: white;
  padding: 18px 16px;
  border-radius: 50%;
  font: 700 16px "Space Grotesk";
  text-align: center;
  box-shadow: 0 0 0 4px var(--paper);
}
.art-star {
  position: absolute;
  right: 25px;
  top: 25px;
  font-size: 57px;
  color: var(--ink);
}
.library {
  padding: 37px 0 64px;
}
.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.library-head h2 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 8px 0 24px;
}
.library-head h2 span {
  font: 12px "Space Grotesk";
  display: inline-block;
  background: #e9eadf;
  padding: 5px 9px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 8px;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffdf8;
  border: 1px solid var(--line);
  padding: 12px 15px;
  border-radius: 10px;
  max-width: 310px;
}
.search-wrap input {
  width: 205px;
  border: 0;
  background: none;
  font-size: 13px;
  outline: none;
}
.search-wrap > span {
  font-size: 24px;
  color: var(--muted);
}
kbd {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 5px;
  color: var(--muted);
  font: 12px monospace;
}
.filter-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 23px;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filters button {
  padding: 10px 17px;
  border-radius: 25px;
  font-size: 12px;
  background: #eaeae1;
  transition: 0.18s;
}
.filters button.active {
  color: white;
  background: var(--ink);
}
.random {
  font-size: 12px;
  white-space: nowrap;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 23px 20px;
}
.game-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  transition:
    transform 0.2s,
    border-color 0.2s;
  position: relative;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: #879987;
}
.card-link {
  display: block;
}
.card-art {
  height: 165px;
  overflow: hidden;
}
.card-art svg {
  width: 100%;
  height: 100%;
  display: block;
}
.card-info {
  padding: 17px 18px 18px;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font: 10px "Space Grotesk";
  color: var(--muted);
  letter-spacing: 0.7px;
  margin-bottom: 8px;
}
.card-info h3 {
  margin: 0 0 5px;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.card-info p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  padding-right: 12px;
}
.card-fav {
  position: absolute;
  right: 10px;
  top: 10px;
  background: #fffdf8dc;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 18px;
}
.card-fav.saved {
  color: #d07332;
}
.card-arrow {
  position: absolute;
  bottom: 17px;
  right: 16px;
  font-size: 20px;
}
.empty {
  text-align: center;
  padding: 70px;
  font-size: 15px;
  color: var(--muted);
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 27px 0 38px;
}
footer .brand-icon {
  width: 30px;
  height: 30px;
  font-size: 26px;
  border-radius: 8px;
}
footer .brand strong {
  font-size: 17px;
}
footer p {
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
}
footer p span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
footer > a:last-child {
  font-size: 12px;
}
.game-top {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 25px 0;
}
.back-link {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 0;
}
.text-btn {
  margin-left: auto;
  font-size: 13px;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 28px;
  margin-bottom: 50px;
}
.play-panel {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  min-width: 0;
}
.play-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}
.play-heading h1 {
  margin: 6px 0;
  font-size: 30px;
  letter-spacing: -1px;
}
.scores {
  display: flex;
  gap: 8px;
}
.scores > div {
  background: #edeee5;
  border-radius: 9px;
  padding: 9px 15px;
  min-width: 80px;
  text-align: center;
}
.scores span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  white-space: normal;
  max-width: 120px;
  line-height: 1.4;
}
.scores strong {
  font: 600 22px "Space Grotesk";
  display: block;
  margin-top: 4px;
}
.guide-panel {
  padding: 19px 4px;
}
.guide-panel h2 {
  font-size: 21px;
  margin: 12px 0 15px;
}
.guide-panel > p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
#rules {
  font-size: 12px;
  line-height: 1.9;
  margin-top: 21px;
}
.rule-line {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 11px;
}
.rule-line b {
  font: 11px "Space Grotesk";
  color: var(--muted);
  margin-top: 5px;
}
.tip {
  border-radius: 14px;
  background: #e9efdb;
  padding: 20px;
  margin-top: 20px;
}
.tip > span {
  font-size: 12px;
  font-weight: 700;
}
.tip p {
  font-size: 12px;
  line-height: 1.9;
  margin: 10px 0 0;
}
.related-title {
  display: flex;
  justify-content: space-between;
  margin-top: 29px;
  font-size: 13px;
  font-weight: 600;
}
#related a {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: 12px;
}
#related svg {
  width: 50px;
  height: 38px;
  border-radius: 6px;
}
#related span:last-child {
  margin-left: auto;
}
.save-note {
  font-size: 10px !important;
  margin-top: 26px;
}
.options {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12px;
}
.options label {
  display: flex;
  gap: 8px;
  align-items: center;
}
.options select {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  max-width: 170px;
}
.options button {
  border: 1px solid var(--line);
  padding: 7px 11px;
  border-radius: 7px;
}
.options button.active {
  background: var(--ink);
  color: white;
}
.options small {
  color: var(--muted);
}
#stage-wrap {
  position: relative;
  margin: auto;
  max-width: 700px;
  border-radius: 14px;
  overflow: hidden;
  background: #e8ebdf;
}
#stage {
  min-height: 250px;
  position: relative;
}
canvas.game-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  outline: none;
}
.overlay {
  position: absolute;
  inset: 0;
  background: #f5f4eef4;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  padding: 25px;
  backdrop-filter: blur(9px);
}
.overlay h2 {
  font-size: 32px;
  margin: 2px;
}
.overlay p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin: 3px 0 14px;
}
.overlay .primary {
  font-size: 13px;
}
.game-message {
  font-size: 12px;
  text-align: center;
  min-height: 39px;
  padding: 12px 5px;
  color: var(--muted);
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.toolbar button {
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 9px 13px;
  border-radius: 7px;
}
#clock {
  margin-left: auto;
  font: 13px "Space Grotesk";
  color: var(--muted);
}
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 0 0 14px;
  touch-action: manipulation;
}
.controls button {
  background: #e9eadf;
  border: 1px solid #cfd3c6;
  border-radius: 9px;
  padding: 12px 18px;
  min-width: 44px;
  font-size: 13px;
  user-select: none;
  touch-action: none;
}
.controls button:active {
  background: var(--lime);
}
.board {
  display: grid;
  gap: 5px;
  padding: 16px;
  max-width: 540px;
  margin: auto;
  aspect-ratio: 1;
}
.board button {
  padding: 0;
  border-radius: 6px;
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  font:
    600 24px "Space Grotesk",
    "PingFang SC",
    sans-serif;
  user-select: none;
  touch-action: manipulation;
}
.merge-board {
  background: #b9c1ab;
  gap: 10px;
  padding: 14px;
}
.merge-board button {
  border-radius: 9px;
  transition: background 0.12s;
  background: #cbd1bf;
}
.merge-board button[data-value="0"] {
  color: transparent;
}
.merge-board button:not([data-value="0"]) {
  animation: pop 0.15s;
}
.memory-board button {
  background: var(--ink);
  color: var(--lime);
  font-size: 28px;
  aspect-ratio: 1;
  border: 2px solid transparent;
}
.memory-board button.open {
  background: var(--paper);
  color: var(--ink);
  border-color: #c0c8b4;
}
.memory-board button.matched {
  background: #d3ee68;
  color: var(--ink);
}
.mines-board {
  padding: 12px;
  gap: 3px;
  background: #d9dfcd;
  max-width: 650px;
  aspect-ratio: auto;
}
.mines-board button {
  background: #aab998;
  min-height: 27px;
  aspect-ratio: 1;
  font-size: clamp(11px, 2.1vw, 19px);
  border-radius: 3px;
}
.mines-board button.revealed {
  background: #f1f3e9;
}
.mines-board button.mine {
  background: #ea8672;
}
.mines-scroll {
  overflow: auto;
}
.sudoku-board {
  gap: 0;
  padding: 10px;
  max-width: 510px;
  background: var(--ink);
}
.sudoku-board button {
  font-size: 23px;
  background: #fbfaf3;
  border-radius: 0;
  aspect-ratio: 1;
  border-right: 1px solid #d8dccc;
  border-bottom: 1px solid #d8dccc;
  color: #2d65ed;
}
.sudoku-board button.fixed {
  color: var(--ink);
  font-weight: 700;
  background: #eeefe4;
}
.sudoku-board button.selected {
  background: var(--lime);
}
.sudoku-board button.conflict {
  color: #c74136;
  background: #f9d5c9;
}
.sudoku-board button.edge-right {
  border-right: 3px solid var(--ink);
}
.sudoku-board button.edge-bottom {
  border-bottom: 3px solid var(--ink);
}
.sudoku-board button.notes {
  font-size: 10px;
  white-space: pre-line;
  line-height: 1.6;
}
.ttt-board {
  max-width: 450px;
  padding: 20px;
  gap: 10px;
}
.ttt-board button {
  background: #f5f4ee;
  aspect-ratio: 1;
  font-size: 66px;
}
.ttt-board button.winning {
  background: var(--lime);
}
.wood-board {
  background: #d8b783;
  position: relative;
  gap: 0;
  padding: 15px;
  max-width: 570px;
}
.wood-board button {
  background: transparent;
  aspect-ratio: 1;
  border-radius: 0;
  font-size: 15px;
}
.wood-board button:before,
.wood-board button:after {
  content: "";
  position: absolute;
  background: #947a54;
  z-index: 0;
}
.wood-board button:before {
  left: 0;
  right: 0;
  height: 1px;
  top: 50%;
}
.wood-board button:after {
  top: 0;
  bottom: 0;
  width: 1px;
  left: 50%;
}
.stone {
  border-radius: 50%;
  width: 78%;
  height: 78%;
  display: grid;
  place-items: center;
  z-index: 1;
  box-shadow: 0 2px 3px #0003;
}
.stone.black {
  background: #23313a;
  color: #efc988;
}
.stone.white {
  background: #fffdf0;
  color: #315864;
}
.wood-board button.winning {
  background: #d3ee6880;
}
.reversi-board {
  background: #326d58;
  gap: 3px;
  padding: 12px;
  max-width: 500px;
}
.reversi-board button {
  background: #42816b;
  border-radius: 2px;
  aspect-ratio: 1;
  font-size: 17px;
}
.reversi-board button.legal:empty:after {
  content: "";
  width: 16%;
  height: 16%;
  background: var(--lime);
  border-radius: 50%;
}
.connect-board {
  padding: 12px;
  gap: 6px;
  aspect-ratio: auto;
}
.connect-board button {
  background: #f8f6ed;
  aspect-ratio: 1;
  font-size: 24px;
  border: 2px solid transparent;
}
.connect-board button.selected {
  border-color: var(--blue);
  background: #e1eafb;
}
.connect-board button.hint {
  border-color: #d17937;
  background: #f5d7aa;
}
.connect-board button.gone {
  visibility: hidden;
}
.free-board {
  position: relative;
  margin: auto;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4/5;
  background: #d3bd96;
  touch-action: none;
}
.block-piece {
  position: absolute;
  border: 4px solid #d3bd96;
  border-radius: 12px;
  background: #345f70;
  color: white;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
  touch-action: none;
  user-select: none;
}
.block-piece.goal {
  background: #ce5c42;
  font-size: 28px;
}
.block-piece.selected {
  box-shadow: inset 0 0 0 3px #d3ee68;
}
.exit-label {
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 5px;
  background: var(--lime);
}
.solitaire-board {
  padding: 12px;
  background: #326d58;
  min-height: 490px;
  color: white;
}
.sol-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}
.sol-top {
  margin-bottom: 20px;
}
.card-slot {
  position: relative;
  min-height: 90px;
  border-radius: 5px;
  border: 1px solid #a3c3af80;
  font-size: 11px;
  text-align: center;
  padding-top: 7px;
}
.playing-card {
  background: #fffef5;
  color: #24323a;
  border-radius: 5px;
  min-height: 87px;
  text-align: left;
  padding: 7px;
  font: 600 15px "Space Grotesk";
  border: 1px solid #b9c5b3;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 2px 3px #0002;
}
.playing-card.red {
  color: #c84b3b;
}
.playing-card.down {
  background: repeating-linear-gradient(
    45deg,
    #1b3948,
    #1b3948 3px,
    #285262 3px,
    #285262 6px
  );
  color: var(--lime);
}
.playing-card.selected {
  outline: 3px solid var(--lime);
  z-index: 2;
}
.tableau .playing-card {
  position: absolute;
  left: 0;
  top: calc(var(--i) * 25px);
}
.tableau {
  min-height: 350px;
}
.card-slot.empty {
  cursor: pointer;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  z-index: 30;
  padding: 12px 22px;
  border-radius: 9px;
  font-size: 13px;
}
.spot-scenes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}
.spot-scenes svg {
  width: 100%;
  touch-action: manipulation;
  cursor: crosshair;
  background: #dcedee;
  border-radius: 10px;
}
.chinese-stage {
  padding: 8px;
}
.chinese-stage svg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: manipulation;
}
.hole {
  cursor: pointer;
  stroke: #849b91;
  stroke-width: 1;
}
.hole.selected {
  stroke: #203743;
  stroke-width: 4;
}
.hole.legal {
  stroke: #e99838;
  stroke-width: 4;
}
.hole:focus-visible {
  outline: none;
  stroke: #2d65ed;
  stroke-width: 4;
}
.whack-board button {
  aspect-ratio: 1;
  background: #c3cfb4;
  border-radius: 50%;
  border: 10px solid #e4e9d9;
  font-size: 42px;
  box-shadow: inset 0 10px 0 #81986b;
}
.whack-board button.up {
  background: #f5c874;
}
.whack-board button.hit {
  background: var(--lime);
}
@keyframes pop {
  from {
    transform: scale(0.94);
  }
  to {
    transform: scale(1);
  }
}
@media (min-width: 1500px) {
  main,
  .topbar {
    max-width: 1400px;
  }
}
@media (max-width: 1050px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .play-panel {
    padding: 19px;
  }
  .hero {
    gap: 25px;
  }
  .hero-art {
    height: 320px;
  }
  .topbar {
    gap: 40px;
  }
}
@media (max-width: 760px) {
  main,
  .topbar {
    padding-left: 20px;
    padding-right: 20px;
  }
  .topbar {
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 25px;
  }
  .topbar nav {
    gap: 15px;
  }
  .header-note {
    display: none;
  }
  .nav {
    font-size: 12px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 30px;
  }
  .brand strong span {
    font-size: 8px;
  }
  .hero {
    gap: 18px;
    padding: 35px 0;
    min-height: 360px;
  }
  .hero h1 {
    font-size: 43px;
    letter-spacing: -2px;
  }
  .hero p {
    font-size: 13px;
  }
  .hero .eyebrow {
    font-size: 9px;
  }
  .hero-art {
    height: 250px;
  }
  .art-board {
    width: 183px;
    height: 183px;
    padding: 10px;
    gap: 6px;
  }
  .tile {
    font-size: 22px;
  }
  .t128,
  .t256 {
    font-size: 19px;
  }
  .t2048 {
    font-size: 17px;
  }
  .art-sticker {
    font-size: 12px;
    padding: 14px;
    right: -5px;
    bottom: 8px;
  }
  .art-star {
    font-size: 35px;
    right: 15px;
    top: 28px;
  }
  .art-label {
    font-size: 8px;
    left: 10px;
  }
  .hero-stat {
    font-size: 9px;
  }
  .hero-stat span {
    margin: 0 5px;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
  .card-art {
    height: 145px;
  }
  .card-info {
    padding: 15px;
  }
  .card-info h3 {
    font-size: 17px;
  }
  .library-head h2 {
    font-size: 25px;
  }
  .search-wrap {
    width: 210px;
    padding: 9px 10px;
  }
  .search-wrap input {
    width: 150px;
  }
  .search-wrap kbd {
    display: none;
  }
  .filters button {
    padding: 9px 12px;
    font-size: 11px;
  }
  .filter-row {
    align-items: flex-start;
  }
  .random {
    font-size: 10px;
    padding-top: 10px;
  }
  .play-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .guide-panel {
    padding: 6px;
  }
  .play-heading h1 {
    font-size: 26px;
  }
  .guide-panel #related {
    display: flex;
    gap: 15px;
  }
  .guide-panel #related a {
    flex: 1;
  }
  .save-note {
    margin-top: 15px;
  }
  .game-top {
    gap: 15px;
    margin: 16px 0;
  }
  .game-top .eyebrow {
    display: none;
  }
  .play-panel {
    padding: 15px;
  }
  footer p {
    font-size: 10px;
  }
  footer > a:last-child {
    font-size: 10px;
  }
  .spot-scenes {
    gap: 5px;
    padding: 5px;
  }
  .playing-card {
    font-size: 12px;
    padding: 4px;
    min-height: 73px;
  }
  .solitaire-board {
    padding: 8px;
  }
  .sol-row {
    gap: 4px;
  }
  .card-slot {
    min-height: 76px;
  }
  .tableau {
    min-height: 350px;
  }
}
@media (max-width: 480px) {
  main,
  .topbar {
    padding-left: 15px;
    padding-right: 15px;
  }
  .topbar {
    gap: 12px;
  }
  .topbar nav {
    gap: 12px;
  }
  .nav {
    font-size: 11px;
  }
  .hero {
    grid-template-columns: 1fr 0.85fr;
    gap: 8px;
    min-height: 310px;
  }
  .hero h1 {
    font-size: clamp(27px, 8vw, 35px);
    letter-spacing: -1.6px;
    margin-top: 14px;
  }
  .hero p {
    font-size: 11px;
    margin-top: 8px;
    margin-bottom: 19px;
  }
  .hero .eyebrow {
    font-size: 8px;
    letter-spacing: 0.6px;
  }
  .hero-art {
    height: 211px;
  }
  .art-board {
    width: 143px;
    height: 143px;
    gap: 5px;
    padding: 8px;
    border-radius: 13px;
    box-shadow: 9px 12px 0 #b8c2a8;
  }
  .tile {
    font-size: 19px;
    border-radius: 5px;
  }
  .t128,
  .t256 {
    font-size: 15px;
  }
  .t2048 {
    font-size: 14px;
  }
  .art-label {
    font-size: 6px;
    top: 10px;
  }
  .art-star {
    font-size: 31px;
    right: 8px;
    top: 20px;
  }
  .art-sticker {
    font-size: 9px;
    padding: 11px;
    right: -3px;
    bottom: 9px;
  }
  .hero-cta {
    font-size: 12px;
    padding: 11px 14px;
    gap: 15px;
  }
  .hero-cta span {
    font-size: 18px;
  }
  .hero-stat {
    font-size: 8px;
    line-height: 1.7;
    margin-top: 15px;
  }
  .hero-stat span {
    margin: 0 3px;
  }
  .library {
    padding-top: 26px;
  }
  .library-head {
    display: block;
    align-items: flex-start;
    gap: 8px;
  }
  .library-head h2 {
    font-size: 22px;
    margin-bottom: 12px;
    white-space: nowrap;
  }
  .search-wrap {
    width: 100%;
    max-width: none;
    padding: 7px 9px;
    margin: 0 0 18px;
    gap: 6px;
  }
  .search-wrap input {
    width: 100%;
    font-size: 11px;
  }
  .filters {
    gap: 5px;
  }
  .filters button {
    padding: 8px 10px;
    font-size: 10px;
  }
  .random {
    display: none;
  }
  .card-art {
    height: 117px;
  }
  .card-info {
    padding: 13px;
  }
  .card-info h3 {
    font-size: 16px;
  }
  .card-info p {
    font-size: 10px;
    line-height: 1.7;
  }
  .card-meta {
    font-size: 8px;
  }
  .card-arrow {
    bottom: 14px;
    right: 12px;
  }
  .game-grid {
    gap: 13px 11px;
  }
  .scores > div {
    padding: 8px 10px;
    min-width: 63px;
  }
  .scores strong {
    font-size: 20px;
  }
  .scores span {
    font-size: 9px;
  }
  .play-heading h1 {
    font-size: 24px;
  }
  .play-heading .eyebrow {
    font-size: 9px;
  }
  .play-panel {
    padding: 12px;
  }
  .controls button {
    padding: 12px 15px;
    font-size: 12px;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar button {
    padding: 8px 11px;
    font-size: 11px;
  }
  .guide-panel #related {
    flex-direction: column;
    gap: 0;
  }
  .board {
    padding: 10px;
    gap: 6px;
  }
  .merge-board {
    gap: 7px;
  }
  .board button {
    font-size: 20px;
  }
  .ttt-board button {
    font-size: 50px;
  }
  .wood-board {
    gap: 0;
  }
  .wood-board button {
    font-size: 9px;
  }
  .sudoku-board {
    padding: 6px;
    gap: 0;
  }
  .sudoku-board button {
    font-size: 19px;
  }
  .sudoku-board button.notes {
    font-size: 8px;
  }
  .mines-board {
    gap: 2px;
  }
  .mines-board button {
    font-size: 13px;
  }
  .memory-board button {
    font-size: 22px;
  }
  .solitaire-board {
    padding: 5px;
  }
  .playing-card {
    font-size: 11px;
    padding: 3px;
  }
  .sol-row {
    gap: 3px;
  }
  .tableau .playing-card {
    top: calc(var(--i) * 24px);
  }
  footer .brand strong {
    font-size: 14px;
  }
  footer > a:last-child {
    display: none;
  }
  .whack-board button {
    font-size: 35px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 761px) {
  canvas.game-canvas {
    width: auto;
    max-width: 100%;
    max-height: 500px;
    margin: 0 auto;
  }
  .merge-board {
    max-width: 460px;
  }
  .sudoku-board {
    max-width: 460px;
  }
  .wood-board {
    max-width: 490px;
  }
  .reversi-board {
    max-width: 460px;
  }
}
