:root {
  color-scheme: light;
  --background: #fbf5ef;
  --surface: #fffcf8;
  --surface-muted: #fbf1ea;
  --header: #fff0e3;
  --text: #8e5c42;
  --text-muted: #9f8580;
  --accent: #a26167;
  --outline: #e1cebf;
  --orange: #ff9816;
  --brown: #8e5c42;
  --mint: #80cf75;
  --sky: #36a9b9;
  --gold: #e3b500;
  --plum: #8675d8;
  --cocoa: #965e3f;
  --coral: #e76f51;
  --indigo: #4b63b7;
  --shadow: 0 18px 44px rgba(105, 70, 51, 0.14);
  --shadow-soft: 0 10px 24px rgba(105, 70, 51, 0.1);
  --page: 1180px;
  --font: "Avenir Next", "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
}

body,
button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
canvas,
svg {
  display: block;
}

img {
  max-width: 100%;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--orange), transparent 35%);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  height: 72px;
  border-bottom: 1px solid color-mix(in srgb, var(--outline), transparent 35%);
  background: color-mix(in srgb, var(--background), transparent 10%);
  backdrop-filter: blur(18px);
}

.nav-shell,
.section-shell,
.hero-scene,
.footer-shell,
.download-shell {
  width: min(var(--page), calc(100% - 40px));
  margin: 0 auto;
}

.nav-shell {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand img {
  width: 44px;
  height: 44px;
  border: 1px solid var(--outline);
  border-radius: 13px;
  box-shadow: var(--shadow-soft);
}

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

.brand strong {
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.brand small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 750;
}

.site-header nav a {
  transition: color 160ms ease;
}

.site-header nav a:hover {
  color: var(--accent);
}

.nav-cta {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 152, 22, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 152, 22, 0.28);
}

.hero {
  position: relative;
  min-height: calc(100svh - 108px);
  max-height: 860px;
  overflow: hidden;
  background: var(--background);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 72px;
  height: 72px;
  left: -22px;
  top: 76px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--header), transparent 30%);
  box-shadow:
    88px 0 0 color-mix(in srgb, var(--header), transparent 46%),
    176px 0 0 color-mix(in srgb, var(--header), transparent 62%),
    0 88px 0 color-mix(in srgb, var(--header), transparent 42%),
    88px 88px 0 color-mix(in srgb, var(--header), transparent 56%),
    0 176px 0 color-mix(in srgb, var(--header), transparent 62%);
  transform: rotate(-7deg);
}

.hero-scene {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: calc(100svh - 108px);
  max-height: 860px;
  display: flex;
  align-items: center;
  padding: 34px 0 54px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(550px, 48%);
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 76px;
  font-weight: 950;
  line-height: 0.94;
}

