/* =====================================================================
   THE OTHER WAY™ · The Menopause Advent Calendar 2026
   "The Secret Garden" – main stylesheet (mobile first)
   ===================================================================== */

:root {
  /* Brand palette */
  --plum: #43283F;
  --plum-deep: #2C1829;
  --plum-night: #231421;
  --burgundy: #713D51;
  --rose: #C99CA5;
  --rose-light: #E3CBD0;
  --ivory: #F8F3EB;
  --paper: #FFFCF7;
  --gold: #C9A66D;
  --gold-soft: #E2CB9C;
  --gold-ink: #74582A;      /* readable gold text on ivory */
  --sage: #899988;
  --sage-deep: #2F4A40;     /* evergreen – readable green text on ivory */
  --sage-tint: #E8EEEA;
  --evergreen: #2F4A40;     /* deepened Soft Sage – the «green» gift boxes */
  --evergreen-deep: #1F3A30;
  --wine: #5B2C45;          /* third box tone between plum and burgundy */
  --foil: linear-gradient(160deg, #B8935A 0%, #F6E6BC 30%, #D9B77A 48%, #FFF1CC 62%, #C29C5E 80%, #E8CC92 100%);
  --foil-ink: linear-gradient(160deg, #7E5E2C 0%, #B8935A 35%, #8E6D3A 55%, #C9A66D 75%, #7E5E2C 100%);
  --rose-tint: #F3E6E6;
  --ink: #2E2329;
  --muted: #6A5B62;
  --line: #E6D9CE;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --ease: cubic-bezier(.22, .7, .2, 1);
  --shadow-card: 0 1px 2px rgba(35, 20, 33, .08), 0 22px 48px -24px rgba(35, 20, 33, .45);
  --velvet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font: 400 1rem/1.65 var(--sans);
  color: var(--ivory);
  background-color: var(--plum);
  background-image:
    var(--velvet),
    radial-gradient(1100px 520px at 50% -8%, rgba(201, 166, 109, .22), transparent 62%),
    radial-gradient(900px 760px at 0% 35%, rgba(113, 61, 81, .55), transparent 70%),
    radial-gradient(900px 760px at 100% 70%, rgba(47, 74, 64, .5), transparent 70%),
    linear-gradient(180deg, var(--plum) 0%, var(--plum-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only, .sr-defs {
  position: absolute !important; 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: 1rem; top: -4rem; z-index: 100;
  background: var(--ivory); color: var(--plum); padding: .75rem 1.25rem; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  margin: 0 0 .9rem;
  font: 600 .72rem/1.4 var(--sans);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Banners ---------- */
.preview-banner, .storage-warning {
  position: sticky; top: 0; z-index: 50;
  padding: .6rem var(--gutter); text-align: center;
  font: 600 .82rem/1.4 var(--sans);
}
.preview-banner { background: #F6E7B8; color: #3A2A08; }
.storage-warning { background: var(--rose-light); color: var(--plum-deep); }

/* ---------- Masthead ---------- */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.25rem;
  max-width: 76rem; margin: 0 auto; padding: 1rem var(--gutter);
}
.wordmark {
  font: 600 .78rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; padding: .75rem 0;
}
.topnav {
  order: 3; width: 100%;
  display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid rgba(201, 166, 109, .22); padding-top: .25rem;
}
.topnav::-webkit-scrollbar { display: none; }
.navlink {
  flex: none; background: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 0 .75rem;
  font: 500 .9rem/1 var(--sans); color: var(--rose-light);
  border-radius: 8px;
}
.navlink:hover { color: var(--ivory); background: rgba(248, 243, 235, .06); }
.lang-switch { display: flex; align-items: center; gap: .1rem; color: var(--gold); }
.lang-switch button {
  min-width: 44px; min-height: 44px; border: 0; background: none; cursor: pointer;
  font: 600 .82rem/1 var(--sans); letter-spacing: .14em; color: var(--rose-light);
  border-radius: 8px;
}
.lang-switch button[aria-pressed="true"] { color: var(--ivory); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .45em; text-decoration-thickness: 1px; }

@media (min-width: 52rem) {
  .topnav { order: 0; width: auto; border: 0; padding: 0; margin-left: auto; }
}

.hero {
  position: relative;
  max-width: 60rem; margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
.hero__ring {
  width: clamp(11rem, 26vw, 14.5rem); margin: 0 auto 1.25rem;
}
.hero__ring svg { display: block; width: 100%; height: auto; overflow: visible; }
.ring-tick { stroke: var(--gold); stroke-linecap: round; opacity: .35; transition: opacity .4s, stroke .4s; }
.ring-tick.is-open { opacity: 1; }
.ring-tick.is-done { stroke: var(--gold-soft); opacity: 1; stroke-width: 2.4; }
.ring-tick.is-today { stroke: var(--rose); opacity: 1; stroke-width: 2.6; }
.ring-dot { fill: var(--rose); }
.hero__title {
  margin: 0;
  font: 500 clamp(2.4rem, 1.6rem + 4vw, 4.5rem)/1.02 var(--serif);
  letter-spacing: -.01em; color: var(--ivory); text-wrap: balance;
}
.hero__year { display: block; font-style: italic; font-weight: 400; color: var(--gold); font-size: .55em; letter-spacing: .08em; margin-top: .35rem; }
.hero__subtitle {
  margin: 1rem auto 0; max-width: 34rem;
  font: italic 500 clamp(1.35rem, 1.1rem + 1vw, 1.9rem)/1.25 var(--serif);
  color: var(--rose-light); text-wrap: balance;
}
.hero__intro { margin: 1.25rem auto 0; max-width: 36rem; color: rgba(248, 243, 235, .86); font-size: 1.05rem; }
.hero__status {
  display: inline-block; margin: 1.5rem auto 0; padding: .6rem 1.2rem;
  border: 1px solid rgba(201, 166, 109, .5); border-radius: 999px;
  font: 500 .95rem/1.45 var(--sans); color: var(--ivory);
  background: rgba(35, 20, 33, .35);
}
.hero__progress { margin: .75rem 0 0; font-size: .88rem; color: var(--rose-light); letter-spacing: .04em; }
.hero__motto { margin: 1.25rem 0 0; font: italic 400 1.15rem/1.3 var(--serif); color: var(--gold); }

/* ---------- The gift room ---------- */
main { display: block; padding: 0 var(--gutter) clamp(3rem, 6vw, 5rem); outline: none; }

.giftroom { position: relative; max-width: 76rem; margin: 0 auto; }
.giftroom::before { /* fairy-light bokeh */
  content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter)); z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 6% 18%, rgba(241, 221, 174, .3) 0 3px, transparent 14px),
    radial-gradient(circle at 94% 12%, rgba(241, 221, 174, .26) 0 4px, transparent 18px),
    radial-gradient(circle at 88% 46%, rgba(241, 221, 174, .16) 0 6px, transparent 26px),
    radial-gradient(circle at 3% 62%, rgba(241, 221, 174, .15) 0 8px, transparent 30px),
    radial-gradient(circle at 97% 78%, rgba(241, 221, 174, .2) 0 3px, transparent 12px),
    radial-gradient(circle at 10% 90%, rgba(241, 221, 174, .18) 0 5px, transparent 20px);
}
.garland {
  display: block; position: relative; z-index: 2;
  width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)) clamp(.5rem, 2vw, 1.5rem);
  height: clamp(6.5rem, 4rem + 8vw, 10.5rem);
}
.twinkle { animation: twinkle 3.2s ease-in-out infinite; }
.twinkle:nth-of-type(3n) { animation-delay: -1.1s; }
.twinkle:nth-of-type(3n+1) { animation-delay: -2.2s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.piles { display: grid; gap: 3.25rem; }
.pile { position: relative; }

/* Chapter gift tag */
.pile__tag {
  position: relative; width: fit-content; max-width: min(92%, 24rem);
  margin: 0 auto 2.4rem; padding: .85rem 1.6rem .9rem 2.6rem;
  text-align: center; color: var(--burgundy);
  background: var(--velvet), linear-gradient(180deg, var(--paper), var(--ivory));
  border-radius: .35rem 1rem 1rem .35rem;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(201, 166, 109, .7), 0 14px 26px -14px rgba(0, 0, 0, .7);
  transform: rotate(-1.5deg);
}
.pile:nth-child(even) .pile__tag { transform: rotate(1.5deg); }
.pile__tag::before { /* eyelet */
  content: ""; position: absolute; left: 1rem; top: 50%; width: .7rem; height: .7rem; margin-top: -.35rem;
  border-radius: 50%; background: var(--plum-deep); box-shadow: 0 0 0 2px var(--gold);
}
.pile__tag::after { /* gold thread */
  content: ""; position: absolute; left: 1.32rem; bottom: 50%; width: 1px; height: 3rem;
  background: linear-gradient(0deg, var(--gold), rgba(201, 166, 109, 0)); transform-origin: bottom; transform: rotate(-24deg);
}
.pile__tag .eyebrow { margin: 0 0 .15rem; font-size: .64rem; color: var(--gold-ink); }
.pile__title { margin: 0; font: italic 500 clamp(1.3rem, 1.1rem + .8vw, 1.65rem)/1.15 var(--serif); color: var(--burgundy); text-wrap: balance; }
.pile__title:empty { display: none; }
.pile__days { margin: .2rem 0 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Box layout – mobile: a staggered two-column stack */
.pile__boxes {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 3.1rem; grid-auto-flow: row dense;
  gap: 1.15rem .9rem;
}
.pile__deco { display: none; }

/* ---------- Gift-box doors ---------- */
.door {
  --tone: var(--burgundy);
  --lid: max(1.4rem, 20%);
  position: relative; display: block;
  grid-row: span var(--mspan, 3);
  width: 100%; height: 100%; min-height: 8rem; margin: 0; padding: 0;
  background: none; border: 0; border-radius: 4px; cursor: pointer; color: inherit;
  container-type: size;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .35s var(--ease);
}
@media (max-width: 39.99rem) {
  .box-m--b { --tone: var(--burgundy); }
  .box-m--g { --tone: var(--evergreen); }
  .box-m--w { --tone: var(--wine); }
}
@media (min-width: 40rem) {
  .box--g { --tone: var(--evergreen); }
  .box--w { --tone: var(--wine); }
}

.door__frame {
  position: absolute; inset: 0; border-radius: 4px;
  background:
    var(--velvet),
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(0, 0, 0, .18)),
    var(--tone);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    inset 0 -14px 24px -14px rgba(0, 0, 0, .45),
    0 18px 30px -16px rgba(10, 4, 10, .75), 0 2px 0 rgba(0, 0, 0, .25);
  transition: box-shadow .4s, filter .4s;
}
.box__lid {
  position: absolute; left: -4px; right: -4px; top: -4px; height: var(--lid); z-index: 2;
  border-radius: 4px 4px 2px 2px;
  background:
    var(--velvet),
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(0, 0, 0, .08)),
    var(--tone);
  box-shadow: 0 3px 0 -1px rgba(0, 0, 0, .28), 0 5px 8px -4px rgba(0, 0, 0, .5);
  transform-origin: 0 100%;
  transition: transform .7s var(--ease), opacity .5s;
}
.box__inside {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  border-radius: 4px; opacity: 0;
  background: radial-gradient(120% 80% at 50% 0%, rgba(0, 0, 0, .6), rgba(0, 0, 0, .18) 70%);
  transition: opacity .5s;
}
.box__gift { width: clamp(2.6rem, 34cqmin, 4.4rem); height: clamp(2.6rem, 34cqmin, 4.4rem); margin-bottom: 18%; transform: scale(.7); opacity: 0; transition: transform .6s var(--ease) .15s, opacity .4s .15s; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45)); }
.box__ribbon, .box__bow { display: none; }
.box__ribbon { position: absolute; z-index: 3; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.box__ribbon--v { left: calc(28% - 7px); width: 14px; top: -4px; bottom: 0; background: linear-gradient(90deg, #A8854C, #F1DDAE 45%, #C9A66D 60%, #9C7A43); }
.box__ribbon--h { top: calc(var(--lid) - 14px); height: 12px; left: -4px; right: -4px; background: linear-gradient(180deg, #A8854C, #F1DDAE 45%, #C9A66D 60%, #9C7A43); }
.box__bow { position: absolute; z-index: 4; left: 28%; top: -1.9rem; width: 5.2rem; height: 3.2rem; transform: translateX(-50%); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .4)); }
.box__orn {
  position: absolute; z-index: 3; width: clamp(1.25rem, 17cqmin, 2.4rem); height: clamp(1.25rem, 17cqmin, 2.4rem);
  color: var(--gold); opacity: .95; transition: opacity .4s;
}
.box__orn--tl { left: 10%; top: calc(var(--lid) + 9%); }
.box__orn--tr { right: 10%; top: calc(var(--lid) + 9%); }
.box__orn--br { right: 9%; bottom: 9%; }
.box__orn--bl { left: 9%; bottom: 9%; }

.door__plate {
  position: absolute; z-index: 3; left: 50%; top: 58%;
  transform: translate(-50%, -50%);
  font: italic 500 3rem/1 var(--serif);
  font-size: clamp(2.2rem, 52cqmin, 7.5rem);
  white-space: nowrap;
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 10px rgba(255, 230, 170, .18));
  transition: opacity .4s, transform .6s var(--ease), font-size .4s, top .4s;
}
.box__seal {
  position: absolute; z-index: 4; right: .6rem; top: calc(var(--lid) + .55rem);
  display: none; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F4E2B5, #C9A66D 45%, #8E6D3A);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(255, 255, 255, .12);
  color: var(--plum-deep);
}
.box__seal svg { width: 1rem; height: 1rem; }
.door__meta {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: .7rem;
  display: none; text-align: center;
  font: 600 .66rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: rgba(248, 243, 235, .7);
}

/* States */
.door.is-locked { cursor: default; }
.door.is-locked .door__frame, .door.is-locked .box__lid { filter: saturate(.85) brightness(.84); }
.door.is-locked .door__plate { opacity: .58; }
.door.is-locked .door__meta { display: block; }

.door.is-opened .box__lid { transform: translateY(-14px) rotate(-6deg); }
.door.is-opened .box__inside { opacity: 1; }
.door.is-opened .box__gift { transform: none; opacity: 1; }
.door.is-opened .box__orn { opacity: 0; }
.door.is-opened .door__plate { top: 83%; font-size: clamp(1.5rem, 26cqmin, 2.8rem); }

.door.is-done .box__seal { display: grid; }

.door.is-today .door__frame { animation: glow 4.5s ease-in-out infinite alternate; }
.door.is-today:not(.is-opened) .box__ribbon, .door.is-today:not(.is-opened) .box__bow { display: block; }
.door.is-today:not(.is-opened) .door__plate { left: 64%; top: 55%; }
.door.is-today:not(.is-opened) .box__orn { display: none; }
.door.is-today .door__meta {
  display: block; left: auto; right: -.5rem; bottom: 1.2rem;
  padding: .45rem .7rem .45rem 1rem; transform: rotate(-6deg);
  background: var(--ivory); color: var(--burgundy); letter-spacing: .14em;
  clip-path: polygon(.5rem 0, 100% 0, 100% 100%, .5rem 100%, 0 50%);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5));
}
.door.is-today.is-opened .door__meta { bottom: auto; top: calc(var(--lid) + .6rem); }
.door.is-today.is-done .box__seal { top: auto; bottom: .6rem; }
@keyframes glow {
  from { box-shadow: 0 0 0 1px rgba(241, 221, 174, .35), 0 0 30px -6px rgba(241, 221, 174, .35), 0 18px 30px -16px rgba(10, 4, 10, .75); }
  to   { box-shadow: 0 0 0 1px rgba(241, 221, 174, .55), 0 0 52px -4px rgba(241, 221, 174, .6), 0 18px 30px -16px rgba(10, 4, 10, .75); }
}

