:root {
 --cream:#f3e3c8; --green:#293e2a; --red:#811e19; --gold:#b58a3d; --text:#443728;
}
*{box-sizing:border-box}
body{margin:0;background:#c9b591;color:var(--text);font-family:"Source Sans 3",Arial,sans-serif}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit}
button:focus-visible,a:focus-visible{outline:2px solid var(--red);outline-offset:5px}
.page{position:relative;isolation:isolate;overflow:hidden;max-width:1080px;margin:18px auto;background:var(--cream) url("assets/processed/paper-tile.png") repeat;background-size:360px 124px;box-shadow:0 6px 24px #44321e50,inset 0 0 55px #a37a3c55;border:1px solid #d3b27e;border-radius:8px 15px 20px 11px}
.page:before{content:"";position:absolute;inset:10px;border:1px solid #b78e4c50;pointer-events:none;z-index:-1}
.decor{position:absolute;pointer-events:none;object-fit:contain}
.corner-bell{width:37%;left:-20px;top:-9px;z-index:2}
.corner-lantern{width:35%;right:-12px;top:-12px;z-index:2}
.header{position:relative;text-align:center;padding:24px 0 19px;margin:0 23%;border-bottom:1px solid #ac803e70;z-index:3}
.logo{font:38px/1.1 "Great Vibes",Georgia,cursive;color:#253524;text-decoration:none;white-space:nowrap}
.header-note{font-size:10px;letter-spacing:1.6px;margin:8px 0 0}
.hero{position:relative;text-align:center;padding:38px 20px 26px;min-height:340px}
.eyebrow{font-size:11px;letter-spacing:2.5px;font-weight:600;color:var(--red);margin:0}
h1,h2{font-family:"Playfair Display",Georgia,serif;color:var(--green);font-weight:500}
h1{font-size:66px;line-height:1.04;margin:18px 0 22px;position:relative;z-index:1}
h1 span{font-size:61px;font-style:italic;color:var(--red)}
.hero-description{font-size:16px;line-height:1.55;position:relative;z-index:1;margin:0}
.hero-instruction{font:italic 17px/1.5 Georgia,serif;margin:15px 0 0}
.hero-divider{color:var(--gold);font-size:18px;margin-top:18px;letter-spacing:4px}
.winter-house{width:29%;left:-10px;bottom:0;z-index:-1}
.winter-sleigh{width:26%;right:0;bottom:0;z-index:-1}
.hero-star{position:absolute;font:48px Georgia;color:var(--gold)}
.star-one{top:64px;left:28%}.star-two{top:55px;right:27%}
.calendar-section,.task-section{position:relative;width:76%;margin:0 auto}
.calendar-section{padding:10px 0 26px}
.section-heading{display:flex;justify-content:space-between;align-items:end;margin:0 6px 16px}
.section-heading h2{font-size:32px;margin:3px 0 0}.section-heading h2 span{color:#667044;font-size:43px;vertical-align:middle}
.progress-label{display:flex;flex-direction:column;text-align:center;min-width:85px}
#progress-count{font:600 19px Georgia;color:var(--green)}
.progress-caption{font-size:12px}
.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px 13px;align-items:center}
.day{position:relative;display:block;width:100%;height:90px;padding:0;border:0;background:transparent;cursor:pointer;transition:transform .25s ease,filter .25s ease;color:#382615}
.day img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 2px #654a2425);pointer-events:none}
.day-number{position:absolute;top:24%;left:0;right:0;text-align:center;font:20px/1 Georgia,serif;pointer-events:none}
.day.envelope-green-open .day-number{top:29%}
.day.envelope-red .day-number{top:23%}
.day.gift-red .day-number{top:66%;left:48%;right:22%;font-size:17px;transform:rotate(-17deg)}
.day.gift-cream .day-number{top:60%;left:34%;right:33%;font-size:18px}
.day.gift-green .day-number{top:66%;left:58%;right:7%;font-size:17px;background:#f2dfb6;padding:3px 0;transform:rotate(-11deg);box-shadow:0 1px 2px #42301c44}
.day:not(:disabled):hover{transform:translateY(-5px) rotate(-2deg)}
.day:disabled{cursor:default;filter:saturate(.75);opacity:.84}
.day.finale img{filter:drop-shadow(0 2px 4px #a77a31aa)}
.calendar-note{text-align:center;font:italic 13px Georgia;color:#756247;margin:20px 0 0}
.task-section{margin:8px auto 0;scroll-margin-top:24px}
.task-card{position:relative;min-height:330px;padding:28px 42px 25px;text-align:center;background:#f6e8ce url("assets/processed/paper-tile.png");border:1px solid #c8a265;box-shadow:2px 8px 7px #66503035,inset 0 0 28px #c18b3b25;border-radius:3px 12px 4px 9px;outline:5px solid #fbefd6}
.task-card:before{content:"";position:absolute;inset:13px;border:1px solid #bd8c3d;pointer-events:none;border-radius:22px 4px 22px 4px}
.heart-sprig{display:block;width:245px;max-width:60%;height:65px;object-fit:contain;margin:15px auto 13px}
.task-card h2{font-size:28px;line-height:1.3;margin:10px 0}
#task-description{font-size:17px;line-height:1.5;max-width:560px;margin:12px auto}
.task-footer{font:italic 13px Georgia;color:#846a48;margin:18px 0 0}
.paper-corner{position:absolute;font:42px Georgia;color:#b78435;z-index:7;pointer-events:none}
.top-left{top:9px;left:15px}.top-right{top:9px;right:15px;transform:scaleX(-1)}
.bottom-left{bottom:7px;left:15px;transform:scaleY(-1)}.bottom-right{bottom:7px;right:15px;transform:scale(-1)}
.complete-btn{border:0;background:#d1c9a1;color:#38452d;padding:9px 23px;margin:9px auto 0;cursor:pointer;font:17px Georgia;clip-path:polygon(3% 3%,96% 0,100% 20%,98% 90%,93% 100%,4% 96%,0 74%,2% 20%)}
.complete-btn:disabled{cursor:default}
.scratch-layer{position:absolute;inset:58px 25px 35px;z-index:5;overflow:hidden;border-radius:44% 5% 7% 4% / 3% 5% 4% 7%;cursor:crosshair;touch-action:none;transition:opacity .5s}
.scratch-layer canvas{display:block;width:100%;height:100%;touch-action:none}
.scratch-hint{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;pointer-events:none;text-align:center;color:#684b25;text-shadow:0 1px #fff5d5}
.scratch-hint p{font:italic 22px Georgia;margin:0 15px}.scratch-hint strong{font-size:11px;text-transform:uppercase;letter-spacing:2px}
.scratch-star{font-size:42px}.scratch-coin{border:2px solid #8e682f;border-radius:50%;width:32px;height:32px;display:grid;place-items:center}
.scratch-layer.revealed{opacity:0;pointer-events:none}
.scratch-layer.scratching .scratch-hint{opacity:0;transition:opacity .25s}
.reveal-button{display:block;border:0;border-bottom:1px solid #a48a61;background:none;color:#746044;margin:17px auto 0;font-size:12px;cursor:pointer;padding:4px}
.reveal-button[hidden]{display:none}
.footer{position:relative;text-align:center;padding:42px 20px 28px;min-height:180px}
.cocoa{width:28%;left:-15px;bottom:-7px}
.ribbon-right{width:26%;right:-92px;bottom:155px;transform:rotate(-52deg);transform-origin:center}
.donate-link{position:relative;z-index:1;max-width:90%;padding:14px 28px;background:#84271f;color:#fff0d4;border:1px solid #b18b52;outline:3px solid #f8eaca;box-shadow:0 4px 6px #65492c40;font:17px Georgia;cursor:pointer;border-radius:3px 12px 4px 10px}
#donate-note{position:relative;z-index:1;font-size:14px}
.footer-credit{font-size:10px;letter-spacing:1.4px;margin:0 0 8px}
.footer-year{font-size:10px;color:#846c4d;margin:0}
body[data-decor-stage="3"] .hero-star,body[data-decor-stage="4"] .hero-star,body[data-decor-stage="5"] .hero-star{filter:drop-shadow(0 0 5px #c29a4a)}
body[data-decor-stage="5"] .page{box-shadow:0 6px 24px #44321e50,inset 0 0 65px #b58a3d66}
@media(min-width:1500px){.page{margin:26px auto}}
@media(max-width:700px){
 .page{margin:0;border-radius:0;border:0}
 .header{margin:0 17%;padding:25px 0 16px}
 .logo{font-size:29px}.header-note{font-size:8px;letter-spacing:.8px}
 .corner-bell{width:38%;left:-30px;top:-5px}.corner-lantern{width:35%;right:-22px}
 .hero{padding:48px 16px 27px;min-height:380px}
 h1{font-size:51px;margin:17px 0 20px}h1 span{font-size:43px}
 .hero-description{font-size:15px;max-width:340px;margin:auto}.desktop-break{display:none}
 .hero-instruction{font-size:14px;margin-top:16px}
 .winter-house{width:35%;bottom:0;opacity:.85}.winter-sleigh{width:30%;bottom:0;opacity:.85}
 .hero-star{font-size:30px}.star-one{left:10%;top:70px}.star-two{right:10%;top:58px}
 .calendar-section,.task-section{width:88%}
 .section-heading h2{font-size:27px}.section-heading h2 span{font-size:32px}
 .eyebrow{font-size:9px;letter-spacing:1.9px}
 .calendar{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px 10px}
 .day{height:85px}.day-number{font-size:19px}
 .calendar-note{font-size:12px;line-height:1.5}
 .task-card{padding:28px 20px;min-height:350px}
 .task-card h2{font-size:24px}#task-description{font-size:16px}
 .heart-sprig{max-width:80%;margin:17px auto}
 .scratch-layer{inset:53px 18px 34px}
 .scratch-hint p{font-size:19px}
 .footer{padding:38px 12px 110px;min-height:250px}
 .cocoa{width:37%;left:-18px;bottom:-13px}
 .ribbon-right{width:40%;right:-65px;bottom:180px}
 .donate-link{font-size:14px;padding:13px 18px}
 .footer-credit{font-size:8px;letter-spacing:.9px}
}
@media(max-width:360px){.logo{font-size:25px}h1 span{font-size:37px}.day{height:73px}.calendar{gap:6px}.calendar-section,.task-section{width:90%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Keep the handwritten masthead inside the paper when web fonts are unavailable. */
.logo{display:block;max-width:100%;font-size:clamp(23px,3.5vw,38px);white-space:normal}
@media(max-width:700px){.logo{font-size:clamp(21px,5.3vw,29px)}.header{margin:0 20%}.hero-instruction{max-width:260px;margin-left:auto;margin-right:auto}}

body {
 background: radial-gradient(ellipse at 48% 12%, #faf4e9, #eadbc5 100%);
}
.page {
 background-image: radial-gradient(ellipse at 10% 12%, #af74312b, transparent 37%),
   radial-gradient(ellipse at 95% 73%, #b8844725, transparent 40%),
   linear-gradient(#f7e9d4db, #f3e2c7d9), url("assets/processed/paper-tile.png");
 background-size: auto, auto, auto, 360px 124px;
}
.calendar { grid-template-columns: repeat(14,minmax(0,1fr)); column-gap: 6px }
.day { grid-column: span 2; width: min(100%, 112px); justify-self: center }
.day:nth-child(29) { grid-column: 5 / span 2 }
.day-art { position: relative; display: block; height: 100%; margin: auto }
.day img { display: block }
.day-number { top: 24%; font-weight: 600 }
.day.envelope-green-open .day-number { top: 27% }
.day.envelope-red .day-number { top: 17% }
.day.gift-cream .day-number { top: 62% }
.day.gift-green .day-number { top: 64%; left: 60%; right: 12% }
.day.gift-red .day-number { top: 62%; left: 55%; right: 22%; font-size: 15px; transform: rotate(-15deg); color: #611f16; text-shadow: 0 0 3px #fff3da, 0 0 3px #fff3da }
.day.gift-final { transform: scale(1.13) }
.day.gift-final:not(:disabled):hover { transform: translateY(-4px) scale(1.13) }
.day.gift-final .day-number { top: 17%; left: 55%; right: 27%; font-size: 15px; transform: rotate(17deg) }
.day:disabled { filter: saturate(.83); opacity: .8 }
.winter-house { width: 27%; bottom: 5px }
.winter-sleigh { width: 24%; bottom: 4px }
.task-card {
 background: radial-gradient(ellipse at 8% 95%, #d7ad6950, transparent 36%),
   linear-gradient(#fff6e6db,#fff2dddf), url("assets/processed/paper-tile.png");
 outline: 0;
 border-color: #dfc59c;
 border-radius: 4px 17px 7px 12px / 8px 9px 15px 7px;
 box-shadow: 0 1px 2px #79552c38, 2px 6px 9px #65492d33, 3px 13px 22px #65492d25, inset 0 0 22px #ba945229;
}
@media(max-width:700px) {
 .calendar { grid-template-columns: repeat(8,minmax(0,1fr)); column-gap: 4px }
 .day:nth-child(29) { grid-column: 2 / span 2 }
 .day { height: clamp(61px,19vw,85px) }
 .winter-house { width: 31%; bottom: 0 }
 .winter-sleigh { width: 28%; bottom: 0 }
 .hero-instruction { max-width: 62%; position: relative }
}
@media(max-width:400px) {
 .day-number { font-size: 16px }
 .day.gift-cream .day-number,.day.gift-green .day-number,.day.gift-red .day-number,.day.gift-final .day-number { font-size: 13px }
}

body {
 background-image: radial-gradient(ellipse at 48% 12%, #faf4e9f2, #eadbc5ed 100%),
   url("assets/processed/paper-tile.png");
}
@media(max-width:700px) {
 .corner-bell { width: 31%; left: -24px }
 .corner-lantern { width: 29%; right: -19px }
 .header { margin-inline: 23% }
 .logo { font-size: clamp(18px,4.7vw,27px) }
}

.hero { min-height: 0 }
.day-art {
 display: block;
 position: relative;
 width: min(100%, 112px);
 aspect-ratio: 1;
 height: auto;
 margin: auto;
 transform: translate(var(--art-x), var(--art-y)) scale(var(--art-scale));
}
.day-art .day-number {
 top: var(--number-y);
 left: var(--number-x);
 right: auto;
 transform: translate(-50%, -50%);
 font-size: clamp(14px, 2.2vw, 19px);
 text-shadow: 0 0 3px #fff0d4, 0 0 2px #fff0d4;
}
@media (max-width: 700px) {
 .hero { padding-bottom: 20px }
}

/* Compact masthead and shared width for the calendar and task postcard. */
.page {
 border-radius: 4px 7px 9px 5px;
 box-shadow: 0 3px 12px #44321e28, inset 0 0 55px #a37a3c55;
}
body[data-decor-stage="5"] .page {
 box-shadow: 0 3px 12px #44321e28, inset 0 0 65px #b58a3d66;
}
.corner-bell { width: 29% }
.corner-lantern { width: 27% }
.header { padding-block: 16px 12px }
.hero { padding-block: 24px 17px }
.hero-divider { margin-top: 12px }
.hero-instruction { margin-top: 10px }
.calendar-section, .task-section { width: 88% }
.calendar { row-gap: 4px }
.day {
 --art-enlargement: 1.3;
 display: grid;
 place-items: center;
 height: clamp(72px, 9.2vw, 101px);
}
.day-art {
 transform: scale(var(--art-enlargement)) translate(var(--art-x), var(--art-y)) scale(var(--art-scale));
}
.day-art .day-number { font-size: clamp(11px, 1.7vw, 15px) }
@media (max-width: 700px) {
 .page { border-radius: 0 }
 .corner-bell { width: 24% }
 .corner-lantern { width: 22.5% }
 .header { padding-block: 17px 11px }
 .hero { padding-block: 27px 15px }
 .calendar-section, .task-section { width: 94% }
 .day {
  --art-enlargement: 1.22;
  height: clamp(58px, 19.5vw, 98px);
 }
}

/* The calendar artwork shares the original canvas proportions. */
.day:disabled { filter: saturate(.83); opacity: .65 }
.day-art {
 aspect-ratio: 460 / 410;
 transform: scale(var(--art-scale, 1.08)) translate(var(--art-x, 0), var(--art-y, 0));
}
.day-art img { object-fit: contain }
.day-art .day-number { top: var(--number-y, 31%); left: var(--number-x, 50%) }
.day-art.gift-1 { --art-y: -.5% }
.day-art.gift-2 { --art-y: -3%; --number-y: 33% }
.day-art.gift-4 { --art-y: -3%; --number-y: 34% }
.day-art.gift-5 { --art-scale: 1.05 }
.day-art.gift-3 { --art-scale: 1.03; --number-x: 65%; --number-y: 76% }
.day-art.gift-6 { --art-scale: 1; --number-x: 62%; --number-y: 66% }
.day-art.gift { --art-scale: 1.03; --art-x: 2%; --number-y: 38% }
.day-art.gift-7 { --art-scale: 1.06; --art-x: -1%; --art-y: 3%; --number-y: 35% }
.day-art.gift_31 { --art-scale: 1.12; --art-x: 1%; --number-x: 56%; --number-y: 77% }
.day-art.gift_31 .day-number { color: #fff0d4; text-shadow: 0 1px 3px #521b16, 0 0 3px #521b16 }

/* The irregular cut follows the paper without changing its layout box. */
body {
 background-color: #9c8068;
 background-image: radial-gradient(ellipse at 48% 12%, #b79b80f4, #8e715aef 100%),
   url("assets/processed/paper-tile.png");
}
.page {
 border-color: transparent;
 border-radius: 0;
 clip-path: polygon(
  2px 2px, 5% 1px, 11% 3px, 17% 2px, 23% 4px, 29% 1px,
  36% 2px, 42% 0, 49% 2px, 58% 1px, 64% 3px, 71% 2px,
  78% 3px, 83% 1px, 91% 2px, 96% 0, calc(100% - 3px) 2px,
  calc(100% - 1px) 7%, calc(100% - 3px) 14%, 100% 23%,
  calc(100% - 2px) 33%, calc(100% - 1px) 45%, calc(100% - 4px) 54%,
  calc(100% - 2px) 61%, 100% 72%, calc(100% - 3px) 84%,
  calc(100% - 1px) 93%, calc(100% - 3px) calc(100% - 2px),
  94% 100%, 88% calc(100% - 2px), 79% calc(100% - 1px),
  74% calc(100% - 3px), 67% 100%, 59% calc(100% - 2px),
  53% calc(100% - 1px), 46% calc(100% - 3px), 38% calc(100% - 1px),
  30% calc(100% - 2px), 24% 100%, 18% calc(100% - 3px),
  10% calc(100% - 1px), 5% calc(100% - 2px), 2px calc(100% - 1px),
  0 94%, 3px 87%, 1px 78%, 2px 70%, 0 61%, 3px 52%, 2px 47%,
  4px 38%, 1px 28%, 2px 17%, 0 9%
 );
}
.page::before { content: none }

.day:not(:disabled):hover { transform: none }
.day img { transition: filter .25s ease }
@media (hover: hover) {
 .day:not(:disabled):hover { transform: translateY(-5px) }
 .day:not(:disabled):hover img { filter: drop-shadow(0 5px 4px #654a2455) }
}

.donate-link {
 padding: 14px 0;
 background: transparent;
 color: var(--red);
 border: 0;
 outline: 0;
 border-radius: 0;
 box-shadow: none;
 font-size: 15px;
 text-decoration: underline;
 text-decoration-color: #811e1966;
 text-underline-offset: .24em;
}
.donate-link[hidden] { display: none }
.donate-link:not([hidden]) ~ .footer-credit { margin-top: 30px }
.donate-link:hover { text-decoration-color: currentColor }
.donate-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px }

/* The corner illustrations sit outside the paper's clipping boundary. */
body { overflow-x: clip }
.page-shell { position: relative; max-width: 1080px; margin: 18px auto }
.page-shell > .page { margin: 0 }
.header { padding-top: 24px }
.hero { padding-top: 20px }
.task-card { min-height: 306px; padding-bottom: 30px }
.footer { padding-top: 50px; padding-bottom: 34px }
@media (min-width: 1500px) {
 .page-shell { margin-block: 26px }
}
@media (max-width: 700px) {
 .page-shell { margin: 0 }
 .page-shell > .corner-bell { left: 0; top: 0 }
 .page-shell > .corner-lantern { right: 0; top: 0 }
 .header { padding-top: 25px }
 .hero { padding-top: 22px }
 .task-card { min-height: 326px }
 .footer { padding-top: 46px; padding-bottom: 118px }
}

.page {
 clip-path: polygon(
  0.00% 1.7px, 3.03% 2.1px, 4.74% 1.9px, 6.71% 2.8px,
  9.55% 3.9px, 13.75% 2.9px, 15.84% 1.2px, 16.80% 2.6px,
  18.98% 1.7px, 19.79% 1.8px, 23.94% 1.5px, 26.75% 3.6px,
  31.05% 1.6px, 34.86% 2.4px, 37.82% 1.0px, 39.78% 4.9px,
  42.44% 4.6px, 44.95% 2.5px, 46.26% 2.4px, 47.48% 1.4px,
  50.87% 4.8px, 51.78% 2.9px, 52.68% 3.6px, 56.08% 1.5px,
  58.28% 1.8px, 59.98% 1.1px, 63.00% 1.0px, 65.02% 4.2px,
  67.07% 1.2px, 68.69% 1.6px, 69.75% 1.9px, 73.65% 1.0px,
  77.17% 1.3px, 80.57% 3.6px, 84.42% 1.5px, 85.98% 2.6px,
  88.22% 2.3px, 89.66% 1.3px, 93.41% 2.5px, 97.28% 2.9px,
  calc(100% - 1.9px) 0.00%, calc(100% - 2.9px) 4.15%, calc(100% - 2.0px) 8.15%, calc(100% - 2.5px) 10.52%,
  calc(100% - 2.1px) 11.81%, calc(100% - 2.3px) 14.46%, calc(100% - 2.0px) 17.86%, calc(100% - 1.7px) 22.14%,
  calc(100% - 2.8px) 24.11%, calc(100% - 1.7px) 27.28%, calc(100% - 2.2px) 29.39%, calc(100% - 2.9px) 30.64%,
  calc(100% - 1.6px) 33.60%, calc(100% - 1.7px) 36.79%, calc(100% - 1.2px) 38.56%, calc(100% - 2.2px) 41.49%,
  calc(100% - 1.1px) 43.20%, calc(100% - 1.1px) 45.36%, calc(100% - 3.0px) 47.95%, calc(100% - 2.5px) 50.58%,
  calc(100% - 2.8px) 53.23%, calc(100% - 1.0px) 55.55%, calc(100% - 4.9px) 59.44%, calc(100% - 2.2px) 61.85%,
  calc(100% - 2.4px) 63.39%, calc(100% - 1.3px) 64.46%, calc(100% - 1.2px) 66.37%, calc(100% - 1.5px) 68.09%,
  calc(100% - 1.1px) 70.58%, calc(100% - 2.3px) 72.76%, calc(100% - 2.8px) 76.42%, calc(100% - 1.3px) 78.02%,
  calc(100% - 1.8px) 79.50%, calc(100% - 2.3px) 83.15%, calc(100% - 2.6px) 86.44%, calc(100% - 1.1px) 90.18%,
  calc(100% - 1.9px) 94.08%, calc(100% - 2.1px) 95.69%, calc(100% - 2.8px) 96.92%, calc(100% - 2.2px) 99.23%,
  100.00% calc(100% - 2.1px), 98.62% calc(100% - 1.2px), 95.09% calc(100% - 1.5px), 92.99% calc(100% - 3.2px),
  90.78% calc(100% - 2.0px), 87.39% calc(100% - 1.1px), 84.30% calc(100% - 1.6px), 81.35% calc(100% - 2.0px),
  79.17% calc(100% - 1.0px), 76.94% calc(100% - 1.5px), 75.92% calc(100% - 1.2px), 72.54% calc(100% - 2.0px),
  68.43% calc(100% - 2.4px), 65.13% calc(100% - 2.7px), 63.80% calc(100% - 2.5px), 59.98% calc(100% - 1.2px),
  58.33% calc(100% - 1.6px), 55.61% calc(100% - 1.4px), 51.51% calc(100% - 1.2px), 47.28% calc(100% - 2.2px),
  45.59% calc(100% - 2.4px), 42.60% calc(100% - 3.3px), 40.44% calc(100% - 3.6px), 37.39% calc(100% - 1.5px),
  36.55% calc(100% - 2.6px), 35.10% calc(100% - 2.7px), 34.11% calc(100% - 2.6px), 33.14% calc(100% - 2.7px),
  32.30% calc(100% - 1.3px), 31.02% calc(100% - 2.8px), 28.85% calc(100% - 1.0px), 24.80% calc(100% - 1.5px),
  23.19% calc(100% - 3.5px), 21.87% calc(100% - 2.9px), 18.35% calc(100% - 2.3px), 14.64% calc(100% - 3.3px),
  11.87% calc(100% - 2.5px), 9.70% calc(100% - 2.7px), 6.45% calc(100% - 2.0px), 3.36% calc(100% - 1.8px),
  4.6px 100.00%, 1.7px 95.83%, 4.2px 92.21%, 2.2px 89.55%,
  2.0px 88.27%, 1.5px 86.92%, 1.6px 83.65%, 1.7px 81.17%,
  1.5px 78.34%, 2.3px 77.05%, 2.2px 73.67%, 1.2px 71.74%,
  1.6px 68.49%, 3.1px 65.11%, 2.9px 64.14%, 2.7px 60.31%,
  2.0px 59.05%, 1.8px 57.31%, 4.7px 53.83%, 1.8px 51.87%,
  3.1px 49.98%, 1.9px 46.56%, 1.4px 45.51%, 2.6px 43.07%,
  2.0px 41.43%, 2.4px 37.49%, 3.4px 35.19%, 2.1px 31.11%,
  2.7px 30.04%, 1.6px 26.92%, 1.8px 24.90%, 1.7px 21.20%,
  1.6px 18.39%, 4.5px 16.57%, 4.1px 14.41%, 1.2px 12.26%,
  1.9px 9.17%, 2.8px 7.76%, 1.8px 6.02%, 1.6px 3.84%,
  2.5px 0.60%
 );
}

body {
 background-color: #79604e;
 background-image: radial-gradient(ellipse at 48% 10%, #a5876df2, #684f40f7 100%),
   url("assets/processed/paper-tile.png");
}
.page-shell { isolation: isolate; filter: drop-shadow(0 10px 18px #3b271f66) }
.page,
body[data-decor-stage="5"] .page {
 box-shadow: inset 0 0 13px #805a3b29, inset 0 0 43px #a37a4e22;
}
.page::after {
 content: "";
 position: absolute;
 inset: 0;
 z-index: -1;
 pointer-events: none;
 background:
   radial-gradient(ellipse at 16% 28%, #fff8ec50, transparent 38%),
   radial-gradient(ellipse at 82% 65%, #a7855f13, transparent 45%),
   url("assets/processed/paper-tile.png"),
   repeating-linear-gradient(19deg, transparent 0 4px, #896b4f1c 4.5px, transparent 5.2px 11px),
   repeating-linear-gradient(103deg, transparent 0 7px, #fffcf52e 8px, transparent 9px 13px);
 background-size: auto, auto, 540px 186px, auto, auto;
 background-blend-mode: soft-light, soft-light, multiply, normal, normal;
 opacity: .14;
}
.page-shell::after {
 content: "";
 position: absolute;
 top: 52px;
 right: 3%;
 width: 23%;
 aspect-ratio: 1;
 z-index: 1;
 pointer-events: none;
 background: radial-gradient(ellipse, #ffd48b50, #f8bc6220 38%, transparent 70%);
}
.paper-ink { position: absolute; inset: 0; pointer-events: none; user-select: none; z-index: -1 }
.paper-ink span { position: absolute; color: #a17439; opacity: .26; font: 24px/1 Georgia, serif }
.paper-ink .ink-flake { top: 208px; left: 9%; transform: rotate(-17deg); font-size: 30px }
.paper-ink .ink-star { top: 260px; right: 12%; transform: rotate(12deg); font-size: 27px }
.paper-ink .ink-flurry { top: 69%; left: 2%; transform: rotate(-13deg); font-size: 21px }
.paper-ink .ink-spark { bottom: 11%; right: 2.3%; font-size: 16px }
.paper-ink .ink-deer {
 top: 60%; right: 1%; width: 34px; aspect-ratio: 1.15;
 background: #987042; opacity: .23;
 clip-path: polygon(1% 43%, 10% 47%, 24% 43%, 53% 43%, 67% 26%, 73% 24%,
  69% 12%, 63% 7%, 66% 4%, 73% 10%, 76% 18%, 81% 10%, 80% 2%, 84% 3%,
  85% 13%, 80% 23%, 87% 24%, 98% 30%, 94% 36%, 84% 34%, 75% 47%,
  68% 63%, 72% 96%, 68% 97%, 61% 67%, 48% 64%, 34% 64%, 28% 78%,
  23% 98%, 19% 98%, 22% 76%, 20% 62%, 9% 57%);
}
.paper-ink .ink-deer-small { top: auto; right: 4%; bottom: 5%; width: 26px; transform: scaleX(-1) rotate(-6deg) }
@media (max-width: 700px) {
 .page-shell::after { top: 14px; right: 1%; width: 26% }
 .paper-ink .ink-flake { top: 184px; left: 2%; font-size: 15px }
 .paper-ink .ink-star { top: 140px; right: 3%; font-size: 15px }
 .paper-ink .ink-deer { top: auto; bottom: 155px; right: 3%; width: 21px }
 .paper-ink .ink-deer-small,.paper-ink .ink-flurry { display: none }
}

/* Date availability and completion are independent of the scratch layer. */
.day:not(:disabled):not(.completed) img {
 filter: drop-shadow(0 0 5px #b57d2a75) drop-shadow(0 3px 2px #654a2425);
}
.day.completed::before {
 content: "✓";
 position: absolute;
 z-index: 1;
 right: 4%;
 bottom: 1%;
 width: 18px;
 height: 18px;
 border: 1px solid #aa874e;
 border-radius: 50%;
 background: #f9e9c9;
 color: #3d4c32;
 font: bold 12px/16px Georgia, serif;
}
@media (hover: hover) {
 .day:not(:disabled):not(.completed):hover img {
  filter: drop-shadow(0 0 5px #b57d2a75) drop-shadow(0 5px 4px #654a2455);
 }
}

/* Only the painted silhouette owns pointer and touch input. */
.scratch-layer {
 border-radius: 0;
 overflow: visible;
 pointer-events: none;
 touch-action: auto;
 bottom: 14px;
}
.scratch-layer canvas {
 pointer-events: auto;
 cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Ccircle cx='13' cy='13' r='11' fill='%23c39951' stroke='%2379532b' stroke-width='1.5'/%3E%3Ccircle cx='13' cy='13' r='8.5' fill='%23dfbb70' stroke='%23916936' stroke-dasharray='1 1'/%3E%3Cpath d='M13 6l1.5 5.5L20 13l-5.5 1.5L13 20l-1.5-5.5L6 13l5.5-1.5z' fill='%23916936'/%3E%3C/svg%3E") 13 13, crosshair;
}
.scratch-layer.revealed canvas { pointer-events: none }
.foil-flake {
 position: absolute;
 width: 3px;
 height: 2px;
 border-radius: 1px;
 background: #d3a454;
 box-shadow: inset 0 1px #f4d18c;
 pointer-events: none;
 animation: foil-fall .48s ease-out both;
}
.foil-flake:nth-of-type(even) { background: #ad7c38 }
@keyframes foil-fall {
 0% { opacity: .95; transform: translateY(-2px) rotate(15deg) }
 100% { opacity: 0; transform: translate(var(--flake-drift), var(--flake-fall)) rotate(170deg) }
}
@media (prefers-reduced-motion: reduce) {
 .foil-flake { display: none }
}

@media (max-width: 700px) {
 .scratch-layer { inset-inline: 13px }
}

/* Keep the letter concealed until the first scratch interaction. */
.task-card:has(.scratch-layer:not(.scratching):not(.revealed)) #task-content {
 visibility: hidden;
}
.scratch-layer canvas { border-radius: 12px }
.task-card:has(.scratch-layer:not(.revealed)) .complete-btn {
 visibility: hidden;
 pointer-events: none;
}

/* The foil shares the inner edge of the decorative frame on every viewport. */
.task-card {
 --task-frame-inset: 13px;
 --task-frame-border: 1px;
 --task-frame-radius: 12px;
}
.task-card::before {
 inset: var(--task-frame-inset);
 border-width: var(--task-frame-border);
 border-radius: var(--task-frame-radius);
 z-index: 6;
}
.task-card .scratch-layer {
 inset: var(--task-frame-inset);
}
.task-card .scratch-layer canvas { border-radius: var(--task-frame-radius) }
.task-card .paper-corner { z-index: 4 }

@media (max-width: 700px) {
 .hero { padding-top: 16px }
 .calendar { padding-inline: clamp(5px, 1.6vw, 11px) }
 .footer {
  padding-bottom: 86px;
  min-height: 212px;
 }
 .page-shell > .corner-bell {
  width: 32.4%;
  left: -9%;
 }
 .page-shell > .corner-lantern {
  width: 30.4%;
  right: -8%;
 }
}
@media (max-width: 360px) {
 .page-shell > .corner-bell { width: 29% }
 .page-shell > .corner-lantern { width: 27% }
}
