/* ==========================================================================
   Growing Season: challenge hub styles (phone first, desktop from 960px)
   ========================================================================== */

/* ---------- Brand fonts ---------- */
@font-face {
  font-family: "ZY Ingenious";
  src: url("fonts/zy-ingenious.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Ugly Dave";
  src: url("fonts/ugly-dave.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* brand colours */
  --cream: #f8f4f1;
  --brown: #653e2e;
  --maroon: #5c0000;
  --butter: #f2e0aa;
  --sky: #87b8ff;
  --blush: #eecdd3;

  /* tints made from the brand colours */
  --paper: #fffdfb;
  --cream-deep: #f2e9e3;
  --blush-soft: #f7e7ea;
  --sky-soft: #e4eeff;
  --maroon-dark: #3d0000;
  --line: rgba(101, 62, 46, 0.14);
  --line-strong: rgba(101, 62, 46, 0.3);
  --shadow: 0 1px 2px rgba(92, 0, 0, 0.05), 0 10px 28px -16px rgba(101, 62, 46, 0.35);

  --font-display: "ZY Ingenious", Georgia, "Times New Roman", serif;
  --font-hand: "Ugly Dave", "Marker Felt", "Comic Sans MS", cursive;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 22px;
  --gutter: 16px;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--maroon); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
.ico { width: 20px; height: 20px; flex: none; display: block; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--maroon); color: var(--cream); padding: 10px 16px; border-radius: 99px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.noscript { padding: 24px; background: var(--paper); border-radius: var(--radius); }

.d-only { display: none; }

/* ---------- Layout ---------- */
.app { min-height: 100vh; min-height: 100dvh; container-type: inline-size; --sidebar-w: 0px; overflow-x: clip; }
.sidebar { padding: calc(16px + env(safe-area-inset-top)) var(--gutter) 4px; }
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px var(--gutter) calc(48px + env(safe-area-inset-bottom));
  outline: none;
}

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; width: fit-content; }
.brand-mark { width: 42px; height: 42px; flex: none; display: block; transform: rotate(-4deg); }
.brand-text { display: flex; flex-direction: column; }
.brand-kicker {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; opacity: 0.85;
}
.brand-name { font-family: var(--font-display); font-size: 25px; line-height: 1.05; color: var(--maroon); }

