:root {
  color-scheme: light;
  --paper: #f7f8f4;
  --ink: #263329;
  --muted: #536052;
  --line: #cfd5c9;
  --green: #45643d;
  font: 100%/1.5 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { color: inherit; font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #5c7d4e; outline-offset: 3px; }
[hidden] { display: none !important; }
.frame { width: min(82rem, calc(100% - clamp(2rem, 7vw, 7rem))); margin-inline: auto; }
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 9; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip:focus { top: 1rem; }
.masthead { min-height: 4.85rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 1px; font-size: 1.46rem; font-weight: 730; letter-spacing: -.065em; text-decoration: none; white-space: nowrap; }
.brand img { margin-left: -.5rem; }
.brand-studio { font-weight: 450; color: var(--muted); }
.masthead nav { display: flex; gap: clamp(.75rem, 2.7vw, 2.75rem); align-items: center; }
.masthead nav a, .masthead nav button { min-height: 44px; display: inline-flex; align-items: center; font-size: .9rem; border: none; background: transparent; padding: 0; text-decoration: none; }
.masthead nav .current { text-decoration: underline; text-underline-offset: .42em; text-decoration-color: #6a8061; }
.masthead nav button:hover, .footer a:hover { text-decoration: underline; text-underline-offset: .28em; }
.shelf-intro { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.8rem, 3.4vw, 3.2rem) 0 clamp(1.6rem, 3vw, 2.65rem); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(3rem, 6.5vw, 6rem); line-height: 1.03; letter-spacing: -.04em; word-spacing: .035em; font-weight: 530; }
h1 em { font: italic normal 1.07em/.92 Georgia, 'Times New Roman', serif; letter-spacing: -.045em; color: var(--green); }
.intro-copy p { margin-top: .85rem; font-size: 1rem; line-height: 1.55; color: var(--muted); }
.handheld-button { display: grid; justify-items: center; gap: .7rem; padding: .4rem .6rem; border: 0; border-radius: .4rem; background: transparent; margin-right: 1.7rem; }
.handheld { position: relative; width: 10.4rem; height: 4.9rem; transform: rotate(-7deg); border-radius: .95rem .95rem 1.15rem .9rem; background: linear-gradient(165deg, #dfe4ce, #cbd6b9 70%, #b9c5a8); border: 1px solid #889780; box-shadow: inset 0 2px 0 #f8f9ece6, 0 3px 0 #9ca991, 0 4px 0 #809075, 0 9px 12px -5px #364b2c4a; transition: transform .18s ease; }
.handheld-button:hover .handheld { transform: rotate(-3deg) translateY(-2px); }
.handheld-button:active .handheld { transform: rotate(-3deg) translateY(1px); }
.handheld-button:disabled { opacity: .5; }
.screen { position: absolute; inset: 12% 24% 17%; display: block; overflow: hidden; border: 4px solid #445243; border-radius: .38rem; background: #e5eac9; box-shadow: 0 1px 0 #f6f6db, inset 0 2px 3px #4f614e; }
.screen img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) contrast(.93); }
.dpad, .dpad::after { width: 1.25rem; height: .46rem; background: #4d5c4b; border-radius: 1.5px; }
.dpad { position: absolute; left: 6%; top: 44%; }
.dpad::after { content: ''; display: block; transform: rotate(90deg); }
.action-keys { position: absolute; right: 5%; top: 35%; background: #647957; width: .55rem; height: .55rem; border-radius: 50%; box-shadow: -.6rem .5rem 0 #465941; }
.speaker { position: absolute; height: 2px; width: .8rem; right: 7%; bottom: 23%; background: #97a88a; box-shadow: 0 3px #97a88a; }
.handheld-label { font-size: .875rem; font-weight: 600; }
.browse-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-block: 1px solid var(--line); }
.filters { display: flex; gap: .25rem; align-items: center; }
.filters button, #view-controls button { display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: .45rem; min-height: 44px; padding: .5rem 1.05rem; font-size: .9rem; font-weight: 500; }
.filters button[aria-pressed='true'] { background: #2c3e2f; color: #fff; }
.filters button:not([aria-pressed='true']):hover, #view-controls button:hover { background: #e7ebdf; }
.touch-filter { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin-inline-start: auto; font-size: .9rem; white-space: nowrap; cursor: pointer; }
.touch-filter input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--green); }
.searchbox { display: flex; align-items: center; gap: .65rem; padding-left: .85rem; border: 1px solid #c6cec0; border-radius: .45rem; width: min(15.6rem, 35%); background: #fff8; }
.searchbox:focus-within { outline: 2px solid var(--green); outline-offset: 1px; }
.search-icon { position: relative; width: .78rem; height: .78rem; border: 1.5px solid var(--muted); border-radius: 50%; flex-shrink: 0; }
.search-icon::after { content: ''; position: absolute; width: .38rem; height: 1.5px; background: var(--muted); right: -.28rem; bottom: -.12rem; transform: rotate(47deg); }
.searchbox input { appearance: none; width: 100%; min-width: 0; min-height: 44px; border: 0; background: none; padding: .4rem .6rem .4rem 0; font-size: .94rem; }
.searchbox input:focus-visible { outline: none; }
.searchbox input::-webkit-search-cancel-button { appearance: none; }
#clear-search, .close { width: 44px; height: 44px; flex-shrink: 0; border: none; font-size: 1.5rem; background: transparent; }
.display-options { display: flex; gap: 1rem; justify-content: space-between; align-items: center; padding: .35rem 0 .45rem; }
#result-count { font-size: .875rem; color: var(--muted); }
#view-controls { display: flex; gap: .1rem; }
#view-controls button { gap: .5rem; padding-inline: .65rem; font-size: .875rem; color: var(--muted); }
#view-controls button[aria-pressed='true'] { color: var(--ink); font-weight: 650; }
.grid-icon { width: 5px; height: 5px; margin: -7px 7px 0 0; background: currentColor; box-shadow: 7px 0, 0 7px, 7px 7px; border-radius: 1px; }
.list-icon { width: 13px; height: 2px; background: currentColor; box-shadow: 0 -4px, 0 4px; }
.game-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2.15rem clamp(1rem, 2vw, 2rem); }
.game-card { min-width: 0; --label: #e7eade; --letter: #324330; --stripe: #90a27b; }
.game-card[data-game='apex-circuit'] { --label: #f4dfcd; --letter: #503628; --stripe: #b85b37; }
.game-card[data-game='flight-zero'] { --label: #dbe8eb; --letter: #284856; --stripe: #6293a3; }
.game-card[data-game='sable-city'] { --label: #e6e4d7; --letter: #37423a; --stripe: #76885d; }
.game-card[data-game='kittins'] { --label: #efe2c7; --letter: #533b28; --stripe: #b37948; }
.game-card[data-game='kibbi'] { --label: #e4eacb; --letter: #344b32; --stripe: #7b9561; }
.game-card[data-game='plain'] { --label: #e0e8e7; --letter: #2e4553; --stripe: #70939b; }
.game-card[data-game='rush'] { --label: #e9d6ad; --letter: #443721; --stripe: #a47738; }
.game-card[data-game='shipping'] { --label: #d2e2e7; --letter: #2c4854; --stripe: #5c879a; }
.game-card[data-game='farma'] { --label: #e4ead5; --letter: #354b37; --stripe: #729162; }
.game-card[data-game='super_dario'] { --label: #e7dfe9; --letter: #4a3952; --stripe: #8e7397; }
.game-link { display: block; color: inherit; text-decoration: none; border-radius: .5rem; }
.game-cover { border: 1px solid color-mix(in srgb, var(--stripe), var(--paper) 50%); border-radius: .55rem; overflow: hidden; background: var(--label); box-shadow: 0 2px 0 color-mix(in srgb, var(--stripe), var(--paper) 60%); transition: transform .18s ease, box-shadow .18s ease; }
.game-cover img { width: 100%; height: auto; aspect-ratio: 1.95; object-fit: cover; display: block; }
.cover-label { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 3.7rem; padding: .6rem 1rem .6rem 1.3rem; color: var(--letter); border-top: 1px solid #0000000c; }
.cover-label::before { position: absolute; content: ''; inset: .8rem auto .8rem .6rem; width: 3px; border-radius: 3px; background: var(--stripe); }
.cover-label h2 { font-size: clamp(1.25rem, 2.1vw, 1.95rem); line-height: 1.1; letter-spacing: -.035em; font-weight: 640; }
.game-card[data-game='kittins'] h2, .game-card[data-game='kibbi'] h2, .game-card[data-game='farma'] h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 600; }
.game-card[data-game='rush'] h2 { font-style: italic; text-transform: uppercase; font-weight: 850; }
.play-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 2rem; height: 2rem; border: 1px solid color-mix(in srgb, var(--letter), transparent 65%); border-radius: 50%; font-size: 0; }
.play-symbol::before { content: ''; display: block; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 7px solid currentColor; margin-left: 2px; }
.game-link:hover .game-cover, .game-link:focus-visible .game-cover { transform: translateY(-2px); box-shadow: 0 5px 0 color-mix(in srgb, var(--stripe), var(--paper) 65%); }
.game-link:hover .play-symbol { background: var(--letter); color: var(--label); }
.card-details { padding: .75rem .1rem 0; }
.game-description { font-size: 1rem; line-height: 1.42; }
.game-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .55rem; margin-top: .4rem; font-size: .81rem; color: var(--muted); }
.game-meta .device::before { content: '·'; margin-right: .55rem; }
[data-view='list'] .game-grid { display: block; }
[data-view='list'] .game-link { display: grid; grid-template-columns: minmax(14rem, .95fr) 1.5fr; align-items: center; gap: 1.5rem; border-bottom: 1px solid var(--line); border-radius: 0; padding: .6rem .25rem; }
[data-view='list'] .game-link:hover { background: #edf0e8; }
[data-view='list'] .game-cover { box-shadow: none; border: 0; border-radius: 0; display: flex; align-items: center; background: transparent; transform: none; }
[data-view='list'] .game-cover img { width: 5.5rem; height: 3.6rem; border-radius: .3rem; }
[data-view='list'] .cover-label { background: none; padding: .25rem .8rem; min-height: 0; border: 0; }
[data-view='list'] .cover-label h2 { font-size: 1.3rem; }
[data-view='list'] .cover-label::before, [data-view='list'] .play-symbol { display: none; }
[data-view='list'] .card-details { padding: 0; }
[data-view='list'] .game-description { font-size: .96rem; }
.empty { text-align: center; padding: 4.5rem 1rem; border-block: 1px solid var(--line); }
.empty h2, dialog h2 { font: 400 2rem/1.2 Georgia, serif; letter-spacing: -.04em; }
.empty p, dialog p { margin-top: .7rem; color: var(--muted); }
.empty button { margin-top: 1.3rem; min-height: 44px; padding: .5rem 1rem; border: 0; background: var(--ink); color: #fff; border-radius: .4rem; }
.footer { margin-top: 3.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding-block: .9rem; font-size: .875rem; color: var(--muted); }
.footer span { font-weight: 650; letter-spacing: -.035em; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
dialog { width: min(28rem, calc(100% - 2rem)); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: .8rem; padding: 2rem; }
dialog::backdrop { background: #1c271c6b; }
dialog img { margin-left: -.4rem; }
dialog p { line-height: 1.65; }
.close { position: absolute; top: .5rem; right: .5rem; }
@media (max-width: 55rem) {
  .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .handheld-button { margin-right: .5rem; }
  .desktop-break { display: none; }
  .intro-copy p { max-width: 44ch; }
}
@media (max-width: 40rem) {
  .masthead { min-height: 3.9rem; }
  .brand { font-size: 1.18rem; }
  .brand img { width: 35px; height: 35px; }
  .masthead nav { gap: .9rem; }
  .masthead nav button, .masthead nav a { font-size: .82rem; }
  .shelf-intro { padding: 1.55rem 0; gap: .5rem; align-items: center; }
  h1 { font-size: clamp(2.7rem, 8vw, 3.5rem); line-height: .98; }
  .intro-copy { flex: 1; }
  .intro-copy p { font-size: .94rem; line-height: 1.42; margin-top: .65rem; }
  .handheld-button { margin: 0; gap: .55rem; padding: .4rem 0 .4rem .4rem; }
  .handheld { width: 5.4rem; height: 2.75rem; border-radius: .6rem; }
  .screen { border-width: 2px; border-radius: .2rem; }
  .dpad, .dpad::after { width: .68rem; height: .26rem; }
  .action-keys { width: .32rem; height: .32rem; box-shadow: -.32rem .25rem 0 #465941; }
  .speaker { width: .45rem; height: 1px; box-shadow: 0 2px #97a88a; }
  .handheld-label { font-size: .8rem; }
  .browse-tools { flex-wrap: wrap; gap: .4rem; padding: .55rem 0; }
  .filters { flex: 1 0 100%; }
  .filters button { padding-inline: .85rem; }
  .touch-filter { margin-inline-start: 0; margin-inline-end: .5rem; }
  .searchbox { flex: 1; min-width: 0; }
  .display-options { padding-block: .2rem; }
  .game-grid { gap: 1.45rem .8rem; }
  .game-cover img { aspect-ratio: 1.4; }
  .cover-label { padding: .55rem .45rem .55rem .8rem; min-height: 2.85rem; }
  .cover-label::before { left: .29rem; width: 2px; inset-block: .6rem; }
  .cover-label h2 { font-size: 1.18rem; }
  .play-symbol { width: 1.35rem; height: 1.35rem; }
  .play-symbol::before { border-left-width: 5px; border-top-width: 3px; border-bottom-width: 3px; }
  .card-details { padding-top: .55rem; }
  .game-description { font-size: .94rem; }
  .game-meta { display: block; margin-top: .35rem; font-size: .77rem; }
  .game-meta span { display: block; }
  .game-meta .device::before { content: none; }
  [data-view='list'] .game-link { grid-template-columns: 4.5rem 1fr; gap: .1rem .85rem; padding-block: .65rem; }
  [data-view='list'] .game-cover { display: contents; }
  [data-view='list'] .game-cover img { grid-row: 1/3; width: 4.5rem; height: 4.5rem; }
  [data-view='list'] .cover-label { padding: 0; }
  [data-view='list'] .card-details { grid-column: 2; }
  [data-view='list'] .game-description { font-size: .875rem; }
  [data-view='list'] .game-meta { display: flex; margin-top: .15rem; }
  [data-view='list'] .game-meta .device::before { content: '·'; }
}
@media (max-width: 23rem) {
  .frame { width: calc(100% - 1.45rem); }
  .masthead nav { gap: .55rem; }
  .filters button { padding-inline: .55rem; }
  .cover-label { gap: .2rem; }
  .cover-label h2 { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
