/* ══════════════════════════════════════════════════════════════════════
   Widget Theme: the Android app's "sticker diary" look (ui/Scrap.kt).
   Crumpled paper, cut-out scrap letters, white-framed tilted cards and
   pastel pills with a ring. Shared by the landing page and both legal
   pages; follows the system light / dark setting like the app.
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --wt-paper:   #f6f2ee;
  --wt-card:    #ffffff;
  --wt-ink:     #3b3a45;
  --wt-muted:   #5e5c6b;
  --wt-faint:   #8b8898;
  --wt-line:    rgba(59, 58, 69, 0.12);
  --wt-header:  rgba(246, 242, 238, 0.86);
  --wt-shadow:  rgba(59, 58, 69, 0.18);
  --wt-texture: 1;

  /* Brand pastels: the same in light and dark, text on them is always ink. */
  --wt-pink:    #f9c6da;
  --wt-pink-ink:#8e2756;
  --wt-hot:     #e85c96;
  --wt-berry:   #c94374;
  --wt-lilac:   #cfcbf6;
  --wt-lilac-ink:#26215c;
  --wt-violet:  #7d74d6;
  --wt-mint:    #cdeff4;
  --wt-mint-ink:#1d5f6b;
  --wt-cream:   #f3e9cf;
  --wt-cream-line:#d6c9a8;
  --wt-on-pastel:#3b3a45;

  --wt-text:    "Fredoka", system-ui, sans-serif;
  --wt-caps:    "Josefin Sans", system-ui, sans-serif;
  --wt-hand:    "Caveat", cursive;

  /* Remap the site-wide tokens so the shared header, footer and FAQ follow the app */
  --bg: var(--wt-paper);
  --bg-elevated: var(--wt-card);
  --text: var(--wt-ink);
  --text-muted: var(--wt-muted);
  --text-faint: var(--wt-faint);
  --border: var(--wt-line);
  --border-hover: var(--wt-faint);
  --accent: var(--wt-berry);
  --font-sans: var(--wt-text);
  --font-heading: var(--wt-text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --wt-paper:   #1c1b22;
    --wt-card:    #2a2932;
    --wt-ink:     #f1eef6;
    --wt-muted:   #b5b1c2;
    --wt-faint:   #8c889a;
    --wt-line:    rgba(255, 255, 255, 0.1);
    --wt-header:  rgba(28, 27, 34, 0.86);
    --wt-shadow:  rgba(0, 0, 0, 0.5);
    --wt-texture: 0.05;
  }
}