@media (hover: hover) {
  .door:not(.is-locked):hover { transform: translateY(-4px); }
  .door:not(.is-locked):not(.is-opened):not(.is-today):hover .box__lid { transform: translateY(-5px); }
  .door.is-opened:not(.is-locked):hover .box__lid { transform: translateY(-20px) rotate(-9deg); }
}
.door.is-opening .box__lid { transform: translateY(-70%) rotate(-16deg); opacity: 0; }
.door.is-opening .box__ribbon, .door.is-opening .box__bow { display: none; }
.door.is-opening .box__inside { opacity: 1; }
.door.is-opening .box__gift { transform: scale(1.08); opacity: 1; }
.door.is-opening .door__plate, .door.is-opening .box__orn { opacity: 0; }
.door:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 5px; }

/* ---------- Tablet / desktop: composed gift piles ---------- */
@media (min-width: 40rem) {
  .pile__boxes {
    --row: 3.6rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(6, var(--row));
    grid-auto-flow: row;
    gap: .9rem .85rem;
  }
  .door { grid-column: var(--gc); grid-row: var(--gr); min-height: 0; }
  .pile__deco {
    grid-column: var(--gc); grid-row: var(--gr);
    display: flex; align-items: flex-end; justify-content: center; gap: .6rem; pointer-events: none;
  }
  .deco-candle { width: 2rem; height: 5.4rem; filter: drop-shadow(0 0 16px rgba(246, 223, 168, .6)); }
  .deco-candle--sm { width: 1.5rem; height: 4rem; }
  .deco-bauble { width: 2.8rem; height: 3.6rem; }
  .deco-gift { width: 3.6rem; height: 3.6rem; margin-bottom: -.3rem; }
}
@media (min-width: 72rem) {
  .piles { grid-template-columns: 1fr 1fr; gap: 3.5rem 2.75rem; }
  .pile__boxes { --row: 3.2rem; }
  .pile:nth-child(even) { margin-top: 3rem; }
}

