:root {
  color-scheme: light;
  --ink: #22312b;
  --muted: #66736d;
  --paper: #fbf7ed;
  --paper-strong: #fffdf7;
  --line: #ded4c1;
  --leaf: #2f7a5a;
  --leaf-dark: #22553f;
  --coral: #e96f55;
  --sun: #f3b64b;
  --sky: #77a9c9;
  --violet: #8c78b9;
  --shadow: 0 18px 44px rgba(64, 52, 34, 0.13);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(243, 182, 75, 0.2), transparent 28rem),
    linear-gradient(135deg, #fbf7ed 0%, #eef5ec 52%, #f7efe4 100%);
  color: var(--ink);
}

html,
body {
  overflow-x: hidden;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--sky), white 18%);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

button,
summary,
canvas,
.game-card,
.button,
.tool-button {
  -webkit-tap-highlight-color: transparent;
}

button,
.button,
.tool-button,
.segmented button,
.control-pad button,
.direction-pad button {
  touch-action: manipulation;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 14px;
}

.compact-header {
  width: min(1160px, calc(100% - 32px));
  padding: 14px 0 8px;
}

.compact-header .brand-mark {
  width: 34px;
  height: 34px;
  box-shadow: 3px 3px 0 var(--ink);
}

.compact-header .brand strong {
  font-size: 0.95rem;
}

.compact-header .brand small {
  font-size: 0.72rem;
}

.compact-header .top-nav a {
  padding: 7px 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  transition: transform 180ms var(--ease-out-quart);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--sun);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand > span:last-child {
  min-width: 0;
}

.brand strong {
  font-size: 1.02rem;
}

.brand small {
  color: var(--muted);
  max-width: min(42vw, 420px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  line-height: 1.2;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.top-nav a {
  border: 1px solid rgba(34, 49, 43, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 253, 247, 0.7);
  text-decoration: none;
  color: #31463d;
  font-size: 0.92rem;
  font-weight: 800;
  transition:
    transform 160ms var(--ease-out-quart),
    border-color 160ms var(--ease-out-quart),
    background 160ms var(--ease-out-quart),
    box-shadow 160ms var(--ease-out-quart);
}

.top-nav a:hover,
.game-menu summary:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 49, 43, 0.34);
  background: #fffdf7;
  box-shadow: 0 6px 18px rgba(34, 49, 43, 0.08);
}

.game-nav {
  align-items: flex-start;
}

.game-menu {
  position: relative;
}

.game-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid rgba(34, 49, 43, 0.18);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 253, 247, 0.78);
  color: #31463d;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition:
    transform 160ms var(--ease-out-quart),
    border-color 160ms var(--ease-out-quart),
    background 160ms var(--ease-out-quart),
    box-shadow 160ms var(--ease-out-quart);
}

.game-menu summary::-webkit-details-marker {
  display: none;
}

.game-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 140ms ease;
}

.game-menu[open] summary {
  background: #fffdf7;
  border-color: rgba(34, 49, 43, 0.38);
}

.game-menu[open] summary::after {
  transform: translateY(1px) rotate(225deg);
}

.game-menu-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 6px;
  width: max-content;
  min-width: max(152px, 100%);
  max-width: calc(100vw - 20px);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px;
  background: #fffdf7;
  box-shadow: 5px 5px 0 var(--ink);
  transform-origin: top right;
  animation: menu-in 180ms var(--ease-out-quint);
}

.game-menu-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
  text-decoration: none;
  transition: background 140ms var(--ease-out-quart), transform 140ms var(--ease-out-quart);
}

.game-menu-list a:hover,
.game-menu-list a:focus-visible {
  background: #f7f0df;
  transform: translateX(-2px);
}

.game-menu-list a[aria-current="page"] {
  background: #edf5ec;
  color: var(--leaf-dark);
}

.game-menu-list a[aria-current="page"]::after {
  content: "✓";
  font-weight: 950;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #f7f0df;
}

.segmented button,
.tool-button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.segmented button {
  transition: background 150ms var(--ease-out-quart), color 150ms var(--ease-out-quart), transform 100ms var(--ease-out-quart);
}

