/* App factory kit: fonts, safe areas, the unlock sheet (with its plan picker) and the free-uses line. Each app sets its colours on :root:
 *   --bg, --fg (main text), --muted, --accent, --accent-fg (text on accent), --sheet (sheet background), --line
 */
@font-face{font-family:"Inter";font-weight:400;src:url(fonts/Inter-Regular.ttf) format("truetype");font-display:swap}
@font-face{font-family:"Inter";font-weight:600;src:url(fonts/Inter-SemiBold.ttf) format("truetype");font-display:swap}
@font-face{font-family:"Inter";font-weight:700;src:url(fonts/Inter-Bold.ttf) format("truetype");font-display:swap}
@font-face{font-family:"Fraunces";font-weight:600;src:url(fonts/Fraunces-SemiBold.ttf) format("truetype");font-display:swap}
:root{--display:"Fraunces",Georgia,serif;--sans:"Inter",system-ui,-apple-system,sans-serif;
  --bg:#1B1A17;--fg:#F4EEE3;--muted:#8F887B;--accent:#F0533A;--accent-fg:#fff;--sheet:#26241F;--line:#3A3731;
  --safe-top:var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-bottom:var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--sans);-webkit-font-smoothing:antialiased;
  -webkit-text-size-adjust:100%;overscroll-behavior:none;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}
/* Android: Capacitor injects --safe-area-inset-*; iOS: env() */
body{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;
  padding:var(--safe-top) var(--safe-area-inset-right, env(safe-area-inset-right, 0px))
    var(--safe-bottom) var(--safe-area-inset-left, env(safe-area-inset-left, 0px))}
button{font:inherit;color:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation}

/* "3 free songs left · Unlock for $2.99" */
.kit-plan{display:flex;align-items:center;justify-content:center;gap:10px;margin:0;font-size:14px;color:var(--muted)}
.kit-plan[hidden]{display:none}
.kit-plan button{border:1.5px solid var(--line);background:transparent;color:var(--fg);border-radius:999px;padding:7px 14px;
  font-size:14px;font-weight:600;cursor:pointer}

/* Unlock sheet: slides up over the app. */
.kit-unlock{position:fixed;inset:0;z-index:50;background:rgba(10,9,8,.6);display:flex;align-items:flex-end;justify-content:center;
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:kit-fade .18s ease-out}
.kit-unlock[hidden]{display:none}
.kit-sheet{width:100%;max-width:480px;background:var(--sheet);color:var(--fg);border-radius:26px 26px 0 0;text-align:left;
  padding:26px 24px calc(22px + var(--safe-bottom));display:flex;flex-direction:column;gap:14px;
  box-shadow:0 -20px 50px -20px rgba(0,0,0,.6);animation:kit-up .24s cubic-bezier(.2,.8,.3,1);
  max-height:calc(100vh - var(--safe-top) - 12px);max-height:calc(100dvh - var(--safe-top) - 12px);overflow-y:auto}
.kit-sheet h2{font-family:var(--display);font-weight:600;font-size:30px;letter-spacing:-.02em;margin:0;line-height:1.1}
.kit-sheet p{margin:0;font-size:15.5px;line-height:1.45;opacity:.9}
.kit-sheet ul{margin:0;padding:0;list-style:none;display:grid;gap:8px;font-size:15px}
.kit-sheet li{display:flex;gap:10px;align-items:baseline}
.kit-sheet li::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--accent);transform:translateY(-1px)}
.kit-buy{width:100%;margin-top:4px;border:0;border-radius:999px;background:var(--accent);color:var(--accent-fg);font-size:17px;
  font-weight:700;padding:19px 18px;cursor:pointer}
.kit-buy:disabled{opacity:.6}
.kit-sheet .kit-err{color:var(--accent);font-size:14px;opacity:1}
.kit-err:empty{display:none}
.kit-row{display:flex;justify-content:space-between;gap:12px}
.kit-row button{border:0;background:transparent;color:var(--fg);font-size:15px;font-weight:600;padding:10px 4px;cursor:pointer;
  text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--line)}
.kit-row button:disabled{opacity:.5}
.kit-sheet .kit-fine{font-size:13px;color:var(--muted);text-align:center;opacity:1}
.kit-fine:empty{display:none}
/* Plans (a subscription and a lifetime unlock): the price is the biggest thing on each card, as Apple asks. */
.kit-plans{display:grid;gap:12px;margin-top:4px}
.kit-plans[hidden]{display:none}
.kit-pick{position:relative;display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;text-align:left;
  border:2px solid var(--line);background:transparent;color:var(--fg);border-radius:18px;padding:14px 16px;cursor:pointer}
.kit-pick[aria-checked="true"]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.kit-pick b{display:block;font-size:17px;font-weight:700;line-height:1.2}
.kit-pick small{display:block;font-size:13.5px;color:var(--muted);margin-top:3px}
.kit-pick-p{text-align:right;flex:none}
.kit-pick-p b{font-size:21px}
.kit-pick em{position:absolute;top:-10px;right:14px;background:var(--accent);color:var(--accent-fg);font-style:normal;font-size:11px;
  font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:3px 9px;border-radius:999px}
.kit-sheet .kit-then{text-align:center;font-size:14px;margin-top:-4px;opacity:1}
.kit-then:empty{display:none}
.kit-links{display:flex;justify-content:center;gap:20px;margin:0;font-size:13px}
.kit-links a{color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.kit-links:empty{display:none}
@keyframes kit-up{from{transform:translateY(40px);opacity:0}}
@keyframes kit-fade{from{opacity:0}}
@media (prefers-reduced-motion:reduce){.kit-unlock,.kit-sheet{animation:none}}