.giftroom__floor {
  position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 1.1rem;
  margin-top: 2.5rem; padding-bottom: .5rem;
  border-bottom: 1px solid rgba(201, 166, 109, .25);
}
.floor-candle { width: 1.6rem; height: 4.2rem; filter: drop-shadow(0 0 14px rgba(246, 223, 168, .55)); }
.floor-candle--sm { width: 1.2rem; height: 3.2rem; }
.floor-bauble { width: 2.4rem; height: 3.1rem; }
.floor-bauble--sm { width: 1.8rem; height: 2.3rem; }
.floor-gift { width: 3.6rem; height: 3.6rem; }

/* ---------- Testimonials ---------- */
.testimonials { max-width: 60rem; margin: 0 auto; padding: 0 var(--gutter) 4rem; text-align: center; }
.testimonials h2 { font: 500 2rem/1.15 var(--serif); margin: 0 0 1.5rem; }
.testimonials__grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.testimonial {
  margin: 0; padding: 1rem; border: 1px solid rgba(201, 166, 109, .35); border-radius: 16px;
  background: rgba(35, 20, 33, .35); text-align: left;
}
.testimonial video { width: 100%; border-radius: 10px; display: block; background: #000; }
.testimonial figcaption { margin-top: .6rem; font: italic 500 1.15rem/1.3 var(--serif); }
.testimonial--placeholder {
  display: grid; place-items: center; min-height: 11rem; text-align: center;
  border-style: dashed; color: var(--rose-light); font-size: .9rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 3rem var(--gutter) 3.5rem; text-align: center;
  background: rgba(35, 20, 33, .55); border-top: 1px solid rgba(201, 166, 109, .25);
  color: var(--rose-light);
}
.footer-star { width: 1.1rem; height: 1.1rem; color: var(--gold); }
.wordmark--footer { display: block; padding: .6rem 0 0; margin: 0; }
.footer-health { max-width: 40rem; margin: 1.25rem auto; font-size: .9rem; }
.footer-links { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.25rem; }
.footer-links a, .footer-links button {
  display: inline-flex; align-items: center; min-height: 44px;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ivory); font-size: .9rem; text-decoration: underline; text-decoration-color: rgba(201, 166, 109, .7); text-underline-offset: .3em;
}
.footer-copy { margin: 1rem 0 0; font-size: .8rem; }
.footer-aff { font-size: .72rem; color: var(--rose-light); margin-left: .25rem; }