/* ---------- Progress ---------- */
.progress { margin-top: 16px; }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; font-size: 14.5px; }
.progress-label strong { color: var(--maroon); font-weight: 700; }
.progress-cheer { font-family: var(--font-hand); font-size: 19px; line-height: 1; color: var(--maroon); white-space: nowrap; }
.progress-track {
  display: block; height: 12px; border-radius: 99px; overflow: hidden;
  background: var(--blush-soft); box-shadow: inset 0 0 0 1px var(--line);
}
.progress-fill {
  display: block; height: 100%; min-width: 0; border-radius: inherit;
  background: repeating-linear-gradient(-45deg, var(--maroon) 0 8px, #6e0d0d 8px 16px);
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Day navigation: tiles on phones, list on desktop ---------- */
.nav { margin-top: 14px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.nav-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 78px; padding: 10px 2px 9px;
  border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--brown); text-decoration: none; text-align: center;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item:active { transform: scale(0.97); }
.nav-check {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 2px solid var(--line-strong); color: var(--maroon);
}
.nav-check .ico { width: 14px; height: 14px; }
.nav-text { display: flex; flex-direction: column; min-width: 0; }
.nav-top { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.nav-label { font-weight: 700; font-size: 13.5px; line-height: 1.15; color: var(--maroon); }
.nav-meta { font-size: 11.5px; line-height: 1.15; opacity: 0.8; white-space: nowrap; }
.nav-title { display: none; }

.nav-item.is-start .nav-check { border: 0; background: var(--butter); }
.nav-item.is-next:not(.is-locked) { background: #faf0d2; border-color: rgba(92, 0, 0, 0.18); }
.nav-item.is-next:not(.is-locked) .nav-check { border: 0; background: var(--maroon); color: var(--butter); }
.nav-item.is-next .nav-check .ico { width: 15px; height: 15px; }
.nav-item.is-start .nav-check .ico { width: 15px; height: 15px; }
.nav-item.is-done .nav-check { background: var(--maroon); border-color: var(--maroon); color: var(--butter); }
.nav-item.is-locked { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.nav-item.is-locked .nav-check { border: 0; opacity: 0.75; }
.nav-item.is-locked .nav-check .ico { width: 17px; height: 17px; }

.nav-item[aria-current="page"] { background: var(--maroon); border-color: var(--maroon); border-style: solid; color: var(--cream); }
.nav-item[aria-current="page"] .nav-label { color: var(--cream); }
.nav-item[aria-current="page"] .nav-check { border-color: rgba(248, 244, 241, 0.55); color: var(--butter); }
.nav-item[aria-current="page"].is-done .nav-check,
.nav-item[aria-current="page"].is-start .nav-check,
.nav-item[aria-current="page"].is-next:not(.is-locked) .nav-check { background: var(--butter); border-color: var(--butter); color: var(--maroon); }
.nav-item[aria-current="page"].is-next:not(.is-locked) { background: var(--maroon); border-color: var(--maroon); }
.nav-item[aria-current="page"].is-locked .nav-check { color: var(--butter); opacity: 1; }

.sidebar-note { display: none; }

/* ---------- Page entrance ---------- */
.view { animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.view-start, .view-next { animation-name: fade-in; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { padding: 26px 0 4px; }
.hero-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 14px; }
.sticker {
  display: inline-block;
  font-family: var(--font-hand); font-size: 23px; line-height: 1;
  padding: 7px 13px 6px; border-radius: 10px;
  background: var(--blush); color: var(--maroon);
  transform: rotate(-3deg);
  box-shadow: 2px 3px 0 rgba(92, 0, 0, 0.12);
}
.hero-date { font-size: 14.5px; font-weight: 600; }
.hero-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(33px, 9vw, 54px); line-height: 1.04; letter-spacing: -0.005em;
  color: var(--maroon);
  text-wrap: balance;
}

/* ---------- Content blocks ---------- */
.block {
  margin-top: 16px; padding: 20px 20px 22px;
  border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.block-label {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 10px;
  font-family: var(--font-hand); font-weight: 400; font-size: 27px; line-height: 1;
  color: var(--maroon);
}
.block-label .ico { width: 22px; height: 22px; }

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 0.85em; }
.prose ul, .prose ol { margin: 0 0 0.85em; padding-left: 1.25em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--maroon); }
.prose strong { color: var(--maroon); font-weight: 700; }
.prose-lg { font-size: 18.5px; line-height: 1.55; }
.prose-intro { margin-top: 20px; font-size: 17.5px; }

.block-job { background: var(--blush); border-color: transparent; box-shadow: none; margin-top: 20px; }

.steps { list-style: none; margin: 0; padding: 0; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-head .block-label { margin: 0; }
.step-num {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-hand); font-size: 23px; line-height: 1; padding-top: 2px;
  color: var(--maroon);
}
.step-num.c1 { background: var(--sky); transform: rotate(-6deg); }
.step-num.c2 { background: var(--blush); transform: rotate(4deg); }
.step-num.c3 { background: var(--butter); transform: rotate(-3deg); }
.step-num .ico { display: none; width: 20px; height: 20px; }

/* ticking off a step */
.step.is-ticked .step-num { background: var(--maroon); color: var(--butter); padding-top: 0; }
.step.is-ticked .step-n { display: none; }
.step.is-ticked .step-num .ico { display: block; animation: tick-pop 0.6s cubic-bezier(0.2, 1.8, 0.4, 1) both; }
.step-tick {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin-top: 18px; min-height: 52px; padding: 10px 16px;
  border-radius: 14px; border: 2px dashed var(--line-strong); background: var(--cream);
  font: 700 16px/1.2 var(--font-body); color: var(--maroon); text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s, border-color 0.2s;
}
.step-tick:hover { border-color: var(--maroon); }
.step-tick-box {
  flex: none; width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center;
  border: 2px solid var(--maroon); background: var(--paper); color: var(--butter);
}
.step-tick-box .ico { width: 18px; height: 18px; opacity: 0; }
.step-tick[aria-pressed="true"] { background: var(--butter); border: 2px solid var(--butter); }
.step-tick[aria-pressed="true"] .step-tick-box { background: var(--maroon); animation: tick-pop 0.6s cubic-bezier(0.2, 1.8, 0.4, 1) both; }
.step-tick[aria-pressed="true"] .step-tick-box .ico { opacity: 1; }

.prose .hand-line.is-long { font-size: clamp(21px, 6vw, 25px); line-height: 1.25; }

/* longer quotes from Notion: a soft pull-quote card rather than handwriting */
.prose blockquote.pull {
  margin: 14px 0; padding: 14px 16px 14px 18px; border-radius: 14px;
  background: var(--cream); border-left: 4px solid var(--blush);
  font-style: italic; line-height: 1.6;
}

.block-why { background: var(--sky-soft); border-color: transparent; box-shadow: none; }

.block-example { position: relative; margin-top: 30px; padding-top: 26px; }
.block-example::before {
  content: ""; position: absolute; top: -13px; left: 50%;
  width: 104px; height: 26px; transform: translateX(-50%) rotate(-2.5deg);
  background: rgba(242, 224, 170, 0.88); border-radius: 3px;
  box-shadow: 0 1px 2px rgba(92, 0, 0, 0.08);
}
.example-title { font-weight: 700; color: var(--maroon); margin: 0 0 6px; }

.block-win { background: var(--butter); border: 2px dashed rgba(92, 0, 0, 0.3); box-shadow: none; }
.block-win .prose { font-size: 18px; font-weight: 600; }
.block-win .block-label .ico { color: var(--maroon); transform: rotate(-8deg); }

/* Fill-in-the-blank prompts */
.prose .fill-blanks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.prose .fill-blanks li {
  margin: 0; padding: 13px 16px; border-radius: 14px;
  background: var(--cream); border: 1.5px dashed var(--line-strong);
  font-weight: 650; color: var(--maroon); line-height: 1.9;
}
.blank {
  display: inline-block; min-width: 5.5em; margin: 0 3px; padding: 0 6px;
  border-bottom: 2px solid var(--maroon);
  font-size: 13.5px; font-weight: 500; font-style: italic; line-height: 1.3; text-align: center;
  color: rgba(101, 62, 46, 0.7);
}

/* Visual examples shown side by side, like two phone screens */
.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 440px; margin: 18px 0 6px; }
.example-media { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.example-media:nth-child(odd) { transform: rotate(-1.5deg); }
.example-media:nth-child(even) { transform: rotate(1.5deg); }
.example-media video, .example-media img {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 16px; border: 4px solid var(--paper); background: var(--cream-deep);
  box-shadow: 0 14px 24px -14px rgba(61, 0, 0, 0.55);
}
.example-media figcaption { font-family: var(--font-hand); font-size: 21px; line-height: 1.05; color: var(--maroon); text-align: center; }

/* ---------- Extra pieces that can come from Notion ---------- */
.prose h3.sub { margin: 1.1em 0 0.4em; font-family: var(--font-display); font-weight: 400; font-size: 21px; line-height: 1.2; color: var(--maroon); }
.prose > h3.sub:first-child { margin-top: 0; }
.prose hr { border: 0; height: 14px; margin: 18px 0; background: radial-gradient(circle, var(--line-strong) 1.6px, transparent 2px) 0 50% / 14px 14px repeat-x; }
.prose ol.sticker-list { list-style: none; padding: 0; counter-reset: sticker; }
.prose ol.sticker-list > li { position: relative; min-height: 34px; margin: 0 0 12px; padding: 3px 0 0 46px; counter-increment: sticker; }
.prose ol.sticker-list > li::before {
  content: counter(sticker); position: absolute; left: 0; top: 0; width: 33px; height: 33px; border-radius: 50%;
  display: grid; place-items: center; padding-top: 2px;
  font-family: var(--font-hand); font-size: 20px; line-height: 1; color: var(--maroon); background: var(--sky); transform: rotate(-6deg);
}
.prose ol.sticker-list > li:nth-child(3n+2)::before { background: var(--blush); transform: rotate(5deg); }
.prose ol.sticker-list > li:nth-child(3n+3)::before { background: var(--butter); transform: rotate(-3deg); }

.callout { display: flex; gap: 12px; margin: 14px 0; padding: 14px 16px; border-radius: 16px; background: var(--butter-soft, #faf0d4); border: 1.5px solid rgba(92, 0, 0, 0.12); }
.callout-icon { font-size: 20px; line-height: 1.4; }
.callout-body > :first-child { margin-top: 0; }
.callout-body > :last-child { margin-bottom: 0; }

.media-single { margin: 16px 0; }
.media-single img, .media-single video { display: block; width: 100%; height: auto; border-radius: 16px; border: 4px solid var(--paper); box-shadow: 0 14px 24px -14px rgba(61, 0, 0, 0.5); background: var(--cream-deep); }
.media-single figcaption { margin-top: 8px; font-family: var(--font-hand); font-size: 21px; color: var(--maroon); text-align: center; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--cream-deep); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose audio { display: block; width: 100%; margin: 12px 0; }

.cols { display: grid; gap: 16px; margin: 14px 0; }
@media (min-width: 600px) { .cols { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; } }

.table-wrap { margin: 16px 0; overflow-x: auto; border-radius: 16px; border: 1.5px solid var(--line); background: var(--paper); }
table.compare { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
table.compare th, table.compare td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.compare tr:last-child td { border-bottom: 0; }
table.compare th { background: var(--blush-soft); color: var(--maroon); font-weight: 700; }
table.compare td + td, table.compare th + th { border-left: 1px solid var(--line); }

.prose details { margin: 12px 0; padding: 12px 16px; border-radius: 14px; background: var(--cream); border: 1.5px solid var(--line); }
.prose summary { cursor: pointer; font-weight: 700; color: var(--maroon); }
.prose details[open] summary { margin-bottom: 8px; }

.prose .todo-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.prose .todo-list li { margin: 0; }
.todo-list label { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--cream); border: 1.5px solid var(--line); cursor: pointer; }
.todo-list input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--maroon); cursor: pointer; }
.todo-list input:checked + span { text-decoration: line-through; text-decoration-color: rgba(92, 0, 0, 0.45); opacity: 0.7; }

.day-intro { margin-top: 20px; font-size: 18px; }
.day-cta { margin-top: 22px; }

/* ---------- Prize draw: raffle tickets ---------- */
.ticket {
  --notch: 13px;
  position: relative; padding: 20px 22px;
  border-radius: 18px; background: var(--butter); color: var(--brown);
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--notch) at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
}
.ticket::after { /* the dashed tear line just inside the edge */
  content: ""; position: absolute; inset: 7px; border-radius: 13px;
  border: 2px dashed rgba(92, 0, 0, 0.22); pointer-events: none;
}
.ticket > * { position: relative; z-index: 1; }
.ticket-icon {
  flex: none; width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--maroon); color: var(--butter); transform: rotate(-10deg);
}
.ticket-icon .ico { width: 26px; height: 26px; }
.draw-title { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-hand); font-weight: 400; font-size: 27px; line-height: 1.05; color: var(--maroon); }
.draw-title .ico { width: 24px; height: 24px; }
.draw-prize { margin: 6px 0 0; font-weight: 700; color: var(--maroon); }
.draw-text { margin: 6px 0 0; font-size: 15.5px; }
.draw-count { margin: 10px 0 0; font-family: var(--font-hand); font-size: 21px; color: var(--maroon); }

.prize-card { display: flex; align-items: flex-start; gap: 16px; margin-top: 30px; padding: 24px 26px; }
.draw-card { margin-top: 16px; text-align: left; }
.draw-card.is-in { display: flex; align-items: center; gap: 16px; }
.draw-card .btn { margin-top: 14px; }

.draw-fields { display: grid; gap: 10px; margin: 14px 0 0; }
.field { display: grid; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--maroon); }
.field input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--paper);
  font: 400 16px var(--font-body); color: var(--brown);
}
.at { display: flex; align-items: center; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--paper); }
.at b { padding-left: 14px; font-weight: 700; color: var(--brown); opacity: 0.6; }
.at input { border: 0; padding-left: 3px; background: transparent; }
.field input:focus-visible { outline: 3px solid var(--sky); outline-offset: 0; }
.at:focus-within { outline: 3px solid var(--sky); }
.at input:focus-visible { outline: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.draw-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--paper); color: #8a1c1c; font-weight: 600; font-size: 14.5px; }
.draw-note { margin: 12px 0 0; font-size: 13px; line-height: 1.45; opacity: 0.85; }
.draw-card .link-btn { margin-top: 10px; }

