/* Fun Layer site: shared look for the home, start and install pages.
   Direction: chunky "sticker" cards with hard ink shadows, a tangerine/bubblegum/mint palette, playful but readable.
   Layout: one centered column (max 1180px); sections stack; two-column rows collapse under 900px. */
:root {
  --paper: #f5f2ff;
  --card: #ffffff;
  --fg: #1b1440;
  --muted: #5e587f;
  --edge: #1b1440;
  --tang: #ff7a2f;
  --bubble: #ff4f9a;
  --mint: #19c39a;
  --sky: #3d7bff;
  --sun: #ffcf33;
  --tint: #ece7ff;
  --on-tang: #1b1440;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --shadow: 5px 5px 0 var(--edge);
  --shadow-sm: 3px 3px 0 var(--edge);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #120e29; --card: #1d1742; --fg: #f4f1ff; --muted: #b3acd6; --edge: #050312;
    --tint: #2a2257; --on-tang: #1b1440; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #120e29; --card: #1d1742; --fg: #f4f1ff; --muted: #b3acd6; --edge: #050312;
  --tint: #2a2257; --on-tang: #1b1440; color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--fg); font-family: var(--body); font-size: 17px; line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }

/* nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 3px solid var(--edge); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 22px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.logo .dot { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffb27a, var(--tang)); border: 3px solid var(--edge); position: relative; flex: none; }
.logo .dot::before, .logo .dot::after { content: ""; position: absolute; top: 9px; width: 5px; height: 6px; border-radius: 50%; background: var(--edge); }
.logo .dot::before { left: 7px; } .logo .dot::after { right: 7px; }
.nav-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav-links a:hover { background: var(--tint); }
.nav-links a[aria-current="page"] { background: var(--tint); }
@media (max-width: 640px) { .nav-links a.hide-sm { display: none; } }

/* buttons */
.btn { --b: var(--card); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 800 17px/1 var(--display); letter-spacing: -0.01em; padding: 15px 22px; border-radius: 14px; border: 3px solid var(--edge); background: var(--b); color: var(--fg); text-decoration: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--edge); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.btn.hot { --b: var(--tang); color: var(--on-tang); }
.btn.pink { --b: var(--bubble); color: #fff; }
.btn.small { font-size: 15px; padding: 10px 14px; border-radius: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

/* stickers & type */
.sticker { background: var(--card); border: 3px solid var(--edge); border-radius: 20px; box-shadow: var(--shadow); }
.eyebrow { display: inline-block; font: 800 13px/1 var(--display); text-transform: uppercase; letter-spacing: 0.12em; padding: 7px 11px; border-radius: 999px; border: 2px solid var(--edge); background: var(--sun); color: #1b1440; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 76px); line-height: 0.98; }
h2 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.02; }
h3 { font-size: 22px; line-height: 1.15; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 56ch; margin: 0; }
.muted { color: var(--muted); }
.mark { background: var(--sun); color: #1b1440; padding: 0 .15em; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.mark.pink { background: var(--bubble); color: #fff; }
.mark.mint { background: var(--mint); color: #0d2b23; }
section { padding-block: clamp(56px, 9vw, 96px); }
.section-head { display: grid; gap: 14px; margin-bottom: 32px; max-width: 760px; }
code, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--tint); padding: 2px 7px; border-radius: 7px; white-space: nowrap; }

/* live stage */
.stage { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border: 3px solid var(--edge); border-radius: 20px; overflow: hidden; background: #0d0f1e; box-shadow: var(--shadow); }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage .badge { position: absolute; top: 10px; right: 10px; font: 700 11px/1 var(--mono); color: #fff; background: #e5263c; padding: 5px 8px; border-radius: 6px; letter-spacing: .08em; pointer-events: none; }
.stage .sound { position: absolute; left: 10px; bottom: 10px; font: 700 13px/1 var(--body); color: #fff; background: rgba(0, 0, 0, .6); border: 2px solid rgba(255, 255, 255, .35); padding: 8px 11px; border-radius: 10px; cursor: pointer; }

/* footer */
footer { border-top: 3px solid var(--edge); padding-block: 36px 48px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { font-weight: 700; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); transform: translateX(-50%); background: var(--fg); color: var(--paper); font-weight: 700; padding: 12px 18px; border-radius: 12px; z-index: 50; }