/* =====================================================================
   Sheets (dialogs)
   ===================================================================== */
.sheet {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
  color-scheme: light;
  box-shadow: inset 0 0 0 9px var(--paper), inset 0 0 0 10px rgba(201, 166, 109, .55);
}
.sheet::backdrop { background: rgba(28, 15, 26, .74); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheet-in .38s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (min-width: 48rem) {
  .sheet {
    width: min(100% - 3rem, 46rem); height: auto; max-height: calc(100% - 3rem);
    margin: auto; border-radius: 1.25rem;
    box-shadow: inset 0 0 0 10px var(--paper), inset 0 0 0 11px rgba(201, 166, 109, .6), 0 40px 90px -30px rgba(0, 0, 0, .7);
  }
  .sheet--wide { width: min(100% - 3rem, 56rem); }
}

.sheet__bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .5rem .75rem .5rem 1.25rem;
  background: rgba(255, 252, 247, .94); backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(201, 166, 109, .45);
  margin: 11px 11px 0;
}
.sheet__bar-label { font: 600 .7rem/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); }
.icon-btn {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 .6rem;
  border: 0; border-radius: 10px; background: none; cursor: pointer; color: var(--plum);
  font: 500 .9rem/1 var(--sans);
}
.icon-btn:hover { background: var(--rose-tint); }
.icon-btn svg { width: 1.1rem; height: 1.1rem; }