/* the optional entry above "Mark as done" */
.draw-title:has(.optional) { flex-wrap: wrap; row-gap: 6px; } /* the label drops below on narrow screens rather than squashing the title */
.optional {
  padding: 4px 9px 3px; border-radius: 99px; background: var(--paper);
  font-family: var(--font-body); font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brown);
}
.draw-opt {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px;
  border-radius: 12px; background: var(--paper); font-size: 15.5px; line-height: 1.35; cursor: pointer;
}
.draw-opt input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--maroon); cursor: pointer; }
.draw-opt b { color: var(--maroon); word-break: break-all; }

.progress-tickets { display: flex; align-items: center; gap: 7px; margin: 10px 0 0; font-family: var(--font-hand); font-size: 19px; line-height: 1; color: var(--maroon); }
.progress-tickets .ico { width: 19px; height: 19px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 26px;
  border-radius: 99px; border: 0;
  font-weight: 700; font-size: 17.5px; line-height: 1.2; text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--maroon); color: var(--cream); box-shadow: 0 5px 0 var(--maroon-dark); }
.btn-primary:hover { background: #6c0a0a; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--maroon-dark); }
.btn-secondary { background: var(--paper); color: var(--maroon); border: 2px solid var(--maroon); }
.btn-block { width: 100%; }
.btn .ico { width: 21px; height: 21px; }

.link-btn {
  display: block; margin: 14px auto 0; padding: 8px 10px;
  background: none; border: 0; cursor: pointer;
  font-size: 14.5px; color: var(--brown); text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- Mark as done ---------- */
.done-area { margin-top: 28px; }
.done-area > .tracker { margin-bottom: 16px; }

/* "Day 1": check it off, with the optional prize draw entry inside the same card */
.checkoff {
  padding: 22px 20px 20px;
  border-radius: var(--radius); background: var(--paper);
  border: 2px solid var(--maroon); box-shadow: 5px 6px 0 var(--blush);
}
.checkoff-title { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 1.1; color: var(--maroon); }
.checkoff-text { margin: 8px 0 0; }
.checkoff .btn-done { margin-top: 18px; }
/* the draw part, as a ticket tucked inside the card */
.checkoff .draw-card, .done-panel .draw-card {
  margin: 18px 0 0; padding: 18px; border-radius: 16px; text-align: left;
  -webkit-mask: none; mask: none;
}
.checkoff .draw-card::after, .done-panel .draw-card::after { inset: 6px; border-radius: 11px; }
.checkoff .draw-title, .done-panel .draw-title { font-size: 24px; }
.done-panel .draw-card + .link-btn { margin-top: 12px; }

/* Today's steps: dots that fill in as steps are ticked */
.tracker {
  padding: 18px 20px;
  border-radius: var(--radius); background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tracker.is-complete { background: var(--blush); border-color: transparent; box-shadow: none; }
.tracker-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tracker-title { margin: 0; font-family: var(--font-hand); font-size: 26px; line-height: 1; color: var(--maroon); }
.tracker-count { margin: 0; font-size: 14px; font-weight: 700; white-space: nowrap; }
.tracker-dots { display: flex; flex-wrap: wrap; align-items: center; row-gap: 10px; list-style: none; margin: 0; padding: 0; }
.tracker-dots li { display: flex; align-items: center; }
.tracker-dots li + li { flex: 1; } /* the lines between dots stretch to fill the row */
.tracker-dots li + li::before { content: ""; flex: 1; min-width: 6px; margin: 0 4px; border-top: 2px dashed var(--line-strong); }
.tracker-dots li:has(.is-done) + li:has(.is-done)::before { border-top-style: solid; border-color: var(--maroon); }
.tracker-dot {
  flex: none; width: 36px; height: 36px; padding: 2px 0 0; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px dashed var(--line-strong); background: var(--cream);
  font-family: var(--font-hand); font-size: 21px; line-height: 1; color: var(--maroon);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tracker-dot .ico { display: none; width: 18px; height: 18px; }
.tracker-dot.is-done { padding: 0; border: 2px solid var(--maroon); background: var(--maroon); color: var(--butter); }
.tracker-dot.is-done .step-n { display: none; }
.tracker-dot.is-done .ico { display: block; }
.tracker-note { margin: 14px 0 0; font-family: var(--font-hand); font-size: 22px; line-height: 1.1; color: var(--maroon); }

/* every step ticked: the done button gives a little wiggle every few seconds */
.btn-done.is-ready { animation: nudge 3.2s ease-in-out 0.4s infinite; }
@keyframes nudge {
  0%, 26%, 100% { transform: none; }
  6% { transform: rotate(-2deg) scale(1.03); }
  13% { transform: rotate(2deg) scale(1.03); }
  20% { transform: rotate(-1deg) scale(1.01); }
}
.done-panel {
  text-align: center; padding: 26px 20px 18px;
  border-radius: var(--radius); background: var(--paper);
  border: 2px solid var(--maroon); box-shadow: 5px 6px 0 var(--blush);
  animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.done-badge {
  width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--maroon); color: var(--butter);
  animation: pop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.done-badge .ico { width: 30px; height: 30px; }
@keyframes pop { from { transform: scale(0.3) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.done-title { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 1.1; color: var(--maroon); }
.done-text { margin: 8px auto 18px; max-width: 34ch; }
.done-next {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0; padding: 14px 16px; border-radius: 16px;
  background: var(--blush-soft); font-weight: 600; text-align: left;
}
.done-next .ico { color: var(--maroon); }

/* ---------- Audio player ---------- */
.player {
  position: relative; overflow: hidden;
  margin-top: 24px; padding: 18px 18px 16px;
  border-radius: var(--radius);
  background: var(--maroon); color: var(--cream);
  box-shadow: 0 18px 36px -20px rgba(92, 0, 0, 0.75);
}
.player::before {
  content: ""; position: absolute; right: -60px; top: -70px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 224, 170, 0.2), transparent 68%);
  pointer-events: none;
}
.player-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 14px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--butter);
}
.player-kicker { display: inline-flex; align-items: center; gap: 8px; }
.player-kicker .ico { width: 18px; height: 18px; }
.player-length { opacity: 0.9; }
.player-row { display: flex; align-items: center; gap: 16px; position: relative; }
.play-btn {
  position: relative; flex: none;
  width: 66px; height: 66px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: var(--butter); color: var(--maroon);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.play-btn:active { transform: translateY(2px) scale(0.97); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.28); }
.play-btn .ico { width: 28px; height: 28px; grid-area: 1 / 1; }
.play-btn .i-play { transform: translateX(1px); }
.play-btn .i-pause { display: none; }
.player[data-state="playing"] .i-play { display: none; }
.player[data-state="playing"] .i-pause { display: block; }
.player.is-loading .play-btn::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--butter);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.player-body { flex: 1; min-width: 0; }
.player-title {
  margin: 0 0 6px; font-weight: 700; font-size: 16px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.player-times { display: flex; justify-content: space-between; font-size: 13px; font-variant-numeric: tabular-nums; opacity: 0.8; }

.scrub {
  --pct: 0%;
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 26px; margin: 0;
  background: transparent; cursor: pointer;
}
.scrub:disabled { cursor: default; opacity: 0.55; }
.scrub::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(to right, var(--butter) var(--pct), rgba(248, 244, 241, 0.25) var(--pct));
}
.scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin-top: -6px; border-radius: 50%;
  background: var(--butter); border: 3px solid var(--maroon); box-shadow: 0 0 0 1.5px var(--butter);
}
.scrub::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(248, 244, 241, 0.25); }
.scrub::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--butter); }
.scrub::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--butter); border: 3px solid var(--maroon); box-shadow: 0 0 0 1.5px var(--butter); }
.scrub:focus-visible { outline-offset: 0; }

