@font-face {
  font-family: Bricolage;
  src: url("/assets/bricolage.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f6ee;
  --white: #fffcf4;
  --ink: #20362b;
  --muted: #586658;
  --line: #d9dacc;
  --accent: #c13c29;
  --peach: #f5cdbb;
  --player-backdrop: #172a21;
  --display: Bricolage, "Arial", sans-serif;
  --mono: ui-monospace, "Menlo", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 1rem/1.55 system-ui, sans-serif; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, ul { margin: 0; }
.shell { width: min(100% - 96px, 1232px); margin-inline: auto; }
.skip-link { position: absolute; top: -100px; left: 12px; background: var(--white); padding: 8px 12px; z-index: 2; }
.skip-link:focus { top: 12px; }

.site-header { border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line); }
.header-content { min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.brand { width: fit-content; display: inline-flex; align-items: center; gap: 8px; font: 800 1.55rem/1 var(--display); letter-spacing: -.045em; white-space: nowrap; }
.brand-accent { color: var(--accent); }
.brand-mark { --heart-color: var(--accent); display: grid; place-items: center; width: 30px; aspect-ratio: 1; color: var(--heart-color); }
.brand-mark > span {
  display: block; width: 92%; aspect-ratio: 1; background: currentColor;
  clip-path: polygon(0 22%, 11% 22%, 11% 11%, 33% 11%, 33% 22%, 44% 22%, 44% 33%, 56% 33%, 56% 22%, 67% 22%, 67% 11%, 89% 11%, 89% 22%, 100% 22%, 100% 56%, 89% 56%, 89% 67%, 78% 67%, 78% 78%, 67% 78%, 67% 89%, 56% 89%, 56% 100%, 44% 100%, 44% 89%, 33% 89%, 33% 78%, 22% 78%, 22% 67%, 11% 67%, 11% 56%, 0 56%);
}
.site-nav { display: flex; align-items: center; gap: 29px; color: var(--muted); font-weight: 650; font-size: .9rem; }
.site-nav a { padding-block: 12px; white-space: nowrap; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.search { position: relative; justify-self: end; width: min(100%, 231px); }
.search input { width: 100%; min-height: 42px; padding: 9px 10px 9px 37px; background: transparent; border: 1px solid #cbd0c0; border-radius: 5px; color: inherit; font-size: .9rem; }
.search input::placeholder { color: var(--muted); }
.search button { position: absolute; inset: 1px auto 1px 1px; width: 34px; background: transparent; color: var(--ink); border: 0; border-radius: 4px; }
.search button:hover { color: var(--accent); }
.search-icon { width: 13px; height: 13px; border: 1.6px solid currentColor; border-radius: 50%; position: absolute; top: 11px; left: 11px; }
.search-icon::after { content: ""; width: 6px; height: 2px; position: absolute; background: currentColor; inset: 9px auto auto 8px; transform: rotate(45deg); transform-origin: left; }

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: clamp(24px, 5vw, 84px);
  padding-block: clamp(32px, 5vw, 61px) 36px;
  border-bottom: 1px solid var(--ink);
}
.hero-copy { align-self: center; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--muted); font: 700 .79rem/1.4 var(--mono); letter-spacing: .085em; text-transform: uppercase; }
.eyebrow > span { width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }
.hero h1 { font: 800 clamp(3.15rem, 6.7vw, 6.65rem)/.96 var(--display); letter-spacing: -.045em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-description { color: var(--muted); max-width: 36ch; margin: 21px 0 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; width: fit-content; min-height: 45px; border: 1px solid transparent; border-radius: 4px; padding: 8px 17px; font-weight: 720; font-size: .94rem; }
.button--ink { background: var(--ink); color: var(--white); }
.button--ink:hover { background: #355343; }
.button--coral { background: var(--accent); color: #fff; }
.button--coral:hover { background: #a93223; }
.hero-art {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center; min-height: 335px;
  padding: 30px min(6vw, 70px);
  border: 1px solid #b4c7ab;
  background-color: #d7e4cc;
  background-image: linear-gradient(#647f6c28 1px, transparent 1px), linear-gradient(90deg, #647f6c28 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero-orbit { position: absolute; z-index: -1; width: 83%; height: 65%; border: 1px solid #47634a; border-radius: 50%; transform: rotate(-22deg); }
.hero-spark { position: absolute; right: 5%; top: 6%; color: var(--accent); font-size: 2.7rem; line-height: 1; }
.hero-heart { width: clamp(110px, 20vw, 213px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--ink); background: var(--white); transform: rotate(-7deg); box-shadow: 6px 6px var(--ink); }
.hero-heart .brand-mark { width: 61%; }
.feature {
  display: block; width: min(100%, 430px);
  transform: rotate(-3.5deg); transition: transform .18s ease;
  border: 1px solid var(--ink); box-shadow: 6px 6px var(--ink);
}
.feature:hover, .feature:focus-visible { transform: rotate(0deg); }
.feature-cover { display: block; }
.feature-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; background: var(--white); border-top: 1px solid var(--ink); }
.feature-copy { display: grid; gap: 2px; }
.feature-copy small { font: 700 .69rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.feature-copy strong { font: 800 clamp(1.15rem, 2vw, 1.6rem)/1.05 var(--display); letter-spacing: -.04em; }
.feature-play { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: var(--white); background: var(--accent); border-radius: 50%; }
.play-icon { display: inline-block; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent currentColor; margin-left: 2px; }

.catalogue { margin: 30px 0 55px; }
.catalogue--browse { margin-top: 49px; min-height: 42vh; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 12px; }
.section-heading h1, .section-heading h2, .content-page h1 { font: 800 clamp(2rem, 4vw, 3.25rem)/1.02 var(--display); letter-spacing: -.043em; }
.catalogue--browse h1, .content-page h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
.results-count { color: var(--muted); font-size: .9rem; }
.text-link { font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.text-link:hover { color: var(--accent); }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 17px 0; }
.filters a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; min-height: 37px; border: 1px solid #cbd0c0; border-radius: 3px; color: var(--ink); font-size: .875rem; font-weight: 650; }
.filters a:hover { border-color: var(--ink); }
.filters a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.filter-icon { background: currentColor; opacity: .9; width: 12px; aspect-ratio: 1; }
.filter-icon--all { clip-path: polygon(0 0, 42% 0, 42% 42%, 0 42%, 0 0,58% 0,100% 0,100% 42%,58% 42%,58% 0,100% 100%,58% 100%,58% 58%,100% 58%,100% 100%,0 100%,0 58%,42% 58%,42% 100%); }
.filter-icon--puzzle { clip-path: polygon(15% 20%, 42% 20%, 42% 2%, 64% 2%, 64% 20%, 90% 20%, 90% 49%, 75% 49%, 75% 66%, 90% 66%, 90% 95%, 15% 95%); }
.filter-icon--arcade { clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%); }
.filter-icon--racing { clip-path: polygon(0 0, 100% 0, 100% 65%, 17% 65%, 17% 100%, 0 100%); }
.filter-icon--action { clip-path: polygon(50% 0, 100% 100%, 50% 73%, 0 100%); }
.filter-icon--runner { clip-path: polygon(0 0, 54% 0, 100% 50%, 54% 100%, 0 100%, 46% 50%); }
.filter-icon--simulation { clip-path: polygon(0 58%, 30% 58%, 30% 100%, 0 100%, 0 58%, 35% 32%, 65% 32%, 65% 100%, 35% 100%, 35% 32%, 70% 0, 100% 0, 100% 100%, 70% 100%, 70% 0); }
.game-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); list-style: none; gap: 18px 13px; padding: 0; }
.game-card { min-width: 0; }
.game-card a { display: block; height: 100%; padding: 7px 7px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.game-card a:hover { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.cover { aspect-ratio: 16/10; overflow: hidden; border-radius: 2px; }
.cover img { width: 100%; height: 100%; object-fit: cover; color: transparent; }
.cover--arcade { background: #b7c7dd; }
.cover--puzzle { background: #d9e6b8; }
.cover--runner { background: #ebd098; }
.cover--action { background: #c7a3be; }
.cover--simulation { background: #ebac88; }
.cover--racing { background: #b3cbd3; }
.game-name { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; padding: 8px 3px 0; }
.game-name h3 { font: 800 1.07rem/1.18 var(--display); letter-spacing: -.028em; overflow-wrap: anywhere; }
.card-play { color: var(--accent); line-height: 1; }
.card-play .play-icon { border-width: 4px 0 4px 6px; }
.game-card p { margin: 3px 3px 0; color: var(--muted); font-size: .81rem; }
.empty { border-top: 1px solid var(--line); padding-block: 24px; }
.empty p { margin-block: 6px 12px; color: var(--muted); }

.game-page { max-width: 960px; margin: 26px auto 0; }
.breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 12px; font-size: .875rem; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.game-heading { margin-bottom: 21px; }
.game-heading h1 { font: 800 clamp(2.5rem, 5vw, 4.5rem)/1.02 var(--display); letter-spacing: -.043em; }
.game-heading p { color: var(--muted); max-width: 62ch; margin-top: 8px; }
.game-stage { position: relative; display: grid; place-items: center; overflow: hidden; min-height: 220px; border: 1px solid var(--ink); border-radius: 4px; background: var(--player-backdrop); }
.game-stage--landscape, .game-stage--all { aspect-ratio: 4/3; max-height: 75svh; }
.game-stage--portrait { height: min(680px, 75svh); }
.game-stage > .cover { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.stage-start { z-index: 1; }
.player-unavailable { color: #fff; text-align: center; padding: 8px 12px; }
.game-stage.is-playing > .cover { display: none; }
.game-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--player-backdrop); }
.game-stage--portrait iframe { width: min(100%, 480px); margin-inline: auto; }
.player-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 6px; font-size: .875rem; color: var(--muted); }
.player-toolbar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.player-toolbar button { border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink); min-height: 44px; padding: 5px 12px; }
.player-toolbar button:hover { border-color: var(--ink); }
.player-toolbar [data-fullscreen] { background: var(--ink); color: var(--white); }
.player-toolbar [data-fullscreen]:hover { background: #355343; }
.player-toolbar [data-player-status]:empty { display: none; }
.has-expanded-player, .has-expanded-player body { overflow: hidden; overscroll-behavior: none; }
.has-fullscreen-player, .has-fullscreen-player body { background: var(--player-backdrop); }
.player.is-expanded { position: fixed; z-index: 5; inset: 0; width: 100%; height: 100%; height: 100dvh; }
.player.is-fullscreen { display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--player-backdrop); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.player.is-fullscreen::backdrop { background: var(--player-backdrop); }
.player.is-fullscreen .game-stage { width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; container-type: size; --frame-ratio: calc(4 / 3); }
.player.is-fullscreen .game-stage--portrait { --frame-ratio: .75; }
@media (orientation: portrait) {
  .player.is-fullscreen .game-stage--all { --frame-ratio: .75; }
}
.player.is-fullscreen .game-stage > :is(iframe, .cover) {
  width: min(100cqw, calc(100cqh * var(--frame-ratio)));
  height: min(100cqh, calc(100cqw / var(--frame-ratio)));
  margin: auto;
  border-radius: 0;
}
.player.is-fullscreen .player-toolbar { justify-content: center; padding: 0 12px 12px; color: var(--white); background: var(--player-backdrop); }
.player.is-fullscreen .player-toolbar button { color: var(--white); border-color: #789386; background: transparent; }
.player.is-fullscreen .player-toolbar button:hover { background: #294238; }
.restart-dialog { width: min(calc(100% - 32px), 390px); padding: 20px; border: 1px solid var(--ink); border-radius: 5px; background: var(--paper); color: var(--ink); }
.restart-dialog:not([open]) { display: none; }
.restart-dialog::backdrop { background: rgb(23 42 33 / .65); }
.restart-dialog h2 { font: 800 1.6rem/1.15 var(--display); letter-spacing: -.04em; }
.restart-dialog p { margin: 8px 0 19px; color: var(--muted); }
.restart-dialog form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.button--quiet { border-color: var(--line); background: var(--white); color: var(--ink); }
.button--quiet:hover { border-color: var(--ink); }
.game-guide { max-width: 70ch; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px; }
.game-guide h2 { font: 800 clamp(1.6rem, 3vw, 2.35rem)/1.1 var(--display); letter-spacing: -.035em; }
.game-guide ol { margin: 12px 0 19px; padding-inline-start: 1.4em; }
.game-guide li { padding-inline-start: 4px; }
.game-guide li + li { margin-top: 8px; }
.game-guide li::marker { color: var(--accent); font-weight: 750; }
.game-guide h3 { font: 780 1.15rem/1.2 var(--display); margin-bottom: 5px; }
.game-guide p { color: var(--muted); }
.related { border-top: 1px solid var(--line); padding-top: 18px; }
.content-page { max-width: 68ch; margin: 54px 0; }
.content-page p { margin: 16px 0; }
.site-footer { border-top: 1px solid var(--line); padding-block: 22px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.footer-content p { color: var(--muted); font: .81rem/1.4 var(--mono); margin: 6px 0 0 38px; }
.footer-content nav { display: flex; gap: 16px; font-size: .9rem; font-weight: 650; color: var(--muted); flex-wrap: wrap; }
.footer-content nav a:hover { color: var(--accent); }

@media (max-width: 1040px) {
  .shell { width: calc(100% - 56px); }
  .game-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .hero-art { min-height: 280px; padding: 28px 34px; }
}
@media (max-width: 730px) {
  .shell { width: calc(100% - 36px); }
  .header-content { gap: 9px 15px; grid-template-columns: 1fr auto; padding-block: 12px; }
  .site-nav { grid-row: 2; grid-column: 1; gap: 15px; }
  .site-nav a { padding-block: 8px; }
  .search { grid-row: 1; grid-column: 2; width: min(40vw, 190px); }
  .hero { grid-template-columns: 1fr; gap: 22px; padding-block: 28px; }
  .hero h1 { font-size: clamp(3.25rem, 11.3vw, 5.6rem); }
  .hero-description { margin: 13px 0 17px; }
  .hero-art { min-height: 215px; padding: 26px 38px; }
  .game-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 530px) {
  .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 9px; }
  .section-heading { gap: 5px 12px; }
  .section-heading > a { font-size: .85rem; }
  .game-card a { padding: 5px 5px 8px; }
  .game-name h3 { font-size: 1rem; }
  .filters a { min-height: 42px; }
  .footer-content { align-items: flex-start; flex-direction: column; gap: 17px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .game-stage--all { aspect-ratio: 3/4; }
}
@media (max-width: 420px) {
  .header-content { grid-template-columns: auto minmax(0, 1fr); }
  .header-content .brand { font-size: 1.28rem; gap: 6px; }
  .header-content .brand-mark { width: 24px; }
  .search { width: 100%; }
  .search input { padding-left: 29px; }
  .search button { width: 26px; }
  .search-icon { left: 8px; width: 11px; height: 11px; }
  .search-icon::after { inset-inline-start: 6px; inset-block-start: 7px; width: 5px; }
  .hero h1 { font-size: clamp(2.6rem, 12.8vw, 3.25rem); }
}
@media (prefers-reduced-motion: reduce) {
  .feature { transition: none; }
}