.segmented button:hover:not(.active) {
  background: #fff7e6;
}

.segmented button:active,
.tool-button:active {
  transform: translate(1px, 1px);
}

.segmented button {
  padding: 0 12px;
}

.segmented button + button {
  border-left: 2px solid var(--ink);
}

.segmented .active {
  background: var(--sun);
}

.tool-button {
  border: 2px solid var(--ink);
  border-radius: 7px;
  padding: 0 12px;
  background: #fffdf7;
  box-shadow: 2px 2px 0 rgba(34, 49, 43, 0.9);
  transition:
    transform 140ms var(--ease-out-quart),
    box-shadow 140ms var(--ease-out-quart),
    background 140ms var(--ease-out-quart),
    color 140ms var(--ease-out-quart);
}

.tool-button.is-on {
  background: color-mix(in oklch, var(--sky), white 12%);
  color: #12242e;
}

.tool-button:hover:not([disabled]) {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(34, 49, 43, 0.9);
}

.game-end-overlay {
  position: absolute;
  inset: 12px 12px 46px;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 8px;
  background: rgba(34, 49, 43, 0.58);
  color: #fffdf7;
  text-align: center;
}

.game-end-overlay[hidden] {
  display: none;
}

.game-end-overlay-inner {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.game-end-overlay h3 {
  margin: 0;
  color: #fffdf7;
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  line-height: 1;
}

.game-end-overlay p {
  margin: 0 0 8px;
  color: #fffdf7;
  font-weight: 850;
}

.game-end-overlay .restart-button {
  min-width: 142px;
  min-height: 42px;
  border: 3px solid #fffdf7;
  border-radius: 9px;
  background: var(--sun);
  color: var(--ink);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  transition: transform 140ms var(--ease-out-quart), filter 140ms var(--ease-out-quart);
}

.game-end-overlay .restart-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.tool-button:active:not([disabled]) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(34, 49, 43, 0.9);
}

.tool-button[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
}

.game-message,
.mine-message,
.arcade-message {
  transition: color 160ms var(--ease-out-quart), transform 160ms var(--ease-out-quart);
}

.game-message.is-hot,
.mine-message.is-hot,
.arcade-message.is-hot {
  color: var(--leaf-dark);
  transform: translateY(-1px);
}

.leaderboard-card {
  display: grid;
  gap: 8px;
  border-top: 2px solid rgba(34, 49, 43, 0.16);
  padding-top: 12px;
}

.leaderboard-row-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.leaderboard-row-head h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.leaderboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.player-rank {
  display: grid;
  gap: 3px;
  border: 2px solid rgba(34, 49, 43, 0.18);
  border-radius: 7px;
  padding: 9px 10px;
  background: #edf5ec;
  color: #4d5c55;
  font-size: 0.82rem;
  font-weight: 800;
  animation: soft-rise 340ms var(--ease-out-quint);
}

.player-rank strong {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.1;
}

.player-rank + .leaderboard-list {
  margin-top: 8px;
}

.nickname-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.nickname-field input {
  min-height: 34px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  padding: 0 10px;
  background: #fffdf7;
  color: var(--ink);
  font: inherit;
}

.leaderboard-list.compact {
  display: grid;
  gap: 6px;
  max-height: 174px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list.compact li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(34, 49, 43, 0.16);
  border-radius: 7px;
  padding: 7px;
  background: #fbf7ed;
  transition: transform 140ms var(--ease-out-quart), border-color 140ms var(--ease-out-quart), background 140ms var(--ease-out-quart);
}

.leaderboard-list.compact li:hover,
.leaderboard-list.full li:hover {
  transform: translateX(2px);
  border-color: rgba(34, 49, 43, 0.34);
  background: #fffdf7;
}

.leaderboard-list.compact .rank {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--ink);
  color: #fffdf7;
  font-size: 0.74rem;
  font-weight: 900;
}

.leaderboard-list.compact strong,
.leaderboard-list.compact small {
  display: block;
}

.leaderboard-list.compact small {
  color: var(--muted);
}