.hero-lead {
  max-width: 510px;
  margin-bottom: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.55;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.store-button {
  min-width: 176px;
  min-height: 58px;
  padding: 9px 18px 9px 14px;
  border: 2px solid transparent;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

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

.store-button svg {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  fill: currentColor;
}

.store-button span,
.store-button small,
.store-button strong {
  display: block;
}

.store-button small {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.store-button strong {
  margin-top: 3px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.store-button-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 152, 22, 0.28);
}

.store-button-secondary {
  border-color: var(--outline);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.hero-facts {
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 750;
  list-style: none;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-facts li:not(:first-child)::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 12px;
  border-radius: 2px;
  background: var(--orange);
}

.hero-facts strong {
  color: var(--accent);
  font-size: 16px;
}

.game-preview {
  position: absolute;
  z-index: 1;
  right: 0;
  top: 50%;
  width: min(520px, 47%);
  padding: 18px 20px 20px;
  border: 1px solid var(--outline);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(-50%) rotate(1.2deg);
}

.game-preview.preview-dark {
  --surface: #26211f;
  --surface-muted: #342c28;
  --header: #3a2d28;
  --text: #fff4ec;
  --text-muted: #cfbbb0;
  --accent: #e59aa1;
  --outline: #664e44;
}

.preview-header {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 12px;
}

.preview-header > div {
  min-width: 0;
  text-align: center;
}

.preview-header strong,
.preview-header span {
  display: block;
}

.preview-header strong {
  color: var(--accent);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.05;
}

.preview-header > div span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.round-button,
.icon-button {
  padding: 0;
  border: 1px solid var(--outline);
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 140ms ease, background 140ms ease;
}

.round-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 900;
}

.round-button:hover,
.icon-button:hover {
  transform: translateY(-2px);
  background: var(--header);
}

.preview-status {
  margin: 14px 0 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.status-pill,
.heart-pill {
  min-height: 42px;
  padding: 6px 15px;
  border: 1px solid var(--outline);
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  box-shadow: 0 6px 14px rgba(105, 70, 51, 0.08);
}

.status-pill {
  gap: 8px;
  color: #2d9257;
}

.status-pill img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.heart-pill {
  color: #ff4f58;
  font-size: 20px;
  line-height: 1;
}

.preview-rules {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.preview-rules span {
  min-height: 42px;
  padding: 7px 6px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.22;
  text-align: center;
}

.playfield {
  position: relative;
  width: min(390px, 100%);
  margin: 0 auto;
}

.interactive-board {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1;
  padding: 4px;
  border: 2px solid var(--surface);
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(105, 70, 51, 0.1);
}

.board-cell {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  transition: filter 120ms ease, transform 180ms cubic-bezier(0.2, 1.4, 0.4, 1);
  animation: board-cell-in 380ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  animation-delay: var(--delay, 0ms);
}

.board-cell.wrong-cell {
  animation: wrong-shake 360ms ease;
}

.board-cell:hover {
  filter: brightness(1.06);
}

.board-cell.marked::after {
  content: "\00d7";
  color: color-mix(in srgb, var(--text), transparent 12%);
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
  animation: mark-pop 280ms cubic-bezier(0.2, 1.45, 0.45, 1);
}

.board-cell.cat-cell::after {
  content: "";
  width: 86%;
  height: 86%;
  background: url("./assets/icons/catdoku-icon.png") center / contain no-repeat;
  filter: drop-shadow(0 4px 5px rgba(55, 35, 27, 0.16));
  animation: cat-pop 420ms cubic-bezier(0.16, 1.55, 0.45, 1);
}

.board-cell.hint-cell {
  z-index: 3;
  box-shadow: 0 0 0 4px var(--orange);
  animation: hint-bounce 700ms ease-in-out 2;
}

.cat-companion {
  position: absolute;
  z-index: 4;
  top: -82px;
  right: -65px;
  width: 130px;
  height: 110px;
  pointer-events: none;
  transform: rotate(-4deg);
}

.cat-companion canvas,
.cat-companion img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cat-companion img {
  transition: opacity 160ms ease;
}

.cat-companion.is-loaded img {
  opacity: 0;
}

.board-success {
  position: absolute;
  z-index: 8;
  inset: 0;
  border-radius: 18px;
  display: grid;
  place-content: center;
  justify-items: center;
  background: rgba(56, 38, 31, 0.78);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.2, 1.3, 0.4, 1);
}

.board-success.visible {
  opacity: 1;
  transform: scale(1);
}

.board-success strong,
.board-success span {
  display: block;
  text-align: center;
}

.board-success strong {
  color: #ffe176;
  font-size: 34px;
  font-weight: 950;
}

.board-success span {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 800;
}

.confetti-piece {
  position: absolute;
  z-index: 9;
  width: 7px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti-fall 900ms ease-out forwards;
}

.preview-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-actions > span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
}

.preview-actions > div {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 950;
}

.scroll-cue {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 850;
  transform: translateX(-50%);
}

.scroll-cue b {
  color: var(--orange);
  font-size: 18px;
  animation: scroll-cue 1200ms ease-in-out infinite;
}

.section {
  padding: 104px 0;
}

.section-rules {
  background: var(--header);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-heading h2,
.daily-copy h2,
.download-shell h2 {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 52px;
  font-weight: 950;
  line-height: 1.04;
}

.section-heading > p:last-child,
.daily-copy > p:not(.kicker) {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.6;
}

.section-heading-row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.section-heading-row h2 {
  margin-bottom: 0;
}

.rule-lab {
  border: 1px solid var(--outline);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.rule-tabs {
  min-height: 62px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  border-bottom: 1px solid var(--outline);
  background: var(--surface-muted);
}

.rule-tabs button,
.difficulty-control button {
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 850;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.rule-tabs button[aria-selected="true"],
.difficulty-control button.active {
  background: var(--accent);
  color: var(--surface);
}

.rule-tabs button:hover,
.difficulty-control button:hover {
  transform: translateY(-1px);
}

.rule-demo {
  min-height: 390px;
  padding: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 70px;
}

.rule-copy span {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.rule-copy h3 {
  margin: 24px 0 12px;
  color: var(--text);
  font-size: 30px;
  font-weight: 950;
  line-height: 1.1;
}

.rule-copy p {
  max-width: 460px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.55;
}

.rule-board {
  width: 100%;
  aspect-ratio: 1;
  padding: 5px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--outline), var(--shadow-soft);
}

.rule-cell {
  position: relative;
  border-radius: 11px;
  display: grid;
  place-items: center;
  transition: opacity 180ms ease, transform 220ms ease, filter 180ms ease;
}

.rule-cell::after {
  color: var(--text);
  font-size: 25px;
  font-weight: 950;
}

.rule-cell.rule-cat::after {
  content: "";
  width: 80%;
  height: 80%;
  background: url("./assets/icons/catdoku-icon.png") center / contain no-repeat;
}

.rule-cell.rule-blocked::after {
  content: "\00d7";
  opacity: 0.68;
}

.rule-cell.rule-dim {
  opacity: 0.26;
  filter: saturate(0.35);
}

.rule-cell.rule-focus {
  z-index: 2;
  box-shadow: 0 0 0 4px var(--orange);
  transform: scale(1.04);
}

.section-screens {
  overflow: hidden;
  background: var(--background);
}

.carousel-actions {
  display: flex;
  gap: 10px;
}

.screens-viewport {
  width: calc(100vw - max(20px, (100vw - var(--page)) / 2));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.screens-viewport::-webkit-scrollbar {
  display: none;
}

.screens-track {
  width: max-content;
  padding: 6px 40px 30px 2px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 274px;
  gap: 24px;
}

.screens-track figure {
  margin: 0;
  scroll-snap-align: start;
}

.screens-track img {
  width: 274px;
  height: auto;
  border: 1px solid var(--outline);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.section-daily {
  border-block: 1px solid var(--outline);
  background: var(--surface-muted);
}

.daily-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: 80px;
}

.daily-copy > p:not(.kicker) {
  max-width: 500px;
}

.text-link {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
}

.text-link span {
  color: var(--orange);
  font-size: 20px;
  transition: transform 160ms ease;
}

.text-link:hover span {
  transform: translateX(4px);
}

.leaderboard {
  border: 1px solid var(--outline);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.leaderboard-head {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--outline);
  background: var(--header);
}

.leaderboard-head strong,
.leaderboard-head span {
  display: block;
}

.leaderboard-head strong {
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
}

.leaderboard-head span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.difficulty-control {
  width: 230px;
  min-height: 42px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border: 1px solid var(--outline);
  border-radius: 14px;
  background: var(--surface);
}

.difficulty-control button {
  border-radius: 10px;
  font-size: 11px;
}

.leaderboard ol {
  margin: 0;
  padding: 8px 14px;
  list-style: none;
}

.leaderboard li {
  min-height: 64px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 38px 42px 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--outline);
  font-weight: 850;
}

.leaderboard li:last-child {
  border-bottom: 0;
}

.leaderboard li b {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-muted);
}

.leaderboard li:first-child b {
  background: var(--orange);
  color: #fff;
}

.leaderboard li img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.leaderboard time {
  color: var(--accent);
  font-size: 18px;
  font-weight: 950;
}

.leaderboard li.current {
  margin: 8px 0;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent), var(--surface) 88%);
}

.section-download {
  padding: 78px 0;
  background: var(--brown);
  color: #fff;
}

.download-shell {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
}

.download-shell > img {
  width: 132px;
  height: 132px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
}

.download-shell .kicker {
  color: #ffe176;
}

.download-shell h2 {
  max-width: 620px;
  margin-bottom: 0;
  color: #fff;
}

.download-shell .store-row {
  margin-top: 0;
  display: grid;
}

.download-shell .store-button-primary {
  background: var(--orange);
}

.download-shell .store-button-secondary {
  border-color: rgba(255, 255, 255, 0.42);
  background: transparent;
  color: #fff;
  box-shadow: none;
}

footer {
  padding: 28px 0;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-shell div {
  display: flex;
  gap: 22px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes board-cell-in {
  from {
    opacity: 0;
    transform: scale(0.68);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes wrong-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px) scale(0.94);
  }
  75% {
    transform: translateX(6px) scale(0.94);
  }
}

@keyframes mark-pop {
  0% { opacity: 0; transform: scale(1.22); }
  65% { opacity: 1; transform: scale(0.86); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes cat-pop {
  0% { opacity: 0; transform: scale(0.55); }
  72% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-8px); }
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}

@keyframes scroll-cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@media (max-width: 1020px) {
  .site-header nav {
    display: none;
  }

  .hero {
    min-height: 820px;
    max-height: none;
  }

  .hero-scene {
    min-height: 820px;
    max-height: none;
  }

  .hero-copy {
    width: 45%;
  }

  h1 {
    font-size: 60px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .game-preview {
    width: 50%;
  }

  .cat-companion {
    right: -38px;
  }

  .rule-demo {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 44px;
  }

  .daily-layout {
    gap: 42px;
  }

  .download-shell {
    grid-template-columns: 104px 1fr;
  }

  .download-shell > img {
    width: 104px;
    height: 104px;
  }

  .download-shell .store-row {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 220px));
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 64px;
  }

  .nav-shell,
  .section-shell,
  .hero-scene,
  .footer-shell,
  .download-shell {
    width: min(100% - 28px, var(--page));
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand small,
  .nav-cta {
    display: none;
  }

  .hero,
  .hero-scene {
    min-height: calc(100svh - 92px);
    max-height: none;
  }

  .hero {
    overflow: visible;
  }

  .hero-scene {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 20px;
    padding: 22px 0 44px;
  }

  .hero-copy {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .kicker {
    margin-bottom: 8px;
    font-size: 11px;
  }

  h1 {
    margin-bottom: 10px;
    font-size: 48px;
  }

  .hero-lead {
    max-width: 430px;
    margin-inline: auto;
    font-size: 15px;
    line-height: 1.42;
  }

  .hero-copy .store-row {
    margin-top: 16px;
    justify-content: center;
  }

  .hero-copy .store-button {
    min-width: 148px;
    min-height: 50px;
    padding: 7px 12px;
    border-radius: 16px;
  }

  .hero-copy .store-button svg {
    width: 23px;
    height: 23px;
  }

  .hero-copy .store-button strong {
    font-size: 14px;
  }

  .hero-copy .store-button small {
    font-size: 8px;
  }

  .hero-facts {
    display: none;
  }

  .game-preview {
    position: relative;
    top: auto;
    right: auto;
    width: min(100%, 430px);
    min-width: 0;
    justify-self: center;
    margin: 0 auto;
    padding: 12px 14px 14px;
    border-radius: 20px;
    transform: none;
  }

  .preview-header {
    grid-template-columns: 38px 1fr 38px;
  }

  .round-button {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .preview-header strong {
    font-size: 20px;
  }

  .preview-status {
    margin: 8px 0;
  }

  .status-pill,
  .heart-pill {
    min-height: 34px;
    padding: 4px 12px;
  }

  .status-pill img {
    width: 24px;
    height: 24px;
  }

  .heart-pill {
    font-size: 16px;
  }

  .preview-rules {
    display: none;
  }

  .playfield {
    width: min(270px, 72vw);
  }

  .interactive-board {
    border-radius: 14px;
    gap: 2px;
  }

  .board-cell {
    border-radius: 7px;
  }

  .board-cell.marked::after {
    font-size: 23px;
  }

  .cat-companion {
    top: -52px;
    right: -48px;
    width: 84px;
    height: 72px;
  }

  .preview-actions {
    margin-top: 8px;
  }

  .preview-actions > span {
    font-size: 9px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .scroll-cue {
    bottom: 3px;
  }

  .section {
    padding: 76px 0;
  }

  .section-heading h2,
  .daily-copy h2,
  .download-shell h2 {
    font-size: 38px;
  }

  .section-heading > p:last-child,
  .daily-copy > p:not(.kicker) {
    font-size: 16px;
  }

  .rule-tabs {
    min-height: 54px;
  }

  .rule-tabs button {
    font-size: 12px;
  }

  .rule-demo {
    min-height: 0;
    padding: 28px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .rule-copy {
    text-align: center;
  }

  .rule-copy span {
    margin: 0 auto;
  }

  .rule-copy h3 {
    font-size: 25px;
  }

  .rule-copy p {
    margin-inline: auto;
  }

  .rule-board {
    width: min(100%, 340px);
    margin: 0 auto;
  }

  .section-heading-row {
    align-items: center;
  }

  .screens-viewport {
    width: calc(100vw - 14px);
  }

  .screens-track {
    grid-auto-columns: 236px;
    gap: 18px;
  }

  .screens-track img {
    width: 236px;
    border-radius: 24px;
  }

  .daily-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .leaderboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .difficulty-control {
    width: 100%;
  }

  .section-download {
    padding: 64px 0;
  }

  .download-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .download-shell > img {
    width: 96px;
    height: 96px;
    border-radius: 24px;
  }

  .download-shell .store-row {
    width: min(100%, 420px);
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .download-shell .store-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .hero-scene {
    gap: 14px;
    padding-top: 16px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .hero-copy .store-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-copy .store-button {
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .hero-copy .store-button strong {
    font-size: 12px;
    white-space: nowrap;
  }

  .playfield {
    width: min(238px, 68vw);
  }

  .preview-actions > span {
    max-width: 140px;
  }

  .section-heading-row {
    align-items: flex-end;
  }

  .section-heading h2,
  .daily-copy h2,
  .download-shell h2 {
    font-size: 34px;
  }

  .rule-demo {
    padding: 22px 18px;
  }

  .rule-tabs button {
    padding-inline: 4px;
    font-size: 10px;
  }

  .leaderboard li {
    grid-template-columns: 34px 36px 1fr auto;
    gap: 8px;
  }

  .leaderboard li img {
    width: 34px;
    height: 34px;
  }

  .leaderboard time {
    font-size: 16px;
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-height: 720px) and (max-width: 760px) {
  .hero-copy .kicker,
  .hero-copy .hero-lead,
  .scroll-cue {
    display: none;
  }

  .hero-copy .store-row {
    margin-top: 10px;
  }

  .playfield {
    width: min(220px, 62vw);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #181615;
    --surface: #26211f;
    --surface-muted: #332b27;
    --header: #352824;
    --text: #f8ede5;
    --text-muted: #cdbab0;
    --accent: #e59aa1;
    --outline: #654e45;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.22);
  }

  .status-pill {
    color: #80cf75;
  }

  .store-button-primary,
  .nav-cta {
    color: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