body {
  background: var(--wt-paper);
  color: var(--wt-ink);
  font-family: var(--wt-text);
  position: relative;
}
/* The app's paper texture, a faint trace of it in dark mode (Modifier.paper()). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("paper.webp") center top / 100% auto repeat-y;
  opacity: var(--wt-texture);
  pointer-events: none;
}

.site-header { background: var(--wt-header); border-color: var(--wt-line); }
.site-header .logo, .site-footer .logo {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--wt-ink);
}
.nav-link { color: var(--wt-muted); }
.nav-link:hover { color: var(--wt-ink); background: var(--wt-line); }
.nav-link-cta { color: var(--wt-pink-ink); background: var(--wt-pink); border-color: transparent; }
.nav-link-cta:hover { color: var(--wt-pink-ink); background: var(--wt-pink); filter: brightness(1.04); }
.site-footer { background: var(--wt-card); border-color: var(--wt-line); }
.footer-col a:hover { color: var(--wt-ink); }

/* ── Scrap letters: each letter cut from a different paper (B0 scrap alphabet) ── */
.wt-scrap { display: flex; flex-wrap: wrap; gap: 0.32em 0.5em; margin: 0; line-height: 1; }
.wt-scrap.center { justify-content: center; }
.wt-word { display: inline-flex; gap: 0.08em; white-space: nowrap; }
.wt-scrap span[data-l] {
  display: inline-grid;
  place-items: center;
  min-width: 0.82em;
  height: 1.24em;
  padding: 0 0.17em;
  font-size: 1em;
  clip-path: polygon(2% 6%, 30% 0, 62% 4%, 100% 1%, 97% 40%, 100% 96%, 66% 100%, 30% 95%, 0 100%, 3% 52%);
}
.wt-scrap span[data-l]:nth-child(3n+1) { clip-path: polygon(0 2%, 48% 5%, 100% 0, 96% 50%, 99% 100%, 52% 96%, 4% 100%, 0 46%); }
.wt-scrap span[data-l]:nth-child(3n+2) { clip-path: polygon(4% 0, 100% 4%, 97% 30%, 100% 70%, 95% 100%, 40% 97%, 0 100%, 2% 60%, 0 25%); }
.p0 { background: var(--wt-pink); color: #b23a6b; }
.p1 { background: var(--wt-hot); color: #fff; }
.p2 { background: var(--wt-lilac); color: #4a42a8; }
.p3 { background: var(--wt-cream) repeating-linear-gradient(180deg, transparent 0 0.2em, var(--wt-cream-line) 0.2em 0.23em); color: var(--wt-on-pastel); }
.p4 { background: var(--wt-mint); color: #23707e; }
.p5 { background: #fff; color: #d94c88; }
.p6 { background: #a9a2ec; color: var(--wt-lilac-ink); }
.f0 { font-family: "Bowlby One", sans-serif; font-size: 0.92em; }
.f1 { font-family: "DM Serif Display", serif; }
.f2 { font-family: "Caveat", cursive; font-weight: 700; font-size: 1.25em; }
.f3 { font-family: "Fredoka", sans-serif; font-weight: 600; }
.f4 { font-family: "Shrikhand", cursive; font-size: 0.88em; }
.r0 { transform: rotate(-5deg); } .r1 { transform: rotate(-2deg); } .r2 { transform: rotate(1deg); }
.r3 { transform: rotate(4deg); } .r4 { transform: rotate(-3deg); } .r5 { transform: rotate(3deg); }

.wt-kicker {
  margin: 0 0 14px;
  font-family: var(--wt-caps);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wt-ink);
}
.wt-hand { font-family: var(--wt-hand); font-weight: 700; }

/* ── Pieces ── */
.wt-tag {
  display: inline-block;
  padding: 5px 11px 4px;
  font-family: "Bowlby One", sans-serif;
  font-size: 13px;
  color: #fff;
  background: var(--wt-hot);
  clip-path: polygon(3% 8%, 40% 0, 100% 6%, 96% 52%, 100% 100%, 55% 94%, 0 100%, 4% 50%);
  transform: rotate(-5deg);
}
.wt-tag.free { background: var(--wt-pink); color: #b23a6b; }
.wt-note {
  display: inline-block;
  padding: 0 12px;
  font-family: var(--wt-hand);
  font-weight: 700;
  font-size: 24px;
  color: var(--wt-on-pastel);
  background: var(--wt-cream) repeating-linear-gradient(180deg, transparent 0 6px, var(--wt-cream-line) 6px 7px);
  transform: rotate(3deg);
}
.wt-card {
  background: var(--wt-card);
  padding: 7px;
  border-radius: 24px;
  box-shadow: 0 10px 28px var(--wt-shadow);
}
.wt-card img { display: block; width: 100%; height: auto; border-radius: 18px; }
.wt-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--wt-berry);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  box-shadow: 0 0 0 4px var(--wt-card), 0 8px 22px rgba(201, 67, 116, 0.35);
}
.wt-button svg { width: 22px; height: 22px; flex-shrink: 0; }
.wt-button small { display: block; font-size: 11px; opacity: 0.8; font-weight: 500; }
.wt-button span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.wt-button[aria-disabled="true"] { cursor: default; }
.wt-sparkle { position: absolute; width: 22px; height: 22px; pointer-events: none; }

/* ── Landing ── */
.wt-hero {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 28px 56px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.wt-hero h1 { font-size: clamp(46px, 7.4vw, 82px); margin: 0 0 26px; }
.wt-lead { max-width: 560px; margin: 0 0 30px; color: var(--wt-muted); font-size: 19px; line-height: 1.65; }
.wt-meta { margin: 18px 0 0; color: var(--wt-faint); font-size: 15px; }
.wt-phone { position: relative; justify-self: center; width: min(100%, 360px); transform: rotate(2.5deg); }
.wt-phone .wt-card { border-radius: 40px; padding: 9px; }
.wt-phone .wt-card img { border-radius: 32px; }
.wt-phone .wt-tag { position: absolute; top: -12px; left: -14px; z-index: 1; font-size: 15px; }

.wt-section { max-width: 1160px; margin: 0 auto; padding: 72px 28px; }
.wt-section h2, .wt-download h2, .wt-private h2 {
  margin: 0 0 16px;
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.1;
}
.wt-section > p { max-width: 660px; margin: 0; color: var(--wt-muted); font-size: 18px; line-height: 1.7; }

.wt-widgets {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.wt-widget {
  padding: 16px 14px;
  border-radius: 20px;
  background: var(--wt-card);
  box-shadow: 0 4px 14px var(--wt-shadow);
}
.wt-widget:nth-child(odd) { transform: rotate(-1.2deg); }
.wt-widget:nth-child(even) { transform: rotate(1deg); }
.wt-widget h3 { margin: 0 0 4px; font-weight: 600; font-size: 17px; }
.wt-widget p { margin: 0; color: var(--wt-muted); font-size: 14px; line-height: 1.45; }
.wt-widget .wt-tag { margin-top: 10px; font-size: 11px; }

.wt-split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.wt-split .wt-phone { transform: rotate(-2.5deg); width: min(100%, 320px); }
.wt-list { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.wt-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--wt-muted); font-size: 16.5px; line-height: 1.6; }
.wt-list li strong { color: var(--wt-ink); font-weight: 600; }
.wt-list img { width: 46px; height: 46px; flex-shrink: 0; }

.wt-pills { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.wt-pill { padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--wt-on-pastel); box-shadow: 0 0 0 3px var(--wt-card); }
.wt-pill:nth-child(4n+1) { background: var(--wt-pink); color: var(--wt-pink-ink); transform: rotate(-2deg); }
.wt-pill:nth-child(4n+2) { background: var(--wt-mint); color: var(--wt-mint-ink); transform: rotate(1.5deg); }
.wt-pill:nth-child(4n+3) { background: var(--wt-lilac); color: var(--wt-lilac-ink); transform: rotate(-1deg); }
.wt-pill:nth-child(4n+4) { background: var(--wt-cream); transform: rotate(2deg); }

.wt-private {
  margin: 24px auto 0;
  max-width: 1104px;
  padding: 48px;
  border-radius: 32px;
  background: var(--wt-lilac);
  color: var(--wt-lilac-ink);
  transform: rotate(-0.6deg);
}
.wt-private p { max-width: 740px; margin: 0 0 18px; font-size: 17px; line-height: 1.7; }
.wt-private a { color: var(--wt-lilac-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.wt-private .wt-kicker { color: var(--wt-lilac-ink); opacity: 0.75; }

.wt-download { padding: 96px 28px 110px; text-align: center; }
.wt-download img { width: 120px; height: 120px; }
.wt-download p { max-width: 560px; margin: 0 auto 28px; color: var(--wt-muted); font-size: 18px; }

/* ── Legal pages ── */
.legal { max-width: 800px; margin: 0 auto; padding: 64px 24px 120px; }
.legal .wt-scrap { font-size: clamp(34px, 7vw, 50px); margin: 18px 0 14px; }
.legal .updated { color: var(--wt-faint); font-size: 14px; margin: 0 0 40px; }
.legal h2 { font-weight: 600; font-size: 23px; margin: 44px 0 12px; }
.legal p, .legal li { color: var(--wt-muted); font-size: 16px; line-height: 1.75; }
.legal strong { color: var(--wt-ink); font-weight: 600; }
.legal ul { padding-left: 22px; }
.legal li { margin: 7px 0; }
.legal a { color: var(--wt-ink); text-decoration: underline; text-decoration-color: var(--wt-hot); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--wt-line); color: var(--wt-muted); }
.legal th { color: var(--wt-ink); font-weight: 600; }
.legal .table-wrap { overflow-x: auto; }
.wt-notice {
  margin: 28px 0;
  padding: 22px 24px;
  border-radius: 22px;
  background: var(--wt-cream) repeating-linear-gradient(180deg, transparent 0 27px, var(--wt-cream-line) 27px 28px);
  transform: rotate(-0.5deg);
}
.wt-notice p { margin: 0; color: var(--wt-on-pastel); }
.wt-notice strong { color: var(--wt-on-pastel); }

@media (max-width: 960px) {
  .wt-widgets { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .wt-hero, .wt-split { grid-template-columns: 1fr; text-align: center; }
  .wt-hero .wt-scrap { justify-content: center; }
  .wt-lead, .wt-section > p { margin-inline: auto; }
  .wt-pills { justify-content: center; }
  .wt-list { text-align: left; }
  .wt-section { text-align: center; }
  .wt-widget { text-align: left; }
}
@media (max-width: 620px) {
  .nav { padding: 0 16px; }
  .wt-hero { padding: 40px 16px; gap: 48px; }
  .wt-section { padding: 56px 16px; }
  .wt-widgets { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .wt-private { margin-inline: 16px; padding: 32px 22px; }
  .wt-download { padding: 72px 16px 90px; }
  .legal { padding: 44px 16px 96px; }
  .legal table { font-size: 14px; }
  .legal th, .legal td { padding: 8px 6px; }
}