.leaderboard-list.full {
  display: grid;
  gap: 8px;
  max-height: min(60svh, 520px);
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list.full li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(34, 49, 43, 0.16);
  border-radius: 7px;
  padding: 9px 10px;
  background: #fbf7ed;
}

.leaderboard-list.full .rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: var(--ink);
  color: #fffdf7;
  font-size: 0.8rem;
  font-weight: 900;
}

.leaderboard-list.full strong,
.leaderboard-list.full small {
  display: block;
}

.leaderboard-list.full small {
  color: var(--muted);
}

.score-dialog,
.leaderboard-dialog {
  width: min(460px, calc(100% - 32px));
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0;
  background: #fffdf7;
  box-shadow: 8px 8px 0 var(--ink);
  color: var(--ink);
  animation: dialog-in 260ms var(--ease-out-expo);
}

.leaderboard-dialog {
  width: min(560px, calc(100% - 32px));
}

.score-dialog::backdrop,
.leaderboard-dialog::backdrop {
  background: rgba(34, 49, 43, 0.38);
  animation: backdrop-in 180ms var(--ease-out-quart);
}

.score-dialog form,
.leaderboard-dialog-inner {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.score-dialog h2,
.leaderboard-dialog h2 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1;
}

.score-dialog label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.score-dialog input {
  min-height: 46px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  padding: 0 12px;
  background: #fbf7ed;
  color: var(--ink);
  font: inherit;
}

.field-error {
  min-height: 20px;
  margin: 0;
  color: #9a3021;
  font-size: 0.88rem;
  font-weight: 850;
}

.dialog-actions,
.leaderboard-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.load-more {
  justify-self: center;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: min(720px, calc(100vh - 90px));
  padding: clamp(28px, 6vw, 72px) 0 clamp(36px, 7vw, 86px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: 6rem;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  color: #4d5c55;
  font-size: 1.16rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 7px;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms var(--ease-out-quart),
    box-shadow 160ms var(--ease-out-quart),
    background 160ms var(--ease-out-quart);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translate(1px, 1px);
}

.button.primary {
  border: 2px solid var(--ink);
  background: var(--leaf);
  color: #fffdf7;
  box-shadow: 5px 5px 0 var(--ink);
}

.button.secondary {
  border: 1px solid rgba(34, 49, 43, 0.22);
  background: rgba(255, 253, 247, 0.76);
  color: var(--ink);
}

.hero-preview {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 10px 10px 0 var(--ink), var(--shadow);
  transform: rotate(1.2deg);
}

.hero-preview::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--coral);
  color: #fffdf7;
  content: "Sudoku";
  font-size: 0.86rem;
  font-weight: 900;
}