.sheet__body { padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 5vw, 3.5rem) 2.5rem; }
.sheet h2, .sheet h3 { font-family: var(--serif); color: var(--plum); text-wrap: balance; }
.sheet h2 { margin: 0; font-weight: 500; color: var(--burgundy); font-size: clamp(2rem, 1.6rem + 2vw, 2.8rem); line-height: 1.08; }
.sheet h3 { margin: 0 0 .6rem; font-weight: 600; font-size: 1.4rem; line-height: 1.2; }
.sheet p { margin: 0 0 1rem; max-width: 38rem; }
.sheet .eyebrow { color: var(--gold-ink); }
.sheet .lead { font-size: 1.1rem; }
.muted { color: var(--muted); font-size: .9rem; }

/* Day header */
.day-head { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1.25rem; align-items: end; margin-bottom: 2rem; }
.day-num {
  grid-row: span 2;
  font: italic 500 clamp(3.6rem, 3rem + 3vw, 5.2rem)/.9 var(--serif); color: var(--gold-ink);
  background: var(--foil-ink); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-right: 1.25rem; border-right: 1px solid var(--gold);
}
.day-head .eyebrow { margin: 0; }
.rule { width: 3.5rem; height: 1px; border: 0; background: var(--gold); margin: 2.25rem 0; opacity: .8; }

