/* Colora — dependency-free styles. Palette-dots brand: purple #6A4FB5. */
:root {
  --purple: #6A4FB5;
  --purple-dark: #543E91;
  --ink: #2b2b2b;
  --paper: #FFF9F0;
  --card: #ffffff;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

/* ---------- hero ---------- */
.hero {
  background: var(--purple);
  color: #fff;
  text-align: center;
  padding: 40px 20px 34px;
  border-radius: 0 0 28px 28px;
}
.logo {
  position: relative;
  width: 92px; height: 92px;
  margin: 0 auto 8px;
}
.logo .dot {
  position: absolute;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 3px solid #fff;
}
.d-red    { background: #E14B4B; left: 33px; top: 0; }
.d-pink   { background: #E14B8F; left: 2px;  top: 20px; }
.d-orange { background: #F2A03D; right: 2px; top: 20px; }
.d-blue   { background: #4B9BE1; left: 8px;  bottom: 4px; }
.d-yellow { background: #F2D54B; right: 8px; bottom: 4px; }
.d-green  { background: #6FBF73; left: 33px; bottom: 0; }
.d-white  { background: #fff;    left: 33px; top: 33px; border-color: #fff; }
.hero h1 { margin: 6px 0 8px; font-size: 2.6rem; letter-spacing: 0.5px; }
.tagline { margin: 0 auto; max-width: 34em; font-size: 1.05rem; line-height: 1.45; opacity: 0.95; }

/* ---------- section toggle ---------- */
.toggle {
  display: flex; justify-content: center; gap: 8px;
  margin: 22px auto 4px; padding: 0 16px;
}
.toggle-btn {
  font: inherit; font-size: 1.05rem; font-weight: 600;
  padding: 10px 26px; border-radius: 999px;
  border: 2px solid var(--purple); background: #fff; color: var(--purple-dark);
  cursor: pointer;
}
.toggle-btn.active { background: var(--purple); color: #fff; }
.section-blurb { text-align: center; color: #555; margin: 8px 16px 4px; }

/* ---------- library ---------- */
.library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 14px auto 8px;
  padding: 0 16px;
}
.card {
  font: inherit;
  background: var(--card);
  border: 2px solid #E7DEF7;
  border-radius: var(--radius);
  padding: 12px 12px 10px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 8px rgba(84, 62, 145, 0.08);
}
.card:active { transform: scale(0.98); }
.card svg { width: 100%; height: auto; display: block; pointer-events: none; }
.card .card-title { display: block; margin-top: 8px; font-weight: 600; }
.card .card-progress { display: block; margin-top: 2px; font-size: 0.82rem; color: var(--purple); min-height: 1em; }

/* sheet artwork defaults (library + studio) */
svg.sheet .region { fill: #ffffff; stroke: var(--ink); stroke-width: 5; }
svg.sheet .ink { pointer-events: none; }

/* ---------- how it works / footer ---------- */
.how { max-width: 640px; margin: 30px auto 0; padding: 0 20px; }
.how h2 { color: var(--purple-dark); }
.how li { margin: 8px 0; line-height: 1.45; }
.footer { text-align: center; color: #666; padding: 28px 16px 36px; font-size: 0.92rem; }
.footer a { color: var(--purple-dark); }

/* ---------- studio ---------- */
.studio-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--purple); color: #fff;
  padding: 10px 14px;
  position: sticky; top: 0; z-index: 5;
}
.studio-bar h2 { margin: 0; font-size: 1.2rem; }
.bar-btn {
  font: inherit; font-weight: 600;
  background: #fff; color: var(--purple-dark);
  border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer;
}
.bar-spacer { flex: 1; }
.stage {
  max-width: 560px; margin: 14px auto 0; padding: 0 14px;
}
.stage svg {
  width: 100%; height: auto; display: block;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(84, 62, 145, 0.15);
  touch-action: manipulation;
}
.stage svg .region { cursor: pointer; }
.tools { max-width: 560px; margin: 12px auto 30px; padding: 0 14px; }
.palette-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.pal-tab {
  font: inherit; font-weight: 600;
  padding: 7px 18px; border-radius: 999px;
  border: 2px solid var(--purple); background: #fff; color: var(--purple-dark); cursor: pointer;
}
.pal-tab.active { background: var(--purple); color: #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid #fff; outline: 2px solid #ccc;
  cursor: pointer; padding: 0;
}
.swatch.selected { outline: 3px solid var(--ink); transform: scale(1.12); }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.action-btn {
  font: inherit; font-weight: 600;
  padding: 10px 16px; border-radius: 999px;
  border: 2px solid var(--purple); background: #fff; color: var(--purple-dark); cursor: pointer;
}
.action-btn:disabled { opacity: 0.4; cursor: default; }
.action-btn.primary { background: var(--purple); color: #fff; }

/* ---------- privacy page ---------- */
.doc { max-width: 680px; margin: 0 auto; padding: 28px 20px 48px; line-height: 1.55; }
.doc h1 { color: var(--purple-dark); }
.doc a { color: var(--purple-dark); }

@media (max-width: 420px) {
  .hero h1 { font-size: 2.1rem; }
  .swatch { width: 36px; height: 36px; }
}
