/* Tiny Fun Arcade - shared styles */
:root {
  --paper: #fbf6e9; --ink: #2b2b2b; --muted: #6b6558; --card: #fffdf7;
  --red: #ef5b5b; --yellow: #ffd23f; --teal: #2ec4b6; --blue: #4d9de0; --purple: #9b5de5;
  --scribble: "Gloria Hallelujah", "Comic Sans MS", "Segoe Print", cursive;
  --hand: "Patrick Hand", "Comic Sans MS", "Segoe Print", cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 19px/1.45 var(--hand);
  background: var(--paper) radial-gradient(rgba(43,43,43,.09) 1.2px, transparent 1.3px) 0 0 / 22px 22px;
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--scribble); margin: 0; line-height: 1.25; }

/* ---- header ---- */
header { padding: 28px 0 8px; text-align: center; }
.logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.logo svg { width: 62px; height: 62px; flex: none; transform: rotate(-8deg); }
.logo h1 { font-size: clamp(30px, 7vw, 54px); transform: rotate(-1.5deg); }
.logo h1 span:nth-child(1) { color: var(--red); }
.logo h1 span:nth-child(2) { color: var(--blue); }
.logo h1 span:nth-child(3) { color: var(--purple); }
.tagline { margin: 6px 0 0; font-size: 21px; color: var(--muted); }

/* ---- shared doodle box ---- */
.box { background: var(--card); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); }
.badge {
  display: inline-block; font: 14px var(--scribble); padding: 1px 12px; border: 2px solid var(--ink);
  border-radius: 999px; background: var(--yellow); transform: rotate(-2deg);
}

/* ---- player ---- */
#player { margin: 26px 0 44px; padding: 18px; scroll-margin-top: 12px; }
.player-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.player-head h2 { font-size: clamp(22px, 4.5vw, 30px); }
.screen { border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; background: #f4efe1; line-height: 0; }
.screen iframe { display: block; width: 100%; aspect-ratio: 3 / 1; border: 0; }
.player-foot { display: flex; gap: 16px 24px; align-items: flex-start; flex-wrap: wrap; margin-top: 14px; }
.player-foot p { margin: 0; flex: 1 1 320px; }
.keys { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; flex-basis: 100%; }
.keys li { font-size: 17px; color: var(--muted); }
kbd {
  font: 15px var(--hand); color: var(--ink); background: #fff; border: 2px solid var(--ink);
  border-bottom-width: 4px; border-radius: 6px; padding: 0 8px; margin-right: 6px; white-space: nowrap;
}
.btn {
  font: 17px var(--scribble); color: var(--ink); background: var(--teal); cursor: pointer;
  border: 3px solid var(--ink); border-radius: 12px; padding: 4px 16px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---- gallery ---- */
.section-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(24px, 5vw, 32px); }
.section-head span { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 26px; padding: 0; margin: 0; list-style: none; }
.card {
  display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; overflow: hidden; text-align: left;
  font: inherit; color: inherit; cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.grid li:nth-child(odd) .card { transform: rotate(-.7deg); }
.grid li:nth-child(even) .card { transform: rotate(.7deg); }
.grid li .card:hover, .grid li .card:focus-visible { transform: translate(-2px, -3px) rotate(0); box-shadow: 9px 9px 0 var(--ink); outline: none; }
.card img, .card .thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 3px solid var(--ink); }
.card .body { padding: 10px 14px 14px; }
.card h3 { font-size: 20px; }
.card p { margin: 4px 0 0; font-size: 17px; line-height: 1.3; color: var(--muted); }
.card .badge { position: absolute; top: 10px; left: 10px; display: none; }
.card { position: relative; }
.card[aria-current="true"] .badge { display: inline-block; }
.card.soon { cursor: default; background: transparent; border-style: dashed; box-shadow: none; color: var(--muted); }
.card.soon .thumb { display: grid; place-items: center; border-bottom-style: dashed; font: 64px var(--scribble); line-height: 1; color: rgba(43,43,43,.25); }
.grid li .card.soon:hover { transform: none; box-shadow: none; }

footer { margin: 56px 0 28px; text-align: center; color: var(--muted); font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}

/* ---- footer ---- */
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 12px; font-size: 19px; }
footer p { margin: 8px auto 0; max-width: 640px; line-height: 1.4; }
a { color: #1f6fb2; text-underline-offset: 3px; }
a:hover { color: var(--red); }
.logo img { width: 62px; height: 62px; flex: none; transform: rotate(-8deg); }

/* ---- text pages (privacy, terms) ---- */
.legal { margin: 26px 0 0; padding: 22px clamp(18px, 5vw, 44px) 30px; }
.legal h2 { font-size: clamp(24px, 5vw, 32px); }
.legal h3 { font-size: 20px; margin-top: 26px; }
.legal p, .legal ul { margin: 8px 0 0; max-width: 68ch; }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 8px; }
.legal .date { color: var(--muted); font-size: 17px; }
noscript p { text-align: center; padding: 12px; border: 3px dashed var(--ink); border-radius: 12px; }
