:root {
  color-scheme: dark;
  --paper: #101017;
  --cream: #1a1923;
  --ink: #e6e0dc;
  --muted: #b3a9b7;
  --purple: #d6bcf0;
  --lilac: #3c2c47;
  --line: #413746;
  --shadow: 0 12px 32px #05050a40;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
a { color: inherit; }
:focus-visible { outline: 3px solid #8f55ac; outline-offset: 3px; }
.wrap { width: min(1100px, calc(100% - 36px)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.masthead { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 750; text-decoration: none; }
.brand img { width: clamp(108px, 27vw, 148px); height: auto; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: 8px; }
button, select, input {
  min-height: 44px; padding: 7px 13px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--cream);
}
button:not(:disabled):hover, select:hover { border-color: #a38bab; }
.intro {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px;
  min-height: 176px; overflow: hidden; margin-bottom: 20px; padding: 28px 32px;
  border: 1px solid #3c334b; border-radius: 23px; background: linear-gradient(115deg, #241e33, #201b2b 60%, #191929);
}
.intro-copy { position: relative; z-index: 1; max-width: 520px; }
.campaign { color: var(--purple); font-size: .83rem; font-weight: 750; letter-spacing: .015em; margin-bottom: 8px; }
h1, .day-heading h2, .story-heading h3 { font-family: Georgia, Cambria, "Times New Roman", serif; }
h1 { font-size: clamp(2rem, 4.2vw, 2.7rem); line-height: 1.09; }
.intro-copy > p:last-child { margin-top: 10px; color: var(--muted); line-height: 1.45; }
.intro-art { position: absolute; inset: 0 0 0 auto; width: 26%; pointer-events: none; }
.celestial { position: absolute; right: 24%; top: 3%; color: #b493c9; line-height: 1; font-size: 8rem; transform: rotate(-18deg); }
.twinkle { position: absolute; color: #ac92bf; }
.twinkle.one { top: 23%; left: 14%; font-size: 1.3rem; }
.twinkle.two { top: 18%; right: 15%; font-size: 1.1rem; }
.twinkle.three { top: 60%; right: 14%; font-size: .8rem; }
.hills {
  position: absolute; right: -15%; bottom: -61%; width: 125%; height: 96%;
  border-radius: 60% 35% 0 0; transform: rotate(-11deg); background: #3a2b505e;
}
.layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(278px, 1fr); align-items: start; gap: 20px; padding-bottom: 34px; }
.day-card, .calendar { border: 1px solid var(--line); border-radius: 22px; background: var(--cream); box-shadow: var(--shadow); }
.day-card { overflow: hidden; scroll-margin-top: 10px; }
.day-heading {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center;
  gap: 10px; padding: 23px 22px 17px; text-align: center;
}
.icon-button { display: grid; place-content: center; width: 44px; height: 44px; padding: 0; font-size: 1.6rem; line-height: 1; }
.date { color: var(--purple); font-size: .86rem; font-weight: 700; line-height: 1.3; }
.day-heading h2 { margin-top: 3px; font-size: clamp(1.6rem, 3.5vw, 2.25rem); line-height: 1.1; overflow-wrap: anywhere; }
.child-caption { display: block; margin: 5px auto 0; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #15131e; margin: 0 20px 15px; padding: 4px; border-radius: 14px; }
.mode button { border: 0; background: transparent; font-weight: 650; }
.mode button[aria-selected="true"] { color: #e4cef6; background: #3c2c47; box-shadow: 0 2px 8px #08071040; }
.artwork { margin-inline: 20px; overflow: hidden; border-radius: 15px; border: 1px solid var(--line); background: #24202d; }
.artwork canvas { display: block; width: 100%; height: auto; aspect-ratio: 4/3; filter: brightness(.66); }
#painting { touch-action: none; cursor: crosshair; }
.tools, .palette, .art-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 20px 0; }
.tools button, .tools select { font-size: .88rem; }
.tools button[aria-pressed="true"] { border-color: #9f7bb4; background: var(--lilac); color: var(--purple); }
.swatch {
  display: grid; place-items: center; width: 38px; height: 38px; min-height: 38px;
  padding: 0; border-color: #b3a9b766; border-radius: 50%; background: var(--swatch); color: #22222a;
}
.swatch[aria-pressed="true"] { outline: 2px solid var(--purple); outline-offset: 2px; }
.color-extra { display: flex; align-items: center; gap: 8px; margin: 10px 20px 0; color: var(--muted); font-size: .84rem; }
#custom-color { width: 44px; min-height: 38px; padding: 4px; cursor: pointer; }
.art-actions { margin-bottom: 20px; color: var(--muted); }
.art-actions button, #today { background: none; font-size: .86rem; }
.story-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding: 3px 22px 13px; }
.story-heading h3 { font-size: clamp(1.48rem, 3vw, 2rem); overflow-wrap: anywhere; }
.story-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#speech-rate { min-width: 3.5rem; font-variant-numeric: tabular-nums; }
.readable { padding: 0 22px 24px; }
.primary { border-color: var(--purple); background: var(--purple); color: #251731; font-weight: 700; }
.primary:hover { background: #e1c6f8; }
#story-text { display: grid; gap: 12px; margin: 17px 0; line-height: 1.65; }
.speech-note { flex-basis: 100%; color: var(--muted); font-size: .88rem; }
.story-question { background: #292133; border-radius: 12px; padding: 14px 16px; }
.story-question h4 { margin-bottom: 4px; font-size: .88rem; color: var(--purple); }
.story-question p { line-height: 1.5; }
.pending { display: grid; min-height: 220px; place-content: center; justify-items: center; gap: 8px; padding: 28px; text-align: center; color: var(--muted); }
.pending span { font-size: 2.3rem; color: var(--purple); }
.calendar { padding: 18px; }
.calendar-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 10px; }
.calendar h2 { font-size: 1.05rem; }
.calendar select { width: 100%; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 12px; text-align: center; }
.weekday { padding: 4px 0; color: var(--muted); font-size: .72rem; font-weight: 650; }
.calendar-day { position: relative; min-width: 0; padding: 0; min-height: 40px; background: transparent; font-size: .9rem; font-variant-numeric: tabular-nums; }
.calendar-day.ready { background: #2b2237; }
.calendar-day.ready::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: currentColor; left: calc(50% - 2px); bottom: 4px; }
.calendar-day[aria-current="date"] { color: #251731; background: var(--purple); border-color: var(--purple); }
.calendar-note { margin-top: 12px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
dialog {
  width: min(430px, calc(100% - 32px)); padding: 22px; color: var(--ink); background: var(--cream);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 50px #2c163148;
}
dialog::backdrop { background: #080710b8; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.form-label { display: block; margin: 15px 0 5px; font-weight: 650; }
dialog input, dialog select { width: 100%; }
.settings-help { margin-top: 6px; color: var(--muted); font-size: .87rem; line-height: 1.45; }
.text-button { margin-top: 6px; color: var(--purple); }
#save-settings { width: 100%; margin-top: 17px; }
@media (max-width: 710px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wrap { width: calc(100% - 24px); }
  .intro { min-height: 148px; padding: 20px 18px; margin-bottom: 12px; }
  .intro-copy { max-width: calc(100% - 44px); }
  .intro-art { width: 30%; opacity: .52; }
  .celestial { font-size: 5.4rem; right: 5%; top: 16%; }
  .day-heading { padding: 18px 12px 14px; }
  .mode, .artwork, .tools, .palette, .art-actions, .color-extra { margin-inline: 12px; }
  .story-heading, .readable { padding-inline: 16px; }
}
@media (max-width: 360px) {
  .header-actions { gap: 5px; }
  .header-actions button, .header-actions select { padding-inline: 8px; font-size: .86rem; }
  .brand img { width: clamp(86px, 33vw, 112px); }
  .calendar { padding: 13px; }
}
.wix-embed-fit #settings { position: absolute; inset: 58px 0 auto; margin: 0 auto; }
