/* Pocket Puzzle site: the app's retro "family computer" look (theme.ts colours, Pixelify Sans headings, windows with title bars). */
@font-face { font-family: Pixel; src: url(/fonts/PixelifySans_700Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Pixel; src: url(/fonts/PixelifySans_600SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --paper: #F5F2EC; --surface: #FFFDF8; --card: #E4EFEA; --ink: #3A3530; --text: #1F2A28; --muted: #5B6460;
  --bar: #2B7364; --on-bar: #FFFFFF; --accent: #2F7D6D; --play: #F6D365; --store: #CFE8DF; --shadow: #3A3530;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #14161A; --surface: #1D2025; --card: #1D2025; --ink: #050608; --text: #ECE8E1; --muted: #A9B0AD;
    --bar: #2E6E62; --on-bar: #FFFFFF; --accent: #7CCBB7; --play: #E8C04F; --store: #2E4A42; --shadow: #050608; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, .titlebar, .key, .brand, .game b { font-family: Pixel, system-ui, sans-serif; }
a { color: var(--accent); }
img { image-rendering: pixelated; }

.taskbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--bar); color: var(--on-bar); border-bottom: 2px solid var(--ink); }
.taskbar a { color: var(--on-bar); text-decoration: none; }
.taskbar nav { display: flex; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; }
.brand img { border: 2px solid var(--ink); border-radius: 4px; }

/* A window = 2 px ink outline + hard drop shadow (Card in the app). */
.window { background: var(--surface); border: 2px solid var(--ink); border-radius: 3px; box-shadow: 4px 4px 0 var(--shadow); }
.titlebar { display: flex; align-items: center; gap: 8px; background: var(--bar); color: var(--on-bar); padding: 4px 8px;
  border-bottom: 2px solid var(--ink); font-weight: 600; }
.titlebar span { flex: 1; }
.titlebar i { font-style: normal; width: 20px; height: 18px; line-height: 14px; text-align: center; background: #F5F2EC;
  color: #3A3530; border: 2px solid var(--ink); font-size: 13px; }
.body { padding: 16px 20px; }

/* Hero over the season wallpaper (site.js picks today's season). */
.hero { padding: 40px 16px 56px; background: var(--paper) var(--scene, none) center top / cover no-repeat; image-rendering: pixelated; }
.hero-win { max-width: 560px; margin: 0 auto; text-align: center; }
.appicon { border: 2px solid var(--ink); border-radius: 22px; box-shadow: 3px 3px 0 var(--shadow); margin-top: 8px; }
h1 { font-size: clamp(30px, 7vw, 44px); line-height: 1.1; margin: 16px 0 8px; color: var(--text); }
.lead { font-size: 18px; margin: 0 auto 20px; max-width: 30em; }
.small { color: var(--muted); font-size: 15px; margin: 12px 0 0; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.key { display: inline-block; padding: 12px 18px; font-size: 18px; font-weight: 700; text-decoration: none; color: #1F2A28;
  border: 2px solid var(--ink); border-radius: 3px; box-shadow: 3px 3px 0 var(--shadow); transition: transform .05s; }
.key-play { background: var(--play); }
.key-store { background: var(--store); color: var(--text); }
.key:active { transform: translate(3px, 3px); box-shadow: none; }

main { max-width: 980px; margin: 0 auto; padding: 8px 16px 48px; }
h2 { font-size: 30px; margin: 32px 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.game { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--card); color: var(--text); text-decoration: none; }
.game:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.game b { display: block; font-size: 20px; }
.gtext span { color: var(--muted); font-size: 15px; line-height: 1.4; }
/* Living icon: one frame of the strip at a time (site.js steps --f), still under Reduce motion. */
.live { flex: none; width: 76px; height: 76px; background: var(--strip) 0 0 / auto 100% no-repeat; border-radius: 6px;
  background-position-x: calc(var(--f, 0) * -76px); }

#story { margin-top: 40px; }
#story .body p { margin: 0 0 12px; }
.sig { color: var(--accent); font-style: italic; }

.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 32px; }
.promise .body { display: flex; gap: 12px; align-items: center; }
.promise p { margin: 0; font-size: 15px; }

.foot { border-top: 2px solid var(--ink); border-bottom: 0; font-size: 15px; }

/* Text pages (privacy, help). */
.page { max-width: 720px; margin: 24px auto; }
.page h1 { font-size: 34px; }
.page h2 { font-size: 22px; margin-top: 24px; }
