:root {
  --pink: #ff5fa8;
  --pink-deep: #e0368a;
  --pink-soft: #ffd6ea;
  --cream: #fff6e6;
  --paper: #fffdf7;
  --choc: #4a2c1a;
  --choc-soft: #7a5238;
  --gold: #f4b63f;
  --stamp: #d3202f;
  --mint: #4fc59a;
  --shadow: 4px 4px 0 var(--choc);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.5;
  color: var(--choc);
  background-color: var(--pink-soft);
  background-image:
    radial-gradient(circle at 12px 12px, rgba(255, 95, 168, 0.35) 3px, transparent 4px),
    radial-gradient(circle at 36px 36px, rgba(244, 182, 63, 0.4) 3px, transparent 4px);
  background-size: 48px 48px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .window-title, .pixel-button, .chip-button, .marquee, .permit-kicker, .proof-kicker {
  font-family: "Pixelify Sans", "Nunito", sans-serif;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

/* marquee */
.marquee {
  overflow: hidden;
  background: var(--choc);
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 3px solid var(--pink);
}
.marquee-track {
  display: inline-flex;
  animation: scroll 22s linear infinite;
}
.marquee-track span { padding: 8px 16px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* hero */
.hero { text-align: center; padding: 20px 0 8px; }
.sparkle-line { margin: 0; color: var(--pink-deep); font-weight: 700; font-size: 14px; }
h1 {
  margin: 4px 0 6px;
  font-size: clamp(38px, 11vw, 64px);
  line-height: 1;
  color: var(--pink-deep);
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 var(--choc);
}
.tagline { margin: 12px auto 0; max-width: 420px; text-wrap: balance; }

/* windows */
.window {
  margin-top: 28px;
  background: var(--paper);
  border: 3px solid var(--choc);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.window-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: linear-gradient(90deg, var(--pink-deep), var(--pink));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 3px solid var(--choc);
}
.window-buttons { letter-spacing: 0.3em; font-size: 13px; }
.window-body { padding: 18px 16px 20px; }
h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.15; text-wrap: balance; }

/* permit */
.permit { padding: 14px; background: var(--cream); }
.permit-inner {
  position: relative;
  padding: 22px 18px 20px;
  text-align: center;
  background: var(--paper);
  border: 2px solid var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}
.permit-kicker {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--choc-soft);
}
.permit h2 { font-size: clamp(28px, 8vw, 40px); color: var(--choc); margin-bottom: 14px; }
.permit-body { margin: 0 auto 16px; max-width: 440px; font-size: 19px; text-wrap: pretty; }
.permit-body strong { background: linear-gradient(transparent 58%, #ffe48a 58%); }
.permit-name {
  font-family: "Caveat", cursive;
  font-size: 1.7em;
  line-height: 1;
  color: var(--pink-deep);
  padding: 0 4px;
}
.permit-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 0 0 8px;
  text-align: left;
}
.permit-facts div { border-bottom: 2px dotted var(--choc-soft); padding-bottom: 4px; }
.permit-facts dt { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--choc-soft); }
.permit-facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.signature-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.signature { flex: 1; text-align: left; min-width: 0; }
.signature-ink {
  display: block;
  font-family: "Caveat", cursive;
  font-size: 46px;
  line-height: 0.9;
  color: #1d3a8a;
  transform: rotate(-4deg);
  transform-origin: left bottom;
  padding-left: 8px;
}
.signature-label {
  display: block;
  border-top: 2px solid var(--choc);
  margin-top: 2px;
  padding-top: 3px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--choc-soft);
}