.game-section {
  padding: 38px 0 70px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.game-card {
  display: grid;
  overflow: hidden;
  border: 2px solid rgba(34, 49, 43, 0.86);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: 6px 6px 0 rgba(34, 49, 43, 0.92);
  text-decoration: none;
  animation: soft-rise 420ms var(--ease-out-quint) both;
  animation-delay: calc(min(var(--i, 0), 8) * 55ms);
  transition:
    transform 180ms var(--ease-out-quart),
    box-shadow 180ms var(--ease-out-quart),
    border-color 180ms var(--ease-out-quart);
}

.game-card:hover {
  transform: translate(-2px, -3px);
  box-shadow: 9px 9px 0 rgba(34, 49, 43, 0.92);
  border-color: var(--ink);
}

.game-card:nth-child(1) { --i: 0; }
.game-card:nth-child(2) { --i: 1; }
.game-card:nth-child(3) { --i: 2; }
.game-card:nth-child(4) { --i: 3; }
.game-card:nth-child(5) { --i: 4; }
.game-card:nth-child(6) { --i: 5; }

.game-card img {
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
  background: #f4ead9;
  transition: transform 260ms var(--ease-out-quint), filter 260ms var(--ease-out-quint);
}

.game-card:hover img {
  transform: scale(1.025);
  filter: saturate(1.05) contrast(1.02);
}

.game-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.game-card h3 {
  margin: 0;
  font-size: 1.28rem;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid rgba(34, 49, 43, 0.2);
  border-radius: 999px;
  padding: 5px 9px;
  background: #f7f0df;
  color: #41564d;
  font-size: 0.78rem;
  font-weight: 800;
}

.info-band {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr auto;
  align-items: center;
  gap: 24px;
  border-block: 2px solid var(--ink);
  padding: clamp(28px, 5vw, 46px) 0;
}

.info-band p {
  margin-bottom: 0;
  color: #4d5c55;
  line-height: 1.7;
}

.seo-copy {
  max-width: 820px;
  padding: 58px 0 82px;
}

.seo-copy h2 {
  margin-bottom: 16px;
  font-size: 2.25rem;
}

.seo-copy p {
  color: #4d5c55;
  line-height: 1.8;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .hero-preview {
    transform: none;
  }

  .section-heading,
  .info-band {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 520px) {
  .site-header {
    width: min(100% - 28px, 1180px);
    padding: 12px 0 8px;
  }

  .compact-header {
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .compact-header .brand {
    flex: 1 1 auto;
    max-width: calc(100% - 148px);
  }

  .brand strong,
  .brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand strong {
    font-size: 0.95rem;
  }

  .brand small {
    display: block;
    max-width: 100%;
    font-size: 0.62rem;
    line-height: 1.15;
  }

  .top-nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .compact-header .top-nav {
    width: auto;
    max-width: 52vw;
    flex: 0 1 auto;
    margin-left: auto;
    padding-bottom: 0;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav a,
  .game-menu summary {
    min-height: 44px;
    white-space: nowrap;
  }

  .compact-header .top-nav a,
  .compact-header .game-menu summary {
    min-height: 40px;
    padding: 7px 9px;
    font-size: 0.82rem;
  }

  .compact-header .game-menu summary::after {
    width: 6px;
    height: 6px;
    margin-left: 6px;
  }

  .game-menu-list {
    position: fixed;
    top: 62px;
    right: 10px;
    left: auto;
    width: max-content;
    min-width: max-content;
    max-width: calc(100vw - 20px);
    max-height: min(68svh, 520px);
    overflow: auto;
    transform-origin: top right;
  }

  main {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    gap: 22px;
    padding: 18px 0 34px;
  }

  h1 {
    font-size: clamp(2.45rem, 14vw, 3.05rem);
  }

  h2,
  .seo-copy h2 {
    font-size: 2rem;
  }

  .hero-text {
    font-size: 1.02rem;
    line-height: 1.62;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 22px;
  }

  .button {
    min-height: 44px;
    padding: 0 12px;
  }

  .hero-preview {
    box-shadow: 6px 6px 0 var(--ink), var(--shadow);
  }

  .game-section {
    padding: 28px 0 46px;
  }

  .section-heading {
    margin-bottom: 16px;
  }

  .game-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .game-card {
    box-shadow: 4px 4px 0 rgba(34, 49, 43, 0.92);
  }

  .game-card:hover {
    transform: none;
    box-shadow: 4px 4px 0 rgba(34, 49, 43, 0.92);
  }

  .game-card:active,
  .button:active,
  .tool-button:active,
  .top-nav a:active,
  .game-menu summary:active {
    transform: translate(1px, 1px);
  }

  .game-card-body {
    gap: 8px;
    padding: 13px;
  }

  .game-card h3 {
    font-size: 1.16rem;
  }

  .game-card p {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .tag {
    padding: 4px 8px;
  }

  .info-band,
  .seo-copy {
    padding-block: 34px;
  }

  .site-footer {
    width: min(100% - 20px, 1180px);
    flex-direction: column;
    padding: 18px 0 24px;
  }

  .score-dialog,
  .leaderboard-dialog {
    width: min(100% - 20px, 560px);
    box-shadow: 4px 4px 0 var(--ink);
  }

  .score-dialog form,
  .leaderboard-dialog-inner {
    padding: 14px;
  }

  .dialog-actions,
  .leaderboard-dialog-head {
    align-items: stretch;
    flex-direction: column;
  }

  .leaderboard-list.full {
    max-height: min(56svh, 460px);
  }
}

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

@keyframes soft-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
