:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #10261d;
  --muted: #424947;
  --line: #a4ada2;
  --radius: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #4261ba; outline-offset: 4px; }
.shell { width: min(1440px, calc(100% - 80px)); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; min-height: 74px; border-bottom: 2px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: .22em; font-size: clamp(26px, 3.2vw, 45px); font-weight: 900; letter-spacing: -.067em; line-height: 1; text-decoration: none; }
.brand img { object-fit: contain; }
.nav { font-weight: 750; font-size: clamp(17px, 1.9vw, 28px); text-decoration: none; }
.nav:hover { text-decoration: underline; }
.hero { display: grid; grid-template-columns: .96fr 1.04fr; align-items: center; gap: 30px; padding-block: 30px 28px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(50px, 7vw, 110px); line-height: .94; letter-spacing: -.075em; font-weight: 900; }
.hero p { margin-top: 22px; color: var(--muted); font-size: clamp(19px, 2.25vw, 34px); line-height: 1.19; }
.hero-art { display: block; width: 100%; height: auto; aspect-ratio: 2.07; object-fit: cover; border-radius: 24px; }
h2 { font-size: clamp(28px, 3vw, 46px); font-weight: 900; letter-spacing: -.055em; line-height: 1.1; }
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 19px; }
article { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #52615b; border-radius: var(--radius); }
.cover { display: block; width: 100%; height: auto; aspect-ratio: 2.2; object-fit: cover; }
.card-copy { flex: 1; display: flex; align-items: start; flex-direction: column; gap: 9px; padding: 14px 23px 17px; }
h3 { font-size: clamp(21px, 2.42vw, 37px); line-height: 1.07; font-weight: 900; letter-spacing: -.045em; }
.card-copy p { flex: 1; color: #303a35; font-size: clamp(15px, 1.5vw, 23px); line-height: 1.3; }
.play, #restart { min-height: 42px; margin-top: 4px; padding: 6px 17px; border: 2px solid var(--ink); border-radius: 10px; color: var(--ink); background: transparent; font-weight: 750; font-size: clamp(17px, 1.7vw, 26px); }
.play span { margin-left: 3px; }
.play:hover, #restart:hover { background: var(--ink); color: var(--paper); }
.footer { margin-top: 24px; padding-block: 10px 15px; border-top: 2px solid var(--ink); }
.footer .brand { font-size: clamp(19px, 1.8vw, 28px); }
dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #071d16b5; }
.game-header, .game-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.close { width: 42px; height: 42px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 29px; line-height: 1; }
#game-help { color: var(--muted); margin-top: 8px; }
.game-toolbar { margin-block: 14px; }
#restart { margin: 0; font-size: 16px; }
#score, #result { font-weight: 700; }
#result { min-height: 1.2em; margin-top: 12px; }
#board { min-height: 232px; overflow: hidden; position: relative; border-radius: 12px; }
#board.stars { background: #103a2c url("/assets/stars.webp") center / cover; }
#board.target { background: #e4e9fa; }
#board.memory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px; background: #492666; }
canvas { display: block; width: 100%; outline-offset: -4px; touch-action: none; }
.tile { aspect-ratio: 1.35; min-height: 42px; border: 0; border-radius: 8px; color: #251835; background: #be81df; font-size: clamp(20px, 5vw, 35px); }
.tile[data-open] { background: #f49383; }
.tile:disabled { cursor: default; background: #f9d7a0; color: #251835; }
.bullseye { width: 58px; height: 58px; position: absolute; border: 2px solid #0d2e8a; border-radius: 50%; background: radial-gradient(circle, #f7e5bc 0 20%, #254db4 22% 42%, #f7e5bc 44% 63%, #254db4 65%); }
@media (max-width: 900px) {
  .shell { width: calc(100% - 42px); }
  .hero { gap: 20px; }
  .card-copy { padding-inline: 13px; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .top { min-height: 60px; }
  .brand img { width: 38px; }
  .hero { grid-template-columns: 1fr; gap: 21px; padding-block: 25px 28px; }
  .hero p { margin-top: 14px; }
  .hero-art { border-radius: 17px; }
  .catalog { grid-template-columns: 1fr; margin-top: 14px; }
  .wide-break { display: none; }
  dialog { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
