:root {
  color-scheme: dark;
  --background: #101216;
  --surface: #131518;
  --ink: #f6f5ee;
  --muted: #cfcec6;
  --line: #535457;
  --accent: #ddfc52;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; }
p, h1, h2 { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(calc(100% - 48px), 1472px); margin-inline: auto; }

.site-header, .site-footer {
  display: flex; align-items: center; gap: 24px; margin-inline: auto;
  width: min(calc(100% - 72px), 1440px);
}
.site-header { border-bottom: 1px solid var(--line); min-height: 60px; }
.site-header > :last-child:not(:first-child), .site-footer > :nth-child(2) { margin-left: auto; }
.site-header a, .site-footer a { text-decoration: none; }
.site-header a:hover, .site-footer a:hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); min-height: 59px; font-size: .875rem; margin-top: 26px; }
.brand { display: inline-flex; align-items: center; gap: .55em; font-weight: 750; font-size: clamp(1.2rem, 2.05vw, 2rem); letter-spacing: -.035em; }
.brand-mark { width: 1.08em; height: 1.08em; border-radius: 50%; background: conic-gradient(var(--accent) 0 106deg, var(--background) 106deg 120deg, var(--accent) 120deg 225deg, var(--background) 225deg 239deg, var(--accent) 239deg 346deg, var(--background) 346deg); display: inline-block; }