.player-tools { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin-top: 14px; position: relative; }
.tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 14px; border-radius: 99px;
  border: 1px solid rgba(248, 244, 241, 0.22); background: rgba(248, 244, 241, 0.08);
  color: var(--cream); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tool:hover { background: rgba(248, 244, 241, 0.16); }
.tool .ico { width: 17px; height: 17px; }
.tool-speed { min-width: 70px; background: rgba(242, 224, 170, 0.16); color: var(--butter); border-color: rgba(242, 224, 170, 0.35); }

.player-missing { display: none; }
.player[data-state="missing"] .player-missing {
  display: block; position: relative;
  margin: 14px 0 0; padding: 10px 14px; border-radius: 12px;
  background: rgba(248, 244, 241, 0.1); font-size: 15px;
}
.player[data-state="missing"] .player-tools,
.player[data-state="missing"] .scrub,
.player[data-state="missing"] .player-times,
.player[data-state="missing"] .player-length { display: none; }
.player[data-state="missing"] .play-btn { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

/* ---------- Locked day ---------- */
.block-locked {
  margin-top: 26px; padding: 34px 20px 30px; text-align: center;
  background: var(--paper); border: 2px dashed var(--line-strong); box-shadow: none;
}
.lock-badge {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blush); color: var(--maroon); transform: rotate(-6deg);
}
.lock-badge .ico { width: 30px; height: 30px; }
.locked-when { margin: 0; font-family: var(--font-display); font-size: 25px; line-height: 1.15; color: var(--maroon); text-wrap: balance; }
.locked-soon { margin: 8px 0 14px; font-family: var(--font-hand); font-size: 25px; line-height: 1.1; }
.locked-note { margin: 0 auto; max-width: 34ch; font-size: 15.5px; }

