/* Coloring Pages: Princess – same "candy" look as the app (Princess/Core/Theme.swift). */

@font-face {
  font-family: "Lemon";
  src: url("/assets/Lemon-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --primary: #ff4f8b;
  --primary-deep: #d63a72;
  --grape: #8b6cf0;
  --grape-deep: #6c4fd6;
  --mint: #3ccfb4;
  --mint-deep: #23a88f;
  --sun: #ffc83d;
  --sun-deep: #e5a417;
  --sky: #5ab8ff;
  --ink: #4a3168;
  --ink-soft: #7a6894;
  --card: #ffffff;
  --line: #f1e9f6;
  --bg-top: #ffe0f0;
  --bg-mid: #f1e4ff;
  --bg-bottom: #ddf1ff;
  --shadow: 0 10px 30px rgba(139, 108, 240, 0.16);
  --radius: 28px;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3eaff;
    --ink-soft: #c2b3d8;
    --card: #2b2140;
    --line: #3a2e52;
    --bg-top: #2a1b33;
    --bg-mid: #231a3a;
    --bg-bottom: #182437;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --ink: #f3eaff;
  --ink-soft: #c2b3d8;
  --card: #2b2140;
  --line: #3a2e52;
  --bg-top: #2a1b33;
  --bg-mid: #231a3a;
  --bg-bottom: #182437;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--round);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%) fixed;
  background-color: var(--bg-mid);
  line-height: 1.6;
}

a { color: var(--grape); font-weight: 700; }
a:hover { color: var(--grape-deep); }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; border-radius: 10px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }

/* ---------- header / footer ---------- */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); font-weight: 900;
}
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: var(--shadow); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 800; font-size: 15px;
  padding: 8px 14px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--card); color: var(--primary); }

.foot {
  padding: 40px 0 48px; text-align: center; color: var(--ink-soft); font-size: 14px;
}
.foot nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }

/* ---------- building blocks ---------- */

.card {
  background: var(--card);
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.title {
  font-family: "Lemon", var(--round);
  font-weight: 400;
  color: var(--primary);
  line-height: 1.15;
  margin: 0 0 8px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 900; font-size: 17px; color: #fff; text-decoration: none;
  background: var(--primary); border: 0; border-radius: 22px; cursor: pointer;
  padding: 14px 26px;
  box-shadow: 0 6px 0 var(--primary-deep);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { color: #fff; filter: brightness(1.04); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--primary-deep); }
.btn.grape { background: var(--grape); box-shadow: 0 6px 0 var(--grape-deep); }
.btn.grape:active { box-shadow: 0 1px 0 var(--grape-deep); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- home ---------- */

.hero { text-align: center; padding: 18px 0 8px; }
.hero .logo { width: min(320px, 78vw); height: auto; display: block; margin: 0 auto 6px; }
.hero p.lead { font-size: clamp(18px, 2.4vw, 22px); font-weight: 800; margin: 0 auto 22px; max-width: 34ch; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.worlds {
  display: grid; gap: 14px; margin: 34px 0 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.world {
  border-radius: 26px; padding: 10px 10px 12px; text-align: center;
  border: 4px solid #fff; box-shadow: var(--shadow);
}
.world img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; display: block; }
.world span {
  display: block; margin-top: 6px; padding: 7px 10px; border-radius: 999px;
  color: #fff; font-weight: 900; font-size: 15px;
}

.features { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 26px 0; }
.feature h3 { margin: 8px 0 4px; font-size: 18px; font-weight: 900; }
.feature p { margin: 0; color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.dot {
  width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center;
  color: #fff; font-size: 22px; font-weight: 900;
}

/* ---------- legal pages ---------- */

.doc { margin: 10px 0 30px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); }
.doc .meta { color: var(--ink-soft); font-weight: 700; margin: 0 0 18px; }
.doc h2 { font-size: 20px; font-weight: 900; margin: 28px 0 6px; color: var(--ink); }
.doc p, .doc li { font-weight: 500; }
.doc ul { padding-left: 22px; }
.doc .summary {
  background: linear-gradient(135deg, #fff0f6, #f3edff);
  border-radius: 20px; padding: 16px 18px; font-weight: 700; color: #4a3168;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .doc .summary { background: #35284d; color: var(--ink); }
}

/* ---------- support form ---------- */

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 800; }
.form .hint { font-weight: 600; color: var(--ink-soft); font-size: 14px; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 600; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 16px;
  padding: 12px 14px; width: 100%;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--grape); }
.form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { border-radius: 16px; padding: 14px 16px; font-weight: 800; display: none; }
.status.ok { display: block; background: #dff7f1; color: #17705f; }
.status.err { display: block; background: #ffe3ec; color: #a8264f; }

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .top { flex-wrap: wrap; }
  .nav a { padding: 6px 10px; font-size: 14px; }
}