.stamp {
  flex: none;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  color: var(--stamp);
  border: 4px double var(--stamp);
  border-radius: 10px;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  text-align: center;
  line-height: 1.05;
  transform: rotate(-11deg);
  opacity: 0.9;
  mix-blend-mode: multiply;
  animation: stamp-in 0.5s 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.stamp-top { font-size: 11px; letter-spacing: 0.12em; }
.stamp-bottom { font-size: 8px; letter-spacing: 0.1em; }
.stamp-main { font-size: 30px; letter-spacing: 0.04em; }
@keyframes stamp-in {
  from { transform: rotate(-24deg) scale(3); opacity: 0; }
  to { transform: rotate(-11deg) scale(1); opacity: 0.9; }
}

.permit-actions { padding: 14px; border-top: 3px solid var(--choc); background: var(--pink-soft); text-align: center; }

/* fine print: Mom's jurisdiction */
.ast {
  color: var(--stamp);
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 0.6em;
  line-height: 0;
  letter-spacing: 0.02em;
  text-shadow: none;
  padding-left: 1px;
}
.fine {
  margin: 8px 0 0;
  font-size: 10.5px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--choc-soft);
  text-wrap: pretty;
}
.fine .ast { font-size: 1em; line-height: inherit; vertical-align: baseline; }
.fine.center { text-align: center; margin-left: auto; margin-right: auto; max-width: 400px; }
.fine p { margin: 0 0 4px; }
.footnotes {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--gold);
  text-align: left;
  font-size: 9.5px;
}
.legal { margin: 18px auto 0; max-width: 460px; font-size: 9px; text-align: center; opacity: 0.9; }
.marquee small { font-size: 10px; letter-spacing: 0.06em; font-weight: 500; color: var(--pink-soft); text-transform: uppercase; }
.permit-facts .wide { grid-column: 1 / -1; }
.mom-signature { margin-top: 14px; }
.signature-ink.blank { font-size: 30px; transform: none; }
.proof-ast { font-size: 0.3em; vertical-align: top; line-height: 1; }
.proof-fine { margin: 20px auto 0; max-width: 380px; font-size: 10px; line-height: 1.4; opacity: 0.9; }