/* ---------- Pager ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 34px; }
.pager-link {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line);
  color: var(--brown); text-decoration: none;
  transition: border-color 0.2s;
}
.pager-link:hover { border-color: var(--line-strong); }
.pager-next { grid-column: 2; align-items: flex-end; text-align: right; }
.pager-dir { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; opacity: 0.85; }
.pager-dir .ico { width: 16px; height: 16px; }
.pager-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--maroon); }
.pager-title .ico { width: 15px; height: 15px; opacity: 0.7; }

/* ---------- Start page ---------- */

/* Scalloped "stamp" edge, from the This Social Cottage shapes.
   Add class="scallop" and set --scallop-bg for the fill colour. */
.scallop { position: relative; isolation: isolate; }
.scallop::before {
  --r: 7px;
  content: ""; position: absolute; inset: 0; z-index: -1;
  padding: var(--r);
  background: var(--scallop-bg, var(--cream));
  -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(farthest-side, #000 97%, #0000) 0 0 / calc(2 * var(--r)) calc(2 * var(--r)) round;
          mask: linear-gradient(#000 0 0) content-box, radial-gradient(farthest-side, #000 97%, #0000) 0 0 / calc(2 * var(--r)) calc(2 * var(--r)) round;
}

/* Hero band: runs the full width of the page area (right up to the sidebar on desktop),
   while its contents stay lined up with the column below */
.start-hero {
  --bleed: calc((100cqw - var(--sidebar-w) - 100%) / 2);
  position: relative;
  margin: 12px calc(-1 * var(--bleed)) 0;
  padding: 26px var(--bleed) 34px;
  background-color: var(--maroon);
  background-image:
    linear-gradient(90deg, rgba(248, 244, 241, 0.028) 50%, transparent 0),
    linear-gradient(rgba(248, 244, 241, 0.028) 50%, transparent 0);
  background-size: 34px 34px;
  color: var(--cream);
}
/* a row of circles hanging off the bottom, like the brand's dotted borders */
.start-hero::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 15px;
  background: radial-gradient(circle at 50% 0, var(--maroon) 14px, transparent 14.5px) 0 0 / 28px 15px;
  background-repeat: round no-repeat;
}
.hero-flower {
  position: absolute; z-index: 1; top: -16px; right: 2px;
  width: 116px; height: auto;
  transform: rotate(14deg);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}
.start-hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 22px; }

.cal-tile { width: 98px; transform: rotate(-5deg); filter: drop-shadow(4px 5px 0 rgba(0, 0, 0, 0.28)); }
.cal-card {
  --scallop-bg: var(--cream);
  display: flex; flex-direction: column; align-items: center;
  padding: 15px 8px 13px; color: var(--maroon);
}
.cal-top, .cal-bottom { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.2; }
.cal-num { font-family: var(--font-display); font-size: 46px; line-height: 1; margin: 3px 0 2px; }

.start-eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--butter); }
.start-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(42px, 12vw, 68px); line-height: 0.98;
  color: var(--cream);
  text-wrap: balance;
}
.start-title em {
  display: block; width: fit-content; margin-bottom: 10px;
  font-family: var(--font-hand); font-style: normal; font-size: 0.5em; line-height: 1;
  color: var(--butter);
  transform: rotate(-3deg);
}
.start-lede { margin: 18px 0 0; max-width: 34ch; font-size: 18px; line-height: 1.5; color: rgba(248, 244, 241, 0.92); }
.start-action { margin-top: 24px; }

.btn-butter { background: var(--butter); color: var(--maroon); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.32); }
.btn-butter:hover { background: #f6e8bd; }
.btn-butter:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.32); }

.countdown { display: flex; align-items: center; gap: 16px; }
.countdown-num {
  --scallop-bg: var(--butter);
  flex: none; width: 76px; height: 76px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 36px; line-height: 1; color: var(--maroon);
  transform: rotate(6deg);
}
.countdown-text { display: flex; flex-direction: column; gap: 2px; }
.countdown-text strong { font-family: var(--font-hand); font-weight: 400; font-size: 27px; line-height: 1.05; color: var(--butter); }
.countdown-text span { font-size: 15px; line-height: 1.4; color: rgba(248, 244, 241, 0.92); }