.catalog h1 { font-size: clamp(2.55rem, 5.1vw, 5.25rem); line-height: 1.05; letter-spacing: -.055em; padding: .23em .19em .24em; }
.cards { display: grid; grid-template-columns: 1.16fr 1fr; grid-template-rows: .95fr 1.05fr; gap: 14px; }
.card { position: relative; display: flex; align-items: end; min-width: 0; min-height: clamp(230px, 23vw, 370px); isolation: isolate; overflow: hidden; border-radius: 16px; text-decoration: none; }
.card.turnlace { grid-row: span 2; }
.card img, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.card::after, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.card::after { background: linear-gradient(to top, rgb(9 11 13 / 94%), rgb(9 11 13 / 56%) 19%, transparent 59%); }
.card img { transition: transform .24s ease; }
.card:hover img { transform: scale(1.025); }
.card-copy { padding: 24px 66px 23px 25px; }
.card h2 { font-size: clamp(1.85rem, 3.15vw, 3rem); line-height: 1; letter-spacing: -.045em; }
.card.turnlace h2 { font-size: clamp(2.7rem, 5.2vw, 5.1rem); }
.card p { font-size: clamp(.94rem, 1.45vw, 1.36rem); line-height: 1.24; }
.card.turnlace .card-copy { max-width: 530px; }
.status { color: var(--accent); font-weight: 700; }
.card .status { margin: .26em 0 .2em; }
.card-arrow { position: absolute; right: 22px; bottom: 22px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #151900; background: var(--accent); font-size: 1.55rem; }

.back { display: inline-flex; align-items: center; gap: .5em; min-height: 45px; padding: 0 12px; text-decoration: none; }
.back span, .game-links a span { color: var(--accent); }
.hero { display: flex; flex-direction: column; justify-content: center; position: relative; isolation: isolate; overflow: hidden; border-radius: 18px; min-height: clamp(300px, 25vw, 420px); padding: 32px 38px; }
.hero img { object-position: center 44%; }
.hero::after { background: linear-gradient(90deg, rgb(6 19 23 / 96%) 2%, rgb(8 19 22 / 71%) 33%, transparent 66%); }
.hero h1 { font-size: clamp(3.15rem, 6vw, 6rem); line-height: .98; letter-spacing: -.055em; }
.hero .status { font-size: clamp(1.2rem, 2vw, 1.9rem); margin: .19em 0 .36em; }
.description { max-width: 23em; font-size: clamp(1rem, 1.63vw, 1.55rem); line-height: 1.22; }
.hero-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.hero-actions { margin-top: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .35em; min-height: 46px; border: 1px solid transparent; border-radius: 9px; padding: .52em 1em; font: inherit; font-weight: 720; text-align: center; text-decoration: none; cursor: pointer; }
.primary { background: var(--accent); color: #141700; }
.primary:hover { background: #efff9a; }
.secondary { border-color: var(--ink); color: var(--ink); background: rgb(15 18 22 / 65%); }
.secondary:hover { background: #292c30; }
.play-action { display: grid; text-align: center; gap: 6px; }
.hint { color: var(--muted); }
.details { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(250px, .9fr); gap: 38px; padding: 10px 18px 0; }
.details.compact { grid-template-columns: 1fr; }
.details h2 { font-size: clamp(1.55rem, 2.6vw, 2.7rem); letter-spacing: -.04em; margin: 0 0 10px; }
.screens { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.screens img { width: 100%; border-radius: 12px; }
.game-links { display: grid; gap: 13px; align-content: start; justify-items: start; padding-top: clamp(25px, 4.2vw, 64px); font-weight: 650; }
.compact .game-links { padding-top: 12px; }
.game-links a:first-child, .game-links a:hover { color: var(--accent); }
.game-links a span { margin-left: .45em; }
.sent { margin: 14px 18px 2px; color: var(--accent); font-weight: 700; }
.text-page { min-height: 56vh; max-width: 900px; line-height: 1.55; }
.text-page h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.045em; line-height: 1.1; margin: .45em 0 .55em; }
.text-page h2 { font-size: 1.35rem; }
.text-page p { margin: .7em 0; }
.inbox article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.inbox-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; justify-content: space-between; }
.inbox time { color: var(--muted); }
.inbox .message { white-space: pre-wrap; overflow-wrap: anywhere; }

dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 13px; padding: 24px; width: min(520px, calc(100% - 26px)); max-height: calc(100% - 24px); }
dialog::backdrop { background: rgb(0 0 0 / 65%); }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 16px; }
.dialog-head h2 { font-size: clamp(1.25rem, 4vw, 1.8rem); letter-spacing: -.025em; }
.close { min-width: 35px; text-align: center; line-height: 1; font-size: 1.6rem; text-decoration: none; }
form label { display: block; margin: 0 0 7px; font-weight: 600; }
textarea, input[type="email"] { display: block; width: 100%; border: 1px solid #77797b; border-radius: 8px; margin: 0 0 15px; padding: 10px 11px; background: #101214; color: var(--ink); font: inherit; }
textarea { resize: vertical; }
.policy, .hint { font-size: .9rem; }
.hint { margin: -5px 0 13px; }
.form-actions { align-items: center; margin-top: 22px; gap: 22px; }
.form-actions a { text-decoration: none; }
.error { color: #ffaaa5; margin: 0 0 12px; }

@media (max-width: 720px) {
  .shell { width: calc(100% - 24px); }
  .site-header, .site-footer { width: calc(100% - 36px); gap: 12px; min-height: 49px; }
  .site-footer { font-size: .74rem; }
  .site-header > :last-child:not(:first-child) { font-size: .89rem; }
  .cards { display: grid; grid-template-columns: 1fr; grid-template-rows: auto; gap: 10px; }
  .card { min-height: clamp(186px, 46vw, 310px); border-radius: 12px; }
  .card.turnlace { min-height: clamp(264px, 74vw, 470px); }
  .card-copy { padding: 16px 53px 16px 15px; }
  .card-arrow { right: 14px; bottom: 16px; width: 32px; height: 32px; font-size: 1.25rem; }
  .hero { justify-content: end; min-height: 335px; padding: 120px 14px 14px; border-radius: 12px; }
  .hero img { object-position: 65% center; }
  .hero::after { background: linear-gradient(to top, var(--background) 3%, rgb(10 14 19 / 85%) 22%, rgb(10 14 19 / 38%) 54%, transparent 81%); }
  .hero-copy { padding-inline: 3px; }
  .hero h1 { font-size: clamp(2.65rem, 9vw, 4.2rem); }
  .description { max-width: 18em; }
  .hero-actions { display: grid; margin-top: 17px; gap: 8px; }
  .details { display: block; padding: 0 4px; }
  .screens { grid-template-columns: repeat(3, minmax(132px, 39%)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
  .game-links { gap: 0; padding-top: 12px; }
  .game-links a { display: inline-flex; align-items: center; min-height: 39px; }
  dialog { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) { .card img { transition: none; } }
