/* The store (index.html) and every app's page. Always dark, neon on deep violet; each app may add
   its own styles in its folder. Geist Mono is self-hosted (OFL). */
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root { --bg: #07051a; --raised: #110b2c; --line: #2a1d5c; --fg: #e9e2ff; --dim: #8f7cc9; --faint: #8578bd; --pink: #ff4fd8; --mint: #7cffd8; --sun: #ffd34d;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; color-scheme: dark; }
html, body { margin: 0; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font: 13px/1.6 var(--mono); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 500px at 50% 30%, rgba(255, 79, 216, .12), transparent 70%), radial-gradient(600px 400px at 50% 75%, rgba(124, 255, 216, .05), transparent 70%); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a { color: var(--dim); text-decoration: none; }
a:hover { color: var(--fg); }
a:focus-visible, button:focus-visible, canvas:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 8px; }
footer { display: flex; justify-content: center; gap: 18px; padding: 16px; color: var(--faint); font-size: 12px; }
footer a { color: var(--faint); }

/* The header: the store's mark, a 2×2 grid of tiles. */
.top { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 1040px; box-sizing: border-box; margin: 0 auto; padding: 18px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.brand:hover { color: var(--fg); }
.mark { width: 26px; height: 26px; border-radius: 8px; padding: 5px; box-sizing: border-box; display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  background: linear-gradient(135deg, var(--pink), #7c5cff); box-shadow: 0 4px 16px rgba(255, 79, 216, .35); }
.mark i { background: #fff; border-radius: 2px; }
.mark i:nth-child(2), .mark i:nth-child(3) { opacity: .7; }
.brand:hover .mark i:nth-child(2) { opacity: 1; }
.crumb { color: var(--faint); font-size: 14px; }

/* The store */
.shelf { flex: 1; width: 100%; max-width: 1040px; box-sizing: border-box; margin: 0 auto; padding: 32px 20px 64px; }
.hero { margin: 0 0 48px; max-width: 640px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; letter-spacing: -.035em; margin: 0 0 14px; font-weight: 700;
  background: linear-gradient(90deg, var(--fg), #ffb3ef 60%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 15px; color: var(--dim); margin: 0; }
.kicker { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--mint); margin: 0 0 16px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.app { display: flex; flex-direction: column; height: 100%; border-radius: 16px; overflow: hidden; background: var(--raised); border: 1px solid var(--line); color: var(--fg);
  transition: transform .18s ease, border-color .18s, box-shadow .18s; }
.app:hover { color: var(--fg); transform: translateY(-3px); border-color: #4a3392; box-shadow: 0 0 0 1px #4a3392, 0 18px 50px rgba(255, 79, 216, .18); }
.cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; image-rendering: pixelated; background: #0b0820; border-bottom: 1px solid var(--line); }
.meta { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.tag { font-size: 11px; color: var(--mint); border: 1px solid rgba(124, 255, 216, .35); border-radius: 99px; padding: 0 8px; }
.what { color: var(--dim); font-size: 13px; }
.play { margin-top: auto; padding-top: 8px; color: var(--pink); font-weight: 600; }
.app:hover .play span { display: inline-block; translate: 3px 0; transition: translate .15s; }
.soon { display: grid; place-items: center; min-height: 240px; border-radius: 16px; border: 1px dashed var(--line); color: var(--faint); }
.soon-in { display: grid; justify-items: center; gap: 10px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 2px; background: var(--line); animation: blink 1.6s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { background: var(--pink); } }

/* An app's page: a cabinet around its canvas. */
.game main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 8px 16px 24px; }
.cab { position: relative; width: min(100%, 960px, calc((100dvh - 190px) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 14px; padding: 10px; box-sizing: border-box;
  background: linear-gradient(180deg, #1b1240, #0d0826); box-shadow: 0 0 0 1px #2c1d63, 0 0 60px rgba(255, 79, 216, .25), 0 30px 80px rgba(0, 0, 0, .6); }
.cab::after { content: ""; position: absolute; inset: 10px; border-radius: 6px; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, .35)); }
canvas { display: block; width: 100%; height: 100%; border-radius: 6px; image-rendering: pixelated; image-rendering: crisp-edges; background: #0b0820; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.nojs { position: absolute; inset: 10px; margin: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--fg); background: #0b0820; border-radius: 6px; }
.how { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; color: var(--dim); text-align: center; }
kbd { font: 600 11px var(--mono); color: var(--fg); padding: 1px 6px; border: 1px solid #3a2a78; border-bottom-width: 2px; border-radius: 5px; background: #140d33; }
button { font: inherit; color: var(--dim); background: none; border: 1px solid #3a2a78; border-radius: 6px; padding: 2px 10px; cursor: pointer; }
button:hover { color: var(--fg); border-color: var(--dim); }
.touch, .turn { display: none; }
.turn { margin: 0; color: var(--faint); font-size: 12px; }
@media (hover: none) and (pointer: coarse) {
  .keys { display: none; }
  .touch { display: inline; }
  .game { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
}
@media (hover: none) and (pointer: coarse) and (orientation: portrait) { .turn { display: block; } }
@media (orientation: landscape) and (max-height: 500px) {
  .game .top { padding: 6px 16px; }
  .game main { padding: 4px 16px; gap: 8px; }
  .cab { width: min(100%, calc((100dvh - 90px) * 16 / 9)); }
  .game footer { display: none; }
}

.lost { text-align: center; max-width: 420px; margin: auto; padding: 40px 20px; }
.lost h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 8px; color: var(--pink); }
.lost p { color: var(--dim); margin: 0; }
.lost a { color: var(--mint); }
.store main:has(.lost) { flex: 1; display: grid; }
@media (max-width: 600px) { .cab { padding: 6px; border-radius: 10px; } .cab::after { inset: 6px; } .how { font-size: 12px; } .shelf { padding-top: 16px; } .hero { margin-bottom: 32px; } }
@media (prefers-reduced-motion: reduce) { .app, .app:hover .play span { transition: none; } .app:hover { transform: none; } .dots i { animation: none; } }