.hero-finish { display: flex; align-items: center; gap: 14px; }
.finish-icon { width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--butter); color: var(--maroon); transform: rotate(-8deg); }
.finish-icon .ico { width: 27px; height: 27px; }
.finish-title { display: block; font-family: var(--font-hand); font-size: 30px; line-height: 1.05; color: var(--butter); }
.finish-text { display: block; font-size: 15.5px; color: rgba(248, 244, 241, 0.92); }

/* Welcome note, with a strip of blue gingham across the top */
.letter {
  margin-top: 46px; overflow: hidden;
  border-radius: var(--radius); background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.letter-strip {
  height: 24px;
  background-color: #dfeaff;
  background-image:
    linear-gradient(90deg, rgba(135, 184, 255, 0.5) 50%, transparent 0),
    linear-gradient(rgba(135, 184, 255, 0.5) 50%, transparent 0);
  background-size: 16px 16px;
}
.letter-body { padding: 20px 20px 22px; }
.letter .prose-intro { margin-top: 0; font-size: 17.5px; }
.letter .prose strong { color: var(--maroon); }

/* your photo, in a scalloped frame like the stamps */
.letter-photo { margin: 2px 0 20px; transform: rotate(-1.5deg); filter: drop-shadow(3px 5px 0 rgba(92, 0, 0, 0.13)); }
.letter-photo-frame {
  --r: 10px;
  display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--blush);
  -webkit-mask:
    radial-gradient(farthest-side, #000 97%, #0000) 0 0 / calc(2 * var(--r)) calc(2 * var(--r)) round,
    linear-gradient(#000 0 0) var(--r) var(--r) / calc(100% - 2 * var(--r)) calc(100% - 2 * var(--r)) no-repeat;
          mask:
    radial-gradient(farthest-side, #000 97%, #0000) 0 0 / calc(2 * var(--r)) calc(2 * var(--r)) round,
    linear-gradient(#000 0 0) var(--r) var(--r) / calc(100% - 2 * var(--r)) calc(100% - 2 * var(--r)) no-repeat;
}
.letter-photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 56% 36%; }

.letter-heading {
  margin: 0 0 14px;
  font-family: var(--font-display); font-weight: 400;
  font-size: 27px; line-height: 1.15; color: var(--maroon);
  text-wrap: balance;
}
.prose .hand-line {
  width: fit-content; margin: 2px 0 14px;
  font-family: var(--font-hand); font-size: clamp(24px, 7.4vw, 31px); line-height: 1.1; color: var(--maroon);
  transform: rotate(-2deg); transform-origin: left center;
}
.signature {
  display: flex; align-items: center; gap: 6px; width: fit-content;
  margin: 16px 0 0; font-family: var(--font-hand); font-size: 30px; line-height: 1; color: var(--maroon);
  transform: rotate(-2deg);
}
.signature .ico { width: 16px; height: 16px; color: var(--sky); }

/* The four days, as scalloped stamps on pink gingham */
.days-panel {
  position: relative; margin-top: 30px; padding: 22px 14px 20px;
  border-radius: 26px;
  background-color: #f8e6e9;
  background-image:
    linear-gradient(90deg, rgba(226, 158, 172, 0.3) 50%, transparent 0),
    linear-gradient(rgba(226, 158, 172, 0.3) 50%, transparent 0);
  background-size: 24px 24px;
}
.panel-flower {
  position: absolute; z-index: 2; top: -28px; right: 8px;
  width: 78px; height: auto; transform: rotate(-14deg);
  filter: drop-shadow(0 6px 8px rgba(92, 0, 0, 0.22));
  pointer-events: none;
}
.panel-label {
  display: inline-block; margin: 0 0 18px 4px; padding: 9px 16px 7px;
  border-radius: 12px; background: var(--paper);
  font-family: var(--font-hand); font-weight: 400; font-size: 27px; line-height: 1; color: var(--maroon);
  transform: rotate(-2deg); box-shadow: 2px 3px 0 rgba(92, 0, 0, 0.12);
}
.stamp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.stamp-grid li { display: flex; }
.stamp {
  position: relative; flex: 1; display: flex;
  color: var(--brown); text-decoration: none;
  filter: drop-shadow(2px 4px 0 rgba(92, 0, 0, 0.13));
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.stamp-grid li:nth-child(odd) .stamp { transform: rotate(-1.5deg); }
.stamp-grid li:nth-child(even) .stamp { transform: rotate(1.3deg); }
.stamp-grid li .stamp:hover { transform: translateY(-3px) rotate(0deg); }
.stamp-card {
  --scallop-bg: var(--paper);
  flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 18px 12px 18px;
}
.stamp-top { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.stamp-num { font-family: var(--font-display); font-size: 46px; line-height: 1; margin: 2px 0; color: var(--maroon); }
.stamp-date { font-size: 12.5px; font-weight: 600; opacity: 0.85; }
.stamp-title { margin: 10px 0 14px; font-weight: 700; font-size: 14.5px; line-height: 1.3; color: var(--maroon); }
.stamp-status {
  margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 5px 10px; border-radius: 99px;
  background: var(--blush); color: var(--maroon);
  font-size: 12px; font-weight: 700; line-height: 1.25;
}
.stamp-status .ico { width: 13px; height: 13px; }
.stamp.is-done .stamp-card { --scallop-bg: var(--maroon); color: var(--cream); }
.stamp.is-done .stamp-num { color: var(--butter); }
.stamp.is-done .stamp-title { color: var(--cream); }
.stamp.is-done .stamp-status { background: var(--butter); }
.stamp.is-locked .stamp-card { --scallop-bg: #fbf4f0; }
.stamp.is-locked .stamp-num { opacity: 0.55; }
.stamp.is-locked .stamp-status { background: transparent; border: 1.5px dashed var(--line-strong); color: var(--brown); }
.stamp-badge {
  position: absolute; top: -9px; right: -7px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--butter); color: var(--maroon); transform: rotate(10deg);
}
.stamp-badge .ico { width: 17px; height: 17px; }

/* Lists in the extra sections get numbered stickers */
.start-section { margin-top: 22px; }
.prose-stickers ul, .prose-stickers ol { list-style: none; padding: 0; counter-reset: sticker; }
.prose-stickers li { position: relative; min-height: 34px; margin: 0 0 12px; padding: 3px 0 0 46px; counter-increment: sticker; }
.prose-stickers li::before {
  content: counter(sticker);
  position: absolute; left: 0; top: 0; width: 33px; height: 33px; border-radius: 50%;
  display: grid; place-items: center; padding-top: 2px;
  font-family: var(--font-hand); font-size: 20px; line-height: 1; color: var(--maroon);
  background: var(--sky); transform: rotate(-6deg);
}
.prose-stickers li:nth-child(3n+2)::before { background: var(--blush); transform: rotate(5deg); }
.prose-stickers li:nth-child(3n+3)::before { background: var(--butter); transform: rotate(-3deg); }

/* ---------- What now page ---------- */
.next-hero { padding-bottom: 38px; }
.next-intro { max-width: 40ch; }
.next-intro p { margin: 0 0 0.6em; }
.next-intro p:last-child { margin-bottom: 0; }
.hero-finish-btn { margin-top: 18px; }

.video-wrap { position: relative; margin-top: 26px; }
.video-wrap.is-portrait { max-width: 300px; margin-left: auto; margin-right: auto; }
.video {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border-radius: 18px; border: 5px solid var(--cream);
  background-color: #f8e6e9;
  background-image:
    linear-gradient(90deg, rgba(226, 158, 172, 0.3) 50%, transparent 0),
    linear-gradient(rgba(226, 158, 172, 0.3) 50%, transparent 0);
  background-size: 24px 24px;
  background-position: center;
  box-shadow: 0 20px 34px -18px rgba(0, 0, 0, 0.7);
}
.is-portrait .video { aspect-ratio: 9 / 16; }
.video.has-poster { background-size: cover; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video-facade {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 0; background: transparent; color: var(--maroon); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.has-poster .video-facade { justify-content: flex-end; padding-bottom: 18px; background: linear-gradient(to top, rgba(61, 0, 0, 0.6), transparent 60%); color: var(--cream); }
.video-play {
  width: 78px; height: 78px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--maroon); color: var(--butter);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.has-poster .video-play { background: var(--butter); color: var(--maroon); }
.video-facade:hover .video-play { transform: scale(1.07); }
.video-play .ico { width: 32px; height: 32px; transform: translateX(2px); }
.video-caption { font-family: var(--font-hand); font-size: 26px; line-height: 1; }
.video-facade.is-empty { cursor: default; }
.video-facade.is-empty .video-play { opacity: 0.4; }
.video-flower {
  position: absolute; z-index: 2; top: -38px; right: -10px;
  width: 96px; height: auto; transform: rotate(16deg);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
  pointer-events: none; transition: opacity 0.3s;
}
.video-wrap.is-playing .video-flower { opacity: 0; }

.view-next > .player { margin-top: 44px; }
.view-next > .player + .next-body { margin-top: 30px; }
.next-body { margin-top: 46px; }
.view-next .next-body + .next-cta { margin-top: 26px; }
.next-cta { margin-top: 46px; text-align: center; }
.next-flowers { position: relative; z-index: 0; display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto -22px; }
.next-cta .btn { position: relative; z-index: 1; }
.next-cta-note { margin: 14px 0 0; font-size: 14.5px; }
.next-locked { margin-top: 46px; }

/* What now: the Bonus box, and "Got a question?" with the DM button */
.next-extra { margin-top: 22px; }
.next-bonus { background: var(--butter); border: 2px dashed rgba(92, 0, 0, 0.3); box-shadow: none; }
.next-bonus .block-label .ico { color: var(--maroon); transform: rotate(-8deg); }
.next-bonus .prose { font-size: 17.5px; }

/* The Plotting Shed button written into Notion, with "Peep and join ↓" above it */
.prose .next-lead { margin: 1.4em 0 0; text-align: center; font-family: var(--font-hand); font-size: 26px; line-height: 1.1; color: var(--maroon); }
.prose .next-btn-row { margin: 4px 0 1.2em; text-align: center; }
.next-btn-row .next-flowers { margin-bottom: -22px; }
.prose .next-btn { color: var(--cream); text-decoration: none; }

/* "Drop me a question here" */
.ask-form { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--sky-soft); }
.ask-form textarea {
  display: block; width: 100%; min-height: 84px; padding: 12px 14px; resize: vertical;
  border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--paper);
  font: 400 16px/1.45 var(--font-body); color: var(--brown);
}
.ask-form textarea:focus-visible { outline: 3px solid var(--sky); outline-offset: 0; }
.ask-form:not(.is-open) .ask-more { display: none; }
.ask-form .btn { margin-top: 14px; }
.ask-form .btn-secondary:hover { background: var(--maroon); color: var(--cream); }
.ask-form .btn[disabled] { opacity: 0.7; cursor: default; }
.ask-thanks { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 600; color: var(--maroon); }
.ask-thanks .ico { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--maroon); color: var(--butter); }
.ask-form.is-sent .link-btn { margin-top: 8px; }

/* Instagram posts from Notion: a tab for each, one post showing at a time */
.ig-examples { margin: 1em 0; }
.ig-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ig-tab {
  min-height: 40px; padding: 8px 14px; border-radius: 99px;
  border: 2px solid var(--maroon); background: var(--paper); color: var(--maroon);
  font: 700 14.5px/1.2 var(--font-body); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ig-tab[aria-selected="true"] { background: var(--maroon); color: var(--cream); }
.ig-frame { max-width: 400px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: 0 6px 18px rgba(92, 0, 0, 0.12); }
.ig-frame iframe { display: block; width: 100%; height: 560px; border: 0; }
.ig-post { display: block; margin: 6px 0; font-weight: 700; }

.device-note {

  display: flex; align-items: flex-start; gap: 10px;
  margin: 26px 0 0; padding: 14px 16px; border-radius: 16px;
  background: var(--cream-deep); font-size: 14.5px; line-height: 1.5;
}
.device-note .ico, .sidebar-note .ico { width: 19px; height: 19px; margin-top: 1px; color: var(--maroon); }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; font-size: 14px; }
.footer p { margin: 0; }

/* ---------- Preview bar (only shows with ?preview or ?now=) ---------- */
.preview-bar {
  position: fixed; z-index: 50; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 24px); padding: 9px 16px; border-radius: 99px;
  background: var(--brown); color: var(--cream); font-size: 13.5px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 24px -8px rgba(61, 0, 0, 0.5);
}
.preview-bar .ico { width: 17px; height: 17px; color: var(--butter); }
.preview-bar a { color: var(--butter); margin-left: 4px; }

/* ---------- Confetti ---------- */
.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 200; pointer-events: none; }
.nav-item.just-done .nav-check { animation: tick-pop 0.7s cubic-bezier(0.2, 1.8, 0.4, 1) both; }
@keyframes tick-pop {
  0% { transform: scale(0.2) rotate(-40deg); }
  60% { transform: scale(1.35) rotate(8deg); }
  100% { transform: none; }
}
.confetti { position: fixed; z-index: 100; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; }

/* ==========================================================================
   Bigger phones and small tablets
   ========================================================================== */
@media (min-width: 600px) {
  :root { --gutter: 28px; }
  .block { padding: 24px 26px 26px; }
  .player { padding: 22px 24px 20px; }

  /* the hero becomes a card with rounded top corners */
  .start-hero { padding-top: 36px; padding-bottom: 40px; }
  .start-hero-inner { flex-direction: row; align-items: flex-start; gap: 30px; }
  .cal-tile { width: 118px; flex: none; margin-top: 6px; }
  .cal-num { font-size: 56px; }
  .hero-flower { top: -30px; right: calc(12px - var(--bleed)); width: 150px; }
  .start-hero-text { padding-right: max(60px, calc(172px - var(--bleed))); }
  .days-panel { padding: 26px 22px 24px; }
  .panel-flower { width: 96px; top: -36px; right: -14px; }
  .letter-body { padding: 24px 28px 26px; }
  /* photo beside the words on bigger screens */
  .letter-body.has-photo { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 30px; align-items: start; }
  .letter-photo { margin: 6px 0 0; }
  .letter-photo-frame { --r: 11px; aspect-ratio: 4 / 5; }
  .letter-heading { font-size: 30px; }
  .video-flower { width: 130px; top: -54px; right: -34px; }
}

/* four stamps across whenever the panel itself has room */
.days-panel { container-type: inline-size; }
@container (min-width: 620px) {
  .stamp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   Desktop: the tiles become a proper sidebar
   ========================================================================== */
@media (min-width: 960px) {
  .m-only { display: none; }
  .d-only { display: inline; }

  .app { --sidebar-w: 330px; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); align-items: start; }

  .sidebar {
    position: sticky; top: 0;
    height: 100vh; height: 100dvh; overflow-y: auto;
    display: flex; flex-direction: column;
    padding: 36px 24px 28px;
    background: var(--cream-deep); border-right: 1px solid var(--line);
  }
  .brand-mark { width: 48px; height: 48px; }
  .brand-name { font-size: 26px; white-space: nowrap; }

  .progress { margin-top: 28px; padding: 16px 16px 18px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }

  .nav { margin-top: 22px; }
  .nav-list { grid-auto-flow: row; grid-template-columns: 1fr; gap: 4px; }
  .nav-list li:has(.is-next) { margin-top: 10px; padding-top: 12px; border-top: 1.5px dashed var(--line-strong); }
  .nav-item {
    flex-direction: row; align-items: center; justify-content: flex-start; gap: 13px;
    min-height: 0; padding: 12px 14px; text-align: left;
    background: transparent; border-color: transparent;
  }
  .nav-item:hover { background: var(--paper); }
  .nav-item.is-locked { border-color: transparent; }
  .nav-item.is-locked:hover { border-color: var(--line-strong); }
  .nav-item:active { transform: none; }
  .nav-top { flex-direction: row; align-items: baseline; gap: 0; flex-wrap: wrap; }
  .nav-label { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brown); }
  .nav-item.is-start .nav-label,
  .nav-item.is-next .nav-label { font-size: 15.5px; letter-spacing: 0; text-transform: none; color: var(--maroon); }
  .nav-item.is-next:not(.is-locked) { background: #faf0d2; border-color: transparent; }
  .nav-item.is-next:not(.is-locked):not([aria-current]):hover { background: #f8eac2; }
  .nav-meta { font-size: 12.5px; }
  .nav-meta::before { content: "·"; margin: 0 6px; }
  .nav-title {
    display: block; margin-top: 1px;
    font-weight: 700; font-size: 15.5px; line-height: 1.3; color: var(--maroon);
  }
  .nav-item[aria-current="page"] .nav-label,
  .nav-item[aria-current="page"] .nav-title { color: var(--cream); }
  .nav-item[aria-current="page"] .nav-label { opacity: 0.85; }

  .sidebar-note {
    display: flex; align-items: flex-start; gap: 10px;
    margin: auto 0 0; padding-top: 24px;
    font-size: 13.5px; line-height: 1.5; opacity: 0.9;
  }

  .main { margin: 0 auto; max-width: 800px; padding: 40px 56px 80px; }
  .hero { padding-top: 24px; }
  .device-note { display: none; }
  .next-cta .btn-block { width: auto; min-width: 380px; }
  .start-hero { margin-top: -40px; padding-top: 56px; padding-bottom: 52px; }
  .start-hero-text { padding-right: max(80px, calc(190px - var(--bleed))); }
  .hero-flower { top: -30px; right: calc(16px - var(--bleed)); width: 168px; }
}

@media (max-width: 359px) {
  .nav-list { gap: 4px; }
  .nav-item { padding-left: 0; padding-right: 0; border-radius: 13px; }
  .nav-label { font-size: 12.5px; }
  .nav-meta { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
