:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #161a26;
  --muted: #5b6275;
  --line: #e3e6ef;
  --accent: #5b5bf0;
  --music: #ff6a3d;
  --scan: #2f7cf6;
  --pinball: #a855f7;
  --coffee: #ffdd00;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(20, 24, 40, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1018;
    --surface: #171a25;
    --text: #eef0f7;
    --muted: #9aa1b5;
    --line: #262a38;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand-dot { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(135deg, var(--music), var(--scan) 60%, var(--pinball)); }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-weight: 500; font-size: .95rem; }
nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.02em; }
.hero h1 span {
  background: linear-gradient(90deg, var(--music), var(--scan), var(--pinball));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 600px; margin: 0 auto 28px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: .95rem;
  border: 1px solid var(--line); color: var(--text); background: var(--surface);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.primary { background: var(--text); color: var(--bg); border-color: transparent; }
.btn.coffee { background: var(--coffee); color: #1a1a1a; border-color: transparent; }
.btn.disabled { opacity: .55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* App cards */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; padding: 20px 0 60px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.card .icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: var(--c); color: #fff;
}
.card .icon svg { width: 34px; height: 34px; }
.card .icon.app-icon { overflow: hidden; }
.card .icon.app-icon img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.5); }
.card h2 { margin: 0; font-size: 1.4rem; }
.card p { margin: 0; color: var(--muted); }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.card .small { font-size: .85rem; }
.card .links {display: flex; flex-wrap: wrap; gap: 14px; font-size: .9rem; }
.card .links a { color: var(--muted); }
.badge {
  align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c);
}
.music { --c: var(--music); }
.scan { --c: var(--scan); }
.pinball { --c: var(--pinball); }

/* Coffee section */
.support-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 26px; text-align: center; box-shadow: var(--shadow); margin-bottom: 60px;
}
.support-box h2 { margin: 0 0 8px; }
.support-box p { color: var(--muted); margin: 0 0 20px; }

/* Text pages (privacy, support) */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 20px 60px; }
.doc h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); line-height: 1.2; margin: 0 0 6px; }
.doc .date { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.doc .summary {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent));
  border-radius: 12px; padding: 16px 18px;
}
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.back { display: inline-block; margin-bottom: 24px; color: var(--muted); text-decoration: none; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

@media (max-width: 560px) {
  nav a:not(.keep) { display: none; }
  .hero { padding-top: 48px; }
}
