/* Strawberry cream, rose lights, and a quiet plum backdrop. */
:root {
  --pink-light: #ffe1ef;
  --pink-accent: #f5a6cc;
  --pink-muted: #e2b4ce;
  --pink-dark: #722643;
  --pink-paper: #fff0f6;
  --gold-light: var(--pink-light);
  --gold: var(--pink-accent);
  --gold-muted: var(--pink-muted);
  --gold-ink: var(--pink-dark);
  --gold-paper: var(--pink-paper);
  --ink: var(--pink-light);
  --muted: var(--pink-muted);
  --line: #f1a7d052;
}
body {
  background:
    radial-gradient(ellipse at 17% 20%, #752b5b55, transparent 44%),
    radial-gradient(ellipse at 79% 65%, #642c5a60, transparent 52%),
    radial-gradient(ellipse at 52% 40%, #3a1c36, #221222 59%, #180e1a 100%);
}
body .star-field { opacity: .75; }
.sky-star { background: #ffd5eb; box-shadow: 0 0 7px #f990cf70; }
.sweet-ornament {
  position: absolute;
  color: #ec95bb;
  font: clamp(15px, 1.8vw, 28px)/1 Georgia, serif;
  opacity: .51;
  transform: rotate(-13deg);
  text-shadow: 0 0 23px #f186c17a;
}
.sweet-ornament:nth-last-child(even) { color: #ffd9eb; transform: rotate(12deg); opacity: .4; }
.page-frame { border-color: #f1b0d134; }
.page-frame:before, footer { border-color: #efa0c729; }
.chapter-nav button i { background: #be7b9e; }
.chapter-nav button.current i { background: #ffa8d5; box-shadow: 0 0 12px #f49ac977; }
.chapter-nav > span { background: #edafd449; }
h1 { text-shadow: 0 0 45px #ee81bd47; }
.primary {
  color: #4e1730;
  background: linear-gradient(115deg, #ffd5e8, #ed98c2);
  border-color: #ffd8eba6;
  box-shadow: 0 6px 25px #ec74ad36, inset 0 1px 0 #fff1faab;
}
.primary:hover {
  background: linear-gradient(115deg, #ffe8f4, #f6abd0);
  box-shadow: 0 8px 30px #f779b549;
}

.calendar-card { border-color: #e7a6c3; box-shadow: 0 4px 0 #d998b6, 0 8px 0 #9c536f, 0 0 45px #f58dc52d; }
.calendar-top { color: #4c1831; background: linear-gradient(110deg, #f9c4dd, #e893ba); }
.calendar-day-number, .calendar-grid .birthday-day { color: #893455; }
.calendar-bottom { border-color: #d68eaf; }
.birthday-circle path { stroke: #b7437b; }
.calendar-page-front:after { border-color: #eda4c95d; background: linear-gradient(180deg, #a9487426, transparent 15%, transparent 76%, #efb6d230); }
.calendar-page-back { border-color: #e1adc5; background: linear-gradient(180deg, #ead0db, #fff1f7 14%, #f8dce9 93%, #dbaac2); }
.calendar-page-shade { background: linear-gradient(105deg, #69314e, transparent 78%); }
.calendar-pin { border-color: #9f466e; background: radial-gradient(circle at 36% 29%, #fff1f8, #e595ba 41%, #a75a7f 78%); }
.calendar-pin::after { border-bottom-color: #85405f9a; }

.polaroid { box-shadow: 0 0 50px #f18abd20, 0 15px 30px #0003; }
.back-photo { background: #b8799d; border-color: #ebb6d5; box-shadow: 0 0 40px #e989c128; }
.tape { background: #f3add0a6; }
.demo-label, .text-button { border-color: #e890b984; }
.round { background: #e698bf20; }
.month-nav button.selected { background: #e080ae42; border-color: #e9a1c77f; }

.envelope { background: #d68daf; border-color: #edaacb; box-shadow: 0 0 60px #f497c52b, 0 20px 50px #0004; }
.envelope:before { background: #ecb2cc; }
.envelope:after { background: #f8d4e5; }
.envelope-flap { background: #ffe2ef; }
.seal { color: #ffe8f2; background: #a74d76; border-color: #e69abd; }
.letter-paper {
  color: #57263d;
  border-color: #e5afcb;
  background-image: repeating-linear-gradient(transparent 0 35px, #c76f982e 35px 36px);
  box-shadow: 0 0 65px #e996c12e, 0 15px 45px #0003;
}
.paper-flower { color: #b85988; }

#cake .cake-heading .eyebrow { color: var(--pink-muted); }
#cake .cake-tool { border-color: #e891bd57; background: #321931d9; color: var(--pink-light); }
#cake .cake-tool:hover:not(:disabled) { background: #65304eae; border-color: #f3acd4ab; }
#cake .cake-tool-primary { color: #4e1730; background: linear-gradient(115deg, #ffd2e8, #e997c1); border-color: #f8bbdba6; }
#cake .cake-tool-primary:hover:not(:disabled) { background: linear-gradient(115deg, #ffe7f3, #f3a8cf); }
#cake .cake-stage .doodle { color: #f7afd2; text-shadow: 0 0 22px #f27bb64f; }
#cake .cake-stage .d4 { right: 13%; top: 32%; font-size: 25px; }
#cake .cake-stage .d5 { left: 20%; top: 65%; font-size: 18px; }
#cake .cake-caption { color: var(--pink-light); }
#cake .cake3d-viewport::before {
  background: radial-gradient(ellipse at 50% 56%, #f6abd17a, #ca65a039 29%, #ac468319 48%, transparent 72%);
}
#cake .cake-stage:fullscreen, #cake .cake-stage.is-immersive {
  background: radial-gradient(ellipse at 53% 46%, #4b2346, #291629 56%, #180e1a 92%);
}
#cake .cake-photo-peek { background: #32172deF; border-color: #e599bf88; }
#cake #cake-photo-text, #cake #cake-photo-open, #cake #cake-photo-close { color: var(--pink-light); }
@media (max-width: 700px) {
  #cake .cake-stage .d4 { right: 5%; top: 43%; font-size: 19px; }
  #cake .cake-stage .d5 { left: 7%; top: 62%; font-size: 14px; }
  .calendar-sticker { background: #522139ee; color: var(--pink-light); border-color: #f0a6cf68; }
}

/* Keep the desktop opening in one view, with a centered stage and controls
   framed by the wider header and chapter navigation. */
@media (min-width: 900px) {
  .page-frame:has(#cake:not([hidden])) {
    height: max(464px, calc(100svh - 24px));
    min-height: 0;
    margin-block: 12px;
  }
  .page-frame:has(#cake:not([hidden])) > header {
    height: clamp(49px, 8svh, 76px);
    flex-shrink: 0;
  }
  .page-frame:has(#cake:not([hidden])) > main { min-height: 0; }
  .page-frame:has(#cake:not([hidden])) > footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    min-height: clamp(45px, 7svh, 64px);
    flex-shrink: 0;
  }
  .page-frame:has(#cake:not([hidden])) .footer-heart { justify-self: end; }
  #cake:not([hidden]) {
    --cake-composition-width: min(100%, clamp(730px, 64vw, 1220px));
    display: grid;
    grid-template-rows: 0 minmax(0, 1fr) auto;
    height: 100%;
    padding-block: clamp(16px, 4.7svh, 42px) clamp(12px, 3.4svh, 32px);
  }
  #cake .cake-heading {
    width: var(--cake-composition-width);
    height: 0;
    pointer-events: none;
  }
  #cake .cake-heading .eyebrow {
    margin-bottom: 6px;
    font-size: 10px;
  }
  #cake .cake-heading h1 {
    max-width: max-content;
    font-size: clamp(35px, min(4.3vw, 7svh), 64px);
  }
  #cake .cake-title-first-line {
    display: block;
  }
  #cake .cake-heading .intro {
    max-width: 210px;
    margin-top: 8px;
    font-size: 13px;
  }
  #cake .cake-stage:not(:fullscreen):not(.is-immersive) {
    width: var(--cake-composition-width);
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    row-gap: clamp(7px, 2svh, 18px);
    margin-bottom: clamp(10px, 2.2svh, 19px);
  }
  #cake .cake-stage:not(:fullscreen):not(.is-immersive) .cake-art {
    grid-row: 1 / 2;
    height: 100%;
  }
  #cake .cake-stage:not(:fullscreen):not(.is-immersive) .d1 {
    top: max(35%, clamp(163px, 24svh, 198px));
  }
  #cake .cake-stage-top { top: clamp(8px, 2svh, 18px); }
  #cake .cake-stage-bottom { gap: 5px; }
  #cake .cake-caption { font-size: clamp(17px, 2.6svh, 22px); }
  #cake .cake-controls .cake-tool {
    min-height: 32px;
    padding-block: 5px;
  }
  #cake .cake-start-group { gap: 7px; }
  #cake #start {
    min-height: 42px;
    min-width: 190px;
    padding: 8px 18px;
    font-size: 14px;
  }
}