/* buttons */
.pixel-button, .chip-button {
  font-weight: 700;
  font-size: 16px;
  color: var(--choc);
  background: var(--gold);
  border: 3px solid var(--choc);
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 44px;
  box-shadow: 3px 3px 0 var(--choc);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  touch-action: manipulation;
}
.pixel-button:active, .chip-button:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--choc); }
.pixel-button:focus-visible, .chip-button:focus-visible, summary:focus-visible, .check-item:focus-within {
  outline: 3px solid var(--pink-deep);
  outline-offset: 2px;
}
.pixel-button.big { font-size: 18px; padding: 12px 18px; background: var(--pink); color: #fff; text-shadow: 1px 1px 0 var(--choc); }
.pixel-button.ghost { background: var(--paper); }
.pixel-button.is-on { background: var(--mint); }
.chip-button { background: var(--paper); font-size: 15px; padding: 6px 12px; }
.chip-button.is-active { background: var(--pink); color: #fff; }

.batch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; }

/* checklists */
.checklist, .steps { list-style: none; margin: 0; padding: 0; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 2px dotted var(--pink-soft);
  border-radius: 6px;
  cursor: pointer;
}
.check-item input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 3px solid var(--choc);
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.check-item input:focus { outline: none; }
.check-item input:checked { background: var(--pink); }
.check-item input:checked::after { content: "✓"; color: #fff; font-weight: 900; font-size: 17px; line-height: 1; }
.check-item .amount { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.check-item.is-done .label { text-decoration: line-through; opacity: 0.55; }
.hint { margin: 12px 0 0; font-size: 15px; color: var(--choc-soft); }

/* steps */
.progress { height: 16px; border: 3px solid var(--choc); border-radius: 999px; background: #fff; overflow: hidden; }
.progress-bar {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(45deg, var(--pink) 0 10px, var(--pink-deep) 10px 20px);
  transition: width 0.3s ease;
}
.progress-label { margin: 6px 0 10px; font-size: 14px; font-weight: 700; color: var(--choc-soft); }
.steps { counter-reset: step; }
.step { border-bottom: 2px dotted var(--pink-soft); padding-bottom: 6px; }
.step .check-item { border-bottom: 0; }
.step .label::before {
  counter-increment: step;
  content: counter(step) ". ";
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  color: var(--pink-deep);
}
.step-note {
  margin: 0 8px 8px 46px;
  padding: 8px 10px;
  font-size: 15px;
  background: var(--cream);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
}
.step-note.warn { border-left-color: var(--stamp); background: #ffeceb; }

.timer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 8px 10px 46px; }
.timer-display {
  font-family: "Pixelify Sans", sans-serif;
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 4.2ch;
  padding: 2px 10px;
  background: var(--choc);
  color: var(--gold);
  border-radius: 8px;
}
.timer.is-ringing .timer-display { background: var(--stamp); color: #fff; animation: ring 0.6s ease-in-out infinite alternate; }
@keyframes ring { to { transform: scale(1.08); } }

.step-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* faq */
.faq details { border-bottom: 2px dotted var(--pink-soft); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 900; padding: 10px 4px; min-height: 44px; border-radius: 6px; }
.faq summary::marker { color: var(--pink-deep); }
.faq p, .faq ul { margin: 0 4px 12px 22px; }
.faq ul { padding-left: 18px; }
.faq li { margin-bottom: 6px; }

footer { text-align: center; margin-top: 32px; font-weight: 700; }
footer p { margin: 4px 0; }
.tiny { font-size: 12px; font-weight: 500; color: var(--choc-soft); }
.edition-link { margin-top: 14px; }
.edition-link a {
  display: inline-block;
  padding: 8px 12px;
  color: var(--choc);
  background: var(--paper);
  border: 3px solid var(--choc);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--choc);
  font-family: "Pixelify Sans", sans-serif;
  text-decoration: none;
}
.edition-link a:active { transform: translate(3px, 3px); box-shadow: none; }
.timer-caption { font-family: "Pixelify Sans", sans-serif; font-weight: 700; color: var(--pink-deep); }

/* proof mode */
.proof {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  text-align: center;
  color: #fff;
  background: var(--pink-deep);
  animation: proof-bg 3s linear infinite;
}
.proof[hidden], .done[hidden] { display: none; }
@keyframes proof-bg {
  0%, 100% { background: #e0368a; }
  33% { background: #7b3fe4; }
  66% { background: #e8891c; }
}
.proof-content { max-width: 560px; }
.proof-kicker { margin: 0; font-size: 16px; letter-spacing: 0.2em; font-weight: 700; }
.proof-headline {
  margin: 10px 0;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(72px, 24vw, 170px);
  line-height: 0.92;
  text-shadow: 5px 5px 0 var(--choc);
  animation: bounce 1.2s ease-in-out infinite alternate;
}
@keyframes bounce { to { transform: scale(1.05) rotate(-2deg); } }
.proof-sub { font-size: 20px; font-weight: 700; margin: 0 0 12px; }
.proof-live { font-size: 15px; margin: 0 0 22px; font-variant-numeric: tabular-nums; opacity: 0.95; }

/* done */
.done {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(74, 44, 26, 0.6);
}
.done-card {
  max-width: 420px;
  padding: 24px 20px;
  text-align: center;
  background: var(--paper);
  border: 3px solid var(--choc);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--choc);
  animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes pop { from { transform: scale(0.8); opacity: 0; } }
.done-emoji { font-size: 72px; margin: 0; line-height: 1; animation: bounce 0.8s ease-in-out infinite alternate; }
.done-card h2 { color: var(--pink-deep); font-size: 32px; }

/* confetti */
.confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.confetti span {
  position: absolute;
  top: -48px;
  font-size: 28px;
  animation: fall linear forwards;
  will-change: transform;
}
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

@media (max-width: 420px) {
  .permit-facts { grid-template-columns: 1fr; }
  .stamp-main { font-size: 24px; }
  .signature-ink { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .proof, .proof-headline, .done-emoji, .timer.is-ringing .timer-display { animation: none; }
  .stamp, .done-card { animation-duration: 0.01s; animation-delay: 0s; }
  .confetti { display: none; }
}

/* evidence photos: taped-up snapshots */
.exhibit {
  position: relative;
  margin: 18px auto;
  padding: 8px 8px 6px;
  max-width: 280px;
  background: #fff;
  border: 1px solid rgba(74, 44, 26, 0.25);
  box-shadow: 3px 4px 0 rgba(74, 44, 26, 0.35);
}
.exhibit::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 84px;
  height: 22px;
  margin-left: -42px;
  background: rgba(244, 182, 63, 0.75);
  border-left: 1px dashed rgba(74, 44, 26, 0.3);
  border-right: 1px dashed rgba(74, 44, 26, 0.3);
  transform: rotate(-3deg);
}
.exhibit img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--cream);
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}
.exhibit figcaption {
  padding: 6px 4px 2px;
  font-family: "Caveat", cursive;
  font-size: 22px;
  line-height: 1.1;
  text-align: center;
  color: var(--choc);
}
.exhibit.wide { max-width: 100%; }
.exhibit.wide figcaption { font-family: "Nunito", sans-serif; font-size: 14px; line-height: 1.4; text-align: left; padding: 8px 4px 4px; }
.exhibit.small { max-width: 170px; }
.tilt-l { transform: rotate(-1.6deg); }
.tilt-r { transform: rotate(1.4deg); }

.dont { display: grid; gap: 4px 18px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 2px dotted var(--pink-soft); }
.dont h3, .list-heading { margin: 0 0 6px; font-family: "Pixelify Sans", sans-serif; font-size: 20px; line-height: 1.2; text-wrap: balance; }
.dont p { margin: 0; }
.list-heading { margin-top: 26px; }
.donts { margin: 8px 0 0; padding: 0; list-style: none; }
.donts li { position: relative; padding: 9px 4px 9px 34px; border-bottom: 2px dotted var(--pink-soft); }
.donts li::before { content: "🚫"; position: absolute; left: 4px; top: 9px; }
@media (min-width: 560px) {
  .dont { grid-template-columns: 220px 1fr; }
  .dont.no-photo { grid-template-columns: 1fr; }
  .dont .exhibit { margin: 6px 0; }
}

/* MAJOR WARNING: hazard-tape box */
.major-warning {
  position: relative;
  margin: 22px 0 0;
  padding: 16px 16px 14px;
  background: #fff4c2;
  border: 3px solid var(--choc);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--choc);
}
.major-warning::before, .major-warning::after {
  content: "";
  display: block;
  height: 14px;
  margin: -16px -16px 12px;
  background: repeating-linear-gradient(135deg, var(--choc) 0 14px, #ffd21f 14px 28px);
  border-bottom: 3px solid var(--choc);
  border-radius: 6px 6px 0 0;
}
.major-warning::after { margin: 12px -16px -14px; border-bottom: 0; border-top: 3px solid var(--choc); border-radius: 0 0 6px 6px; }
.major-warning h3 {
  margin: 0 0 8px;
  font-family: "Pixelify Sans", sans-serif;
  font-size: clamp(22px, 6.4vw, 30px);
  line-height: 1.1;
  color: var(--stamp);
  text-align: center;
  text-wrap: balance;
}
.major-warning .siren { display: block; font-size: 15px; letter-spacing: 0.14em; color: var(--choc); animation: siren 1s steps(2, jump-none) infinite; }
@keyframes siren { 50% { opacity: 0.35; } }
.major-warning p { margin: 8px 0 0; }
.major-warning ol { margin: 8px 0 0; padding-left: 22px; }
.major-warning li { margin-bottom: 4px; }
.step-note.major { border-left-width: 6px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .major-warning .siren { animation: none; } }