.block { margin: 0 0 2.25rem; }
.block > .eyebrow { margin-bottom: .6rem; }
.story > p:first-child:not(:has(> strong:first-child))::first-letter {
  float: left; font: 500 3.4rem/.8 var(--serif); color: var(--burgundy); padding: .3rem .5rem 0 0;
}
.story p:not(.eyebrow):not(.missing) { font: 400 1.22rem/1.6 var(--serif); color: var(--ink); }

.ritual {
  position: relative; padding: 1.5rem 1.5rem 1.25rem; border-radius: 16px;
  background: linear-gradient(135deg, rgba(47, 74, 64, .09), rgba(113, 61, 81, .05)), var(--paper);
  border: 1px solid rgba(201, 166, 109, .55);
}
.ritual::after { /* small gold holly in the corner */
  content: ""; position: absolute; right: .9rem; top: .8rem; width: 1.8rem; height: 1.8rem; opacity: .85;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23B8935A' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M6 34C14 26 22 16 34 6'/%3E%3Cpath d='M11 29l-4-7M11 29l7 1M16 24l-3-8M16 24l8 1M21 19l-2-8M21 19l8 0M26 14l-1-7M26 14l7-1'/%3E%3C/g%3E%3Ccircle cx='13' cy='34' r='2.2' fill='%23713D51'/%3E%3Ccircle cx='17' cy='35.5' r='2.2' fill='%23713D51'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ritual .eyebrow { color: var(--sage-deep); }
.ritual__time {
  display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .6rem;
  font: 600 .78rem/1 var(--sans); letter-spacing: .08em; color: var(--sage-deep);
}
.ritual ol { margin: 0 0 .5rem; padding-left: 1.3rem; }
.ritual li { margin-bottom: .4rem; }

.question {
  margin: 0 0 1.25rem; padding-left: 1.25rem; border-left: 2px solid var(--rose);
  font: italic 500 clamp(1.35rem, 1.2rem + .7vw, 1.7rem)/1.3 var(--serif); color: var(--plum);
}

/* Missing content placeholder */
.missing {
  display: block; margin: 0 0 1rem; padding: .85rem 1rem; border-radius: 10px;
  border: 1.5px dashed #B0472F; background: #FFF1EA; color: #7A2A15;
  font: 600 .85rem/1.45 var(--sans); font-style: normal;
}
.missing::before { content: "⚠︎ "; }
.draft-flag {
  display: inline-block; margin: 0 0 .5rem; padding: .2rem .5rem; border-radius: 6px;
  background: #FFF1D6; color: #6B4A0E; font: 600 .7rem/1.3 var(--sans); letter-spacing: .06em;
}

/* Diary form */
.diary {
  padding: 1.5rem; border-radius: 16px; background: var(--ivory); border: 1px solid var(--line);
}
.field { margin: 0 0 1.25rem; }
.field > label, .field > legend, .label {
  display: block; margin: 0 0 .45rem; font: 600 .92rem/1.4 var(--sans); color: var(--ink);
}
.hint { display: block; font-weight: 400; font-size: .84rem; color: var(--muted); }
textarea, input[type="text"], select {
  width: 100%; min-height: 52px; padding: .8rem 1rem;
  border: 1px solid #D6C6B8; border-radius: 8px; background: #fff; color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
}
textarea { min-height: 9rem; resize: vertical; }
textarea:focus, input[type="text"]:focus, select:focus { border-color: var(--plum); outline: 2px solid var(--gold); outline-offset: 1px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

.rating { display: flex; flex-wrap: wrap; gap: .4rem; }
.rating label { position: relative; }
.rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating span {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid #D6C6B8; background: #fff; cursor: pointer;
  font: 600 .95rem/1 var(--sans); color: var(--plum);
  transition: background .2s, color .2s, border-color .2s;
}
.rating input:checked + span { background: var(--plum); border-color: var(--plum); color: var(--ivory); }
.rating input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.rating__scale { display: flex; justify-content: space-between; max-width: 31rem; margin-top: .35rem; font-size: .78rem; color: var(--muted); }
.linkish {
  background: none; border: 0; padding: .5rem 0; min-height: 44px; cursor: pointer;
  color: var(--plum); font-size: .88rem; text-decoration: underline; text-decoration-color: var(--gold-ink); text-underline-offset: .25em;
}

.check { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; padding: .35rem 0; }
.check input { width: 22px; height: 22px; margin-top: .1rem; flex: none; accent-color: var(--burgundy); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: .75rem 1.5rem; border: 1px solid transparent; border-radius: 10px;
  background: var(--burgundy); color: var(--ivory); cursor: pointer; text-decoration: none;
  font: 600 .98rem/1.2 var(--sans); letter-spacing: .02em; text-align: center;
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: #5E3043; }
.btn--ghost { background: transparent; color: var(--plum); border-color: #CDB9AE; }
.btn--ghost:hover { background: var(--rose-tint); }
.btn--gold { background: var(--foil); color: var(--plum-deep); border-color: transparent; }
.btn--gold:hover { background: var(--gold-soft); filter: brightness(1.04); }
.btn[aria-pressed="true"] { background: var(--sage-deep); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 1rem; height: 1rem; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
@media (max-width: 30rem) { .btn-row .btn { flex: 1 1 100%; } }
.save-status { min-height: 1.4rem; margin: .75rem 0 0; font-size: .88rem; color: var(--sage-deep); font-weight: 500; }

/* Recommendation */
.reco {
  position: relative; padding: 1.5rem; border-radius: 16px;
  background: linear-gradient(160deg, #FBF5EC, #F5EADF); border: 1px solid var(--line);
}
.reco + .reco { margin-top: 1rem; }
.reco h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.coupon {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 1rem;
  padding: .75rem; border: 1px dashed var(--gold-ink); border-radius: 10px; background: #fff;
}
.coupon__label { font-size: .82rem; color: var(--muted); width: 100%; }
.coupon code { font: 600 1.15rem/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .1em; color: var(--plum); padding: .4rem .2rem; user-select: all; }
.coupon .btn { min-height: 44px; padding: .5rem 1rem; }
.story strong { font-weight: 600; color: var(--burgundy); }
.ritual p, .ritual ol, .ritual ul { max-width: 38rem; }
.ritual p:last-child, .ritual ol:last-child { margin-bottom: 0; }
.ritual p { font-size: 1.05rem; }
.reco p { max-width: 38rem; }
.reco strong { color: var(--burgundy); font-weight: 600; }
.reco ul, .reco ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.reco li { margin-bottom: .3rem; }
.reco a:not(.btn) { color: var(--burgundy); }
.reco__cta { margin: 1.25rem 0 .25rem !important; }
.reco__cta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.reco__cta + .coupon { margin-top: 1rem; }
.reco--gift { background: linear-gradient(160deg, #FBF5EC, #F3E4E1); border-color: rgba(201, 166, 109, .6); }
.reco--gift em { font: italic 500 1.25rem/1.3 var(--serif); color: var(--burgundy); }

.day-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.day-health { margin-top: 2rem !important; font-size: .82rem; color: var(--muted); }

/* Onboarding */
.choices { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); margin: 1.5rem 0 1rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; gap: .75rem; min-height: 56px; padding: .75rem 1rem;
  border: 1px solid #D6C6B8; border-radius: 12px; background: #fff; cursor: pointer;
  font-weight: 500; transition: border-color .2s, background .2s;
}
.choice span::before {
  content: ""; flex: none; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 1.5px solid var(--gold-ink); background: #fff;
}
.choice input:checked + span { border-color: var(--burgundy); background: var(--rose-tint); }
.choice input:checked + span::before { background: var(--burgundy); border-color: var(--burgundy); box-shadow: inset 0 0 0 3px #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.choice input:disabled + span { opacity: .5; cursor: not-allowed; }

/* Journal + blueprint */
.notice {
  padding: 1rem 1.25rem; border-radius: 12px; background: var(--rose-tint); color: var(--ink);
  font-size: .9rem; border-left: 3px solid var(--burgundy); margin: 0 0 1.5rem;
}
.entry { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.entry h3 { font-size: 1.3rem; margin-bottom: .2rem; }
.entry__meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; font-size: .84rem; color: var(--muted); margin-bottom: .5rem; }
.entry__q { font: italic 500 1.1rem/1.4 var(--serif); color: var(--plum); margin-bottom: .4rem !important; }
.entry__text { white-space: pre-wrap; }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: var(--sage-tint); color: var(--sage-deep); font-weight: 600; font-size: .78rem; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.empty em { font-family: var(--serif); font-size: 1.2rem; color: var(--plum); display: block; margin-bottom: .3rem; }

.bp-section { margin: 0 0 2.25rem; }
.bp-section > h3 { display: flex; align-items: baseline; gap: .75rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.bp-section > h3 .num { font: italic 400 1.6rem/1 var(--serif); color: var(--gold-ink); }
.bp-list { margin: 0; padding-left: 1.2rem; }
.bp-list li { margin-bottom: .5rem; }
.planner { display: grid; gap: .5rem; }
.planner__row { display: grid; grid-template-columns: 5.5rem 1fr; gap: .75rem; align-items: center; }
.planner__row label { font-weight: 600; font-size: .9rem; }
.chart { margin: .5rem 0 1rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { font: 500 9px var(--sans); fill: var(--muted); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); z-index: 2000;
  transform: translate(-50%, 150%); opacity: 0;
  max-width: calc(100% - 2rem); padding: .85rem 1.25rem; border-radius: 12px;
  background: var(--plum-night); color: var(--ivory); border: 1px solid rgba(201, 166, 109, .5);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7); font-size: .92rem;
  transition: transform .35s var(--ease), opacity .35s;
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

.print-root { display: none; }
.noscript { padding: 2rem; text-align: center; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .door.is-opening .box__lid { transform: none; opacity: 1; }
}

/* ---------- Forced colours ---------- */
@media (forced-colors: active) {
  .door__frame { border: 2px solid CanvasText; }
  .door__plate { color: CanvasText; background: none; forced-color-adjust: none; }
  .door.is-locked { opacity: .6; }
}

/* =====================================================================
   Print – journal and blueprint
   ===================================================================== */
@media print {
  @page { margin: 18mm 16mm; }
  html, body { background: #fff !important; color: #2E2329 !important; }
  body > *:not(.print-root) { display: none !important; }
  dialog { display: none !important; }
  .print-root { display: block !important; font: 400 10.5pt/1.55 var(--sans); }
  .print-root h1 { font: 500 26pt/1.1 var(--serif); color: var(--plum); margin: 0 0 4pt; }
  .print-root h2 { font: 600 15pt/1.2 var(--serif); color: var(--plum); margin: 18pt 0 6pt; padding-bottom: 3pt; border-bottom: .5pt solid var(--gold); break-after: avoid; }
  .print-root h3 { font: 600 12pt/1.25 var(--serif); color: var(--plum); margin: 10pt 0 2pt; break-after: avoid; }
  .print-root .p-eyebrow { font: 600 7.5pt/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 6pt; }
  .print-root .p-sub { font: italic 500 13pt/1.3 var(--serif); color: var(--burgundy); margin: 0 0 12pt; }
  .print-root .p-entry { break-inside: avoid; padding: 6pt 0; border-bottom: .5pt solid #E6D9CE; }
  .print-root .p-q { font: italic 500 11pt/1.4 var(--serif); color: var(--plum); margin: 0 0 3pt; }
  .print-root .p-meta { font-size: 8.5pt; color: #6A5B62; margin: 0 0 3pt; }
  .print-root .p-text { white-space: pre-wrap; margin: 0; }
  .print-root .p-note { font-size: 8.5pt; color: #6A5B62; margin-top: 18pt; border-top: .5pt solid #E6D9CE; padding-top: 6pt; }
  .print-root table { width: 100%; border-collapse: collapse; }
  .print-root td, .print-root th { text-align: left; padding: 4pt 6pt; border-bottom: .5pt solid #E6D9CE; vertical-align: top; }
  .print-root .p-lines { height: 60pt; border-bottom: .5pt solid #E6D9CE; }
  .print-root .chart svg { width: 100%; max-height: 120pt; }
  .print-root .chart text { font: 500 7pt var(--sans); fill: #6A5B62; }
}


/* ---------- Resource library ---------- */
.lib__intro { color: var(--muted); max-width: 38rem; margin: .5rem 0 1.5rem; }
.lib__cat + .lib__cat { margin-top: 2rem; }
.lib__title { font-size: 1.45rem; color: var(--burgundy); margin: 0 0 .75rem; padding-bottom: .35rem; border-bottom: 1px solid rgba(201, 166, 109, .5); }
.lib__entry + .lib__entry { margin-top: 1rem; }
.lib__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: 0 0 .15rem; }
.lib__name { font: 600 1.25rem/1.25 var(--serif); color: var(--plum); }
.lib__days, .lib__day { font-size: .8rem; color: var(--muted); }
.lib__days { margin: 0 0 .6rem; }
.lib__items { margin: 0 0 .5rem; }
.lib__note { font-size: .85rem; color: var(--muted); margin: -.75rem 0 1.5rem; }
.lib__more { background: none; border: 0; padding: 0; font: inherit; color: var(--burgundy); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.lib__more:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; border-radius: 2px; }
