:root {
  color-scheme: light;
  --paper: #f8f0e4;
  --white: #fffaf1;
  --ink: #28382d;
  --muted: #555e50;
  --green: #2c4938;
  --deep: #1b3026;
  --ground: #233d30;
  --on-ground: #fff2da;
  --ground-muted: #e2d8c4;
  --ground-line: #e2d8c45c;
  --rose: #efb4ac;
  --gold: #ecd3a1;
  --cranberry: #8b3b40;
  --sage: #ebece0;
  --line: #d9cbbb;
  --yarn: repeating-linear-gradient(128deg, #a85d51 0 2px, #ecab8c 3px 5px, #f8c6a0 5px 6px, #c57b65 7px 9px);
  --yarn-dash: #000 0 19px, transparent 20px 29px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--on-ground); font: 1rem/1.6 var(--sans);
  background: radial-gradient(ellipse at 88% 13%, #48605170, transparent 63%),
    radial-gradient(ellipse at 4% 62%, #4c59475c, transparent 56%), var(--ground);
  background-size: 100% 100%, 100% 100%, auto;
}
button, textarea { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #aa5c38; outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 2; background: var(--white); color: var(--ink); padding: 12px; }
.skip:focus { top: 12px; }
.mast { border-bottom: 1px solid var(--ground-line); background: var(--deep); }
.mast-inner { min-height: 74px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.brand { font-size: .94rem; text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { display: grid; place-items: center; flex: none; color: var(--white); background: var(--cranberry); border-radius: 50%; width: 28px; height: 28px; }
nav { display: flex; gap: 20px; align-items: center; }
nav a { display: inline-flex; min-height: 44px; align-items: center; font-size: .875rem; text-decoration: none; }
nav a:hover { text-decoration: underline; }
nav .nav-cta { border: 1px solid #929f8d; border-radius: 100px; padding: 0 16px; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 6vw, 76px); align-items: center; padding-block: 58px 64px; }
.hero h1 { text-wrap: wrap; }
.hero h1 em { color: var(--rose); }
.hero .eyebrow, .calendar-copy .eyebrow { color: var(--gold); }
.eyebrow { margin: 0 0 12px; font-size: .875rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: var(--serif); line-height: 1.09; font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(2.55rem, 5.65vw, 5.05rem); letter-spacing: -.052em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.04em; }
h3 { font-size: clamp(1.42rem, 2.2vw, 1.8rem); }
.lede { max-width: 42ch; margin: 26px 0 24px; font-size: clamp(1.0625rem, 1.6vw, 1.22rem); }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 10px 19px; border: 1px solid transparent; border-radius: 100px; text-decoration: none; font-weight: 650; line-height: 1.3; }
.primary { background: var(--cranberry); color: var(--white); }
.primary:hover { background: #713036; }
.secondary { color: var(--ink); background: transparent; border-color: #8f9e8e; }
.secondary:hover { background: var(--sage); }
.light { background: var(--white); color: var(--ink); }
.light:hover { background: #f1e4c9; }
.hint { color: var(--muted); font-size: .875rem; }
.hero-note, .review > .hint { color: var(--ground-muted); font-size: .875rem; }
.hero .primary, .review-actions .primary { background: var(--white); color: var(--ink); }
.hero .primary:hover, .review-actions .primary:hover { background: #f3dfbf; }
.hero-note span { padding-inline: .28rem; }
.doll-scene { margin: 0; min-width: 0; }
.doll-stage {
  position: relative; display: grid; place-items: end center; isolation: isolate;
  aspect-ratio: 1; overflow: hidden; border-radius: 24px; padding-bottom: 11%;
  background: radial-gradient(ellipse at 50% 41%, #27463548, #101c16a3), #1b3026 url("assets/wool.webp") center / cover;
  box-shadow: 0 16px 38px #0a171d55;
}
.doll { display: block; position: absolute; height: 73%; width: auto; max-width: 76%; object-fit: contain; bottom: 11%; transform-origin: 50% 99%; }
.doll-shadow { position: absolute; left: 32%; right: 32%; bottom: 9.5%; height: 4%; border-radius: 50%; background: #0c140fb5; filter: blur(5px); }
.doll-star { position: absolute; color: var(--gold); font: clamp(1rem, 3vw, 2rem)/1 var(--serif); }
.star-left { top: 22%; left: 19%; }
.star-right { top: 33%; right: 16%; font-size: clamp(.8rem, 2vw, 1.4rem); }
.doll-scene figcaption { text-align: center; }
.doll-button { min-height: 44px; color: var(--on-ground); background: transparent; padding: 6px 12px; border: 0; border-radius: 12px; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; }
.doll-button:hover { color: var(--rose); }
@media (prefers-reduced-motion: reduce) { .doll-scene figcaption { display: none; } }
.demo { padding: 0; }
.demo-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; background: var(--paper); color: var(--ink); padding: clamp(18px, 5vw, 46px); border-radius: 19px; }
.demo h2 + p { margin-bottom: 0; max-width: 35ch; }
.demo-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tone-0 { --door-bg: #345740; --door-ink: #fff1d7; --card-tint: #e9e9dc; }
.tone-1 { --door-bg: #963e45; --door-ink: #fff0de; --card-tint: #f1dfdb; }
.tone-2 { --door-bg: #715342; --door-ink: #fff2dc; --card-tint: #efe4d5; }
.tone-3 { --door-bg: #773749; --door-ink: #fff0df; --card-tint: #eededc; }
.tone-4 { --door-bg: #405b59; --door-ink: #fff0df; --card-tint: #e0ebe5; }
.door {
  color: var(--door-ink); background: var(--door-bg) url("assets/wool.webp") center / 168px;
  background-blend-mode: luminosity; border: 0; border-radius: 12px; min-width: 0;
  min-height: 56px; aspect-ratio: 1.18; position: relative; display: grid;
  place-content: center; gap: 4px; padding: 9px; isolation: isolate;
  box-shadow: 0 2px 3px #51312b24;
}
.door::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 #fff2da60, inset 0 -2px 0 #18251b55; pointer-events: none; }
.door::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: #0d110d31; z-index: -1; }
.door:hover::after { background: #0d110d12; }
.door-number { font: clamp(1.5rem, 4vw, 2.65rem)/1 var(--serif); }
.door-star { line-height: 1; font-size: .78rem; }
.door-check { position: absolute; top: 6px; right: 9px; visibility: hidden; font-weight: 700; }
.is-opened .door-check { visibility: visible; }
.route { position: relative; padding-block: 74px 62px; }
.route h2 { padding-right: 72px; }
.yarn-ball { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 9px #0f171481); }
.route > .yarn-ball { position: absolute; right: 0; top: 0; width: clamp(76px, 11vw, 132px); }
.route ol { list-style: none; padding: 23px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin: 27px 0 0; position: relative; }
.route ol::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 7px; background: var(--yarn);
  mask: repeating-linear-gradient(to right, var(--yarn-dash)); border-radius: 10px;
}
.route li { padding-right: 12px; }
.route h3 { margin-top: 7px; }
.route .eyebrow { color: var(--gold); }
.product { margin-bottom: 64px; }
.product-panel { background: linear-gradient(#1a3027e0, #1a3027e0), var(--deep) url("assets/wool.webp") center / 310px; color: var(--white); border: 1px solid var(--ground-line); border-radius: 20px; padding: clamp(25px, 6vw, 65px); display: grid; grid-template-columns: 1fr max-content; gap: 32px; align-items: center; }
.product-panel h2 + p { max-width: 47ch; }
.price { display: grid; justify-items: start; gap: 4px; }
.price p { color: #ffe2a8; font: 3.25rem/1.05 var(--serif); margin: 0; }
.price .button { margin-top: 9px; }
.price small { font-size: .875rem; color: #d6e1d8; }
.gift-access { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--ground-line); }
.gift-access-button { border-color: var(--gold); color: var(--gold); cursor: pointer; list-style: none; }
.gift-access-button::-webkit-details-marker { display: none; }
.gift-access-button:hover, .gift-access[open] .gift-access-button { background: var(--gold); color: var(--deep); }
.gift-access-copy { max-width: 48ch; }
.gift-access-copy p { margin: 12px 0 0; }
.gift-access-status { font-size: .875rem; color: var(--ground-muted); }
.footer { display: flex; justify-content: space-between; gap: 10px; padding-block: 20px 30px; border-top: 1px solid var(--ground-line); color: var(--ground-muted); font-size: .875rem; }

.calendar { padding-block: 52px 64px; }
.calendar-head { display: grid; grid-template-columns: minmax(0, 1fr) clamp(144px, 21vw, 240px); align-items: center; gap: clamp(20px, 6vw, 70px); margin-bottom: 30px; }
.calendar-copy { max-width: 760px; }
.calendar-head h1 { font-size: clamp(2.5rem, 5.2vw, 4.8rem); }
.instructions { margin-top: 20px; max-width: 66ch; }
.instructions summary { font-weight: 700; cursor: pointer; padding-block: 9px; }
.instructions p { margin: 8px 0; }
.calendar-tools { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 18px; }
.calendar-tools output { font-weight: 700; }
.calendar-tools .secondary, .review-actions .secondary { color: var(--on-ground); border-color: var(--ground-muted); }
.calendar-tools .secondary:hover, .review-actions .secondary:hover { background: var(--deep); }
.calendar-trail {
  --trail-gutter: clamp(38px, 10vw, 118px);
  --trail-center: calc(var(--trail-gutter) / 2);
  --trail-gap: clamp(22px, 4vw, 50px);
  --trail-start-height: clamp(66px, 10vw, 114px);
  position: relative; isolation: isolate; max-width: 965px; margin-inline: auto;
}
.groups::before {
  content: ''; position: absolute; z-index: -1; top: calc(25px - var(--trail-start-height)); bottom: -56px;
  left: var(--trail-center); width: clamp(7px, 1.05vw, 11px); transform: translateX(-50%);
  background: var(--yarn); mask: repeating-linear-gradient(var(--yarn-dash)); border-radius: 12px;
}
.trail-start, .trail-end { position: relative; display: flex; align-items: center; padding-left: var(--trail-gutter); }
.trail-start { margin-bottom: 19px; min-height: var(--trail-start-height); }
.trail-guide {
  position: absolute; inset: calc(-19px - var(--trail-start-height)) auto 0 0; z-index: 1; pointer-events: none;
  display: flex; justify-content: center; align-items: flex-start; width: var(--trail-gutter);
}
.trail-guide .yarn-ball { width: min(92%, 79px); }
.trail-start p { margin: 0; padding-left: 4px; font: clamp(1.12rem, 2.3vw, 1.65rem)/1.25 var(--serif); color: var(--gold); }
.groups { position: relative; display: grid; gap: var(--trail-gap); padding-left: var(--trail-gutter); view-timeline-name: --calendar-trail; }
.group {
  --offset: 0px;
  position: relative; margin-left: var(--offset); padding: clamp(13px, 3vw, 32px);
  color: var(--ink); background: linear-gradient(155deg, #fffaf0a8, transparent 68%), var(--card-tint);
  border-radius: 16px; border: 1px solid #75604a26; box-shadow: 0 9px 28px #10201838;
}
.group:nth-of-type(even) { --offset: clamp(0px, (100vw - 600px) / 8, 62px); }
.group::before {
  content: ''; position: absolute; top: 50%; right: 100%; height: 8px;
  width: calc(var(--trail-center) + var(--offset) + 1px);
  transform: translateY(-50%); background: var(--yarn); border-radius: 100px 0 0 100px;
  mask: repeating-linear-gradient(to right, var(--yarn-dash));
}
.group .eyebrow { margin-bottom: 6px; color: var(--cranberry); }
.group h2 { font-size: clamp(1.45rem, 2.75vw, 2.25rem); margin-bottom: 18px; }
.group-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.group-grid .door-number { font-size: clamp(1.4rem, 2.7vw, 2.35rem); }
.trail-end {
  width: fit-content; min-height: 76px; margin-top: 18px;
  font: clamp(1.45rem, 3vw, 2rem)/1 var(--serif); color: var(--gold);
  cursor: pointer; list-style: none; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: .22em;
}
.trail-end::-webkit-details-marker { display: none; }
.trail-end:hover { color: var(--white); }
.celebration { position: relative; scroll-margin-top: 16px; }
.celebration[open] { margin-bottom: 32px; }
.celebration-card {
  position: relative; margin-left: var(--trail-gutter); padding: clamp(16px, 4vw, 40px);
  border: 1px solid #e7c583; border-radius: 18px;
  background: radial-gradient(ellipse at 100% 0%, #ffe0a6, transparent 64%), var(--paper); color: var(--ink);
}
.celebration-card p { max-width: 58ch; }
.celebration-card label { display: block; font-weight: 650; }
.celebration-card .hint { margin-top: 0; }
.gift {
  position: absolute; display: grid; place-items: center; left: var(--trail-center); transform: translateX(-50%);
  width: clamp(38px, 8vw, 82px); aspect-ratio: 1;
}
.gift::before {
  content: ''; position: absolute; inset: -22%; border-radius: 50%;
  background: radial-gradient(circle, #f7d7859e, #a8784a45 40%, transparent 69%);
}
.gift::after {
  content: ''; position: absolute; width: 68%; height: 25%; bottom: 12%; border-radius: 2px 2px 5px 5px;
  border-top: 2px solid #e9b378; box-shadow: 0 4px 7px #111c16a0;
  background: linear-gradient(90deg, #914c4c 0 43%, #e1aa6e 43% 57%, #683844 57%);
}
.gem {
  width: 56%; aspect-ratio: 1; transform: translateY(-20%);
  clip-path: polygon(50% 0, 84% 16%, 100% 48%, 50% 100%, 0 48%, 16% 16%);
  background: conic-gradient(from -45deg at 50% 38%, #fff2be 0 25%, #f1c171 0 39%, #d69448 0 51%, #ffe1a0 0 63%, #f0b868 0 76%, #b87936 0 87%, #ffe1aa 0 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .trail-guide .yarn-ball { position: sticky; top: 38vh; }
  .route > .is-in-view { animation: yarn-roll 780ms cubic-bezier(.19, .74, .24, 1) both; }
  .trail-end.is-in-view .gift::before { animation: gift-shine 950ms ease-in-out both; }
  @supports (animation-timeline: view()) {
    .trail-guide .yarn-ball {
      animation: yarn-turn linear both;
      animation-timeline: --calendar-trail;
      animation-range: contain;
    }
  }
}
@keyframes yarn-roll {
  from { transform: translateX(-38%) rotate(-48deg); }
  to { transform: translateX(0) rotate(0); }
}
@keyframes yarn-turn { to { transform: rotate(-5turn); } }
@keyframes gift-shine {
  0%, 100% { opacity: .8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.22); }
}
.final-card { color: var(--ink); max-width: 720px; margin-top: 40px; padding: clamp(19px, 4vw, 42px); border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.card-fields { display: grid; gap: 14px; }
.card-fields label, .notes label { display: block; font-weight: 650; }
textarea { width: 100%; margin-top: 6px; resize: vertical; min-height: 62px; padding: 9px 11px; border-radius: 7px; border: 1px solid #a59582; background: #fffefb; color: var(--ink); }
dialog { padding: clamp(18px, 4vw, 34px); border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 20px; box-shadow: 0 20px 60px #17291f55; width: min(590px, calc(100% - 26px)); max-height: 88dvh; overflow: auto; }
dialog::backdrop { background: #19291ec7; }
.window-top { text-align: right; }
.text-button { min-height: 44px; background: transparent; border: 0; color: var(--green); padding: 0 9px; border-radius: 6px; text-decoration: underline; }
.day-kicker { color: #4f6252; }
.window-body h2 { font-size: clamp(1.85rem, 5vw, 2.8rem); text-wrap: initial; outline: none; }
.task { font-size: 1.075rem; }
.example { margin-bottom: 19px; background: #f1e4d5; padding: 12px 15px; border-radius: 7px; }
.window-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.notes .hint { margin: 3px 0 0; }
@media (max-width: 580px) {
  .group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .group-grid .door { aspect-ratio: 1.45; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .mast-inner { min-height: 64px; }
  nav { gap: 10px; }
  nav .nav-cta { padding-inline: 10px; }
  .hero { gap: 22px; padding-block: 36px 36px; grid-template-columns: 1fr; }
  .hero .doll-scene { width: min(100%, 510px); justify-self: center; }
  .calendar-head { grid-template-columns: 1fr; }
  .calendar-head .doll-scene { width: min(100%, 190px); justify-self: center; }
  .demo-layout, .product-panel { grid-template-columns: 1fr; gap: 17px; }
  .demo-layout { padding: 22px; }
  .route { padding-block: 43px; }
  .route ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route > .yarn-ball { top: 2px; }
  .product { margin-bottom: 38px; }
  .calendar { padding-block: 28px 40px; }
}
@media (max-width: 425px) {
  .mast .brand { font-size: .82rem; }
  .mast nav { gap: 8px; }
  nav a, nav .nav-cta { font-size: .78rem; padding-inline: 0; border: 0; }
  .brand-mark { width: 24px; height: 24px; }
  .group-grid .door-number { font-size: 1.95rem; }
}

.review { margin: 12px auto 0; max-width: 860px; scroll-margin-top: 16px; }
.review-heading { padding: clamp(22px, 5vw, 42px); background: radial-gradient(ellipse at 80% 0%, #736044cf, #213b2ef0 70%), var(--deep) url("assets/wool.webp") center / 280px; color: var(--white); border-radius: 16px 16px 0 0; border-top: 1px solid var(--gold); }
.review-heading p:last-child { max-width: 61ch; margin-bottom: 0; }
.review-heading .eyebrow { color: var(--gold); }
.review-empty, .review-next { color: var(--ink); padding: clamp(17px, 4vw, 28px); margin: 0; background: var(--sage); }
.inline-button { font: inherit; color: var(--green); border: 0; background: transparent; text-decoration: underline; font-weight: 700; padding: 4px 2px; }
.review-groups > section { color: var(--ink); padding: clamp(17px, 4vw, 28px); background: var(--white); border-bottom: 1px solid var(--line); }
.review-groups dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 12px; margin: 16px 0 0; }
.review-groups dl > div, .review-log dl > div { color: var(--ink); padding: 12px 14px; background: var(--paper); border-radius: 8px; }
.review dt { color: var(--muted); font-weight: 650; }
.review dd { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-next label { display: block; font-weight: 700; }
.review-next select { margin-top: 8px; width: min(100%, 25rem); min-height: 46px; padding: 8px 11px; border: 1px solid #a59582; border-radius: 7px; color: var(--ink); background: var(--white); font: inherit; }
.review-next p { margin-bottom: 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.review-actions button:disabled { opacity: .6; cursor: default; }
.review-log { border-top: 1px solid var(--ground-line); }
.review-log summary { padding-block: 12px; font-weight: 700; cursor: pointer; }
.review-log dl { display: grid; gap: 8px; }
.export-option { display: flex; gap: 8px; align-items: center; min-height: 44px; margin-top: 8px; cursor: pointer; }
.export-option input { width: 18px; height: 18px; accent-color: var(--green); }

.window-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.window-top form { margin-left: auto; }
.day-context { display: grid; gap: 8px; margin: 15px 0; }
.day-context > div { background: var(--sage); border-left: 3px solid #9b9d80; padding: 8px 12px; border-radius: 0 7px 7px 0; }
.day-context p { margin: 3px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.day-context p:first-child { color: var(--muted); font-size: .875rem; font-weight: 650; }
.day-context p + p { max-height: 8rem; overflow-y: auto; }
.day-context button, .feedback button { min-height: 44px; }
.feedback { color: var(--ink); padding: clamp(18px, 4vw, 30px); background: var(--white); border-bottom: 1px solid var(--line); }
.feedback h3 { margin-bottom: 12px; }
.feedback h4 { margin: 0; font-size: 1.05rem; }
.feedback p { margin: 8px 0; }
.feedback article + article { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.feedback details p { border-left: 2px solid var(--line); margin: 0 0 8px; padding-left: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback summary { padding-block: 10px; color: var(--green); font-weight: 650; cursor: pointer; }
