:root {
  color-scheme: dark;
  --black: #050506;
  --surface: #101012;
  --text: #f4f3ef;
  --muted: #b7b4ae;
  --line: #383632;
  --warm: #ffdda7;
  font-family: "Aptos", "Segoe UI Variable Text", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--black); color: var(--text); line-height: 1.5; }
h1,h2,h3,p { margin: 0; }
a { color: var(--warm); text-underline-offset: .2em; }
button,select,input { font: inherit; }
button,select,input,.subtle { border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); color: var(--text); min-height: 48px; padding: .65rem .9rem; }
button { cursor: pointer; }
button:hover:not(:disabled), .subtle:hover { border-color: #ad8e66; }
button:disabled { opacity: .38; cursor: default; }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; }
h1:focus,h2:focus { outline: none; }
.primary { background: #f4dfbc; color: #1c140b; border-color: var(--warm); font-weight: 680; box-shadow: 0 0 24px #ffbc6429; }
.primary:hover:not(:disabled) { background: #fff0d4; }
.accent,.wordmark span { color: var(--warm); }
.subtle { display: inline-flex; align-items: center; justify-content: center; justify-self: start; border-color: transparent; background: transparent; color: var(--muted); text-decoration: none; }
.skip { position: fixed; z-index: 3; top: -5rem; left: 1rem; padding: .65rem; background: var(--black); }
.skip:focus { top: 1rem; }

.scenery { position: fixed; inset: 0; pointer-events: none; background: linear-gradient(90deg,#0606079e,transparent 85%), url("/sunrise.jpg") center / cover no-repeat; opacity: .46; }
body:has(#home:not([hidden])) .scenery { opacity: 1; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px) scale(.992); } to { opacity: 1; transform: none; } }
@keyframes heartbeat { 0%,100% { opacity: .9; } 40%,64% { opacity: 1; text-shadow: 0 0 32px #ffcf853e; } }

.frame { position: relative; width: min(100% - 2rem, 29rem); min-height: 100svh; margin-inline: auto; display: grid; grid-template-rows: auto 1fr auto; align-items: center; }
.bar { grid-row: 1; display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: max(.35rem, env(safe-area-inset-top)) 0 0; font-weight: 700; }
.bar .subtle { padding-inline: .55rem; }
.screen { grid-row: 2; display: grid; align-content: center; gap: .7rem; padding-block: 1.25rem; animation: reveal .29s ease-out both; }
.screen h2 { font-size: clamp(1.9rem, 6.5vw, 2.55rem); letter-spacing: -.045em; line-height: 1.12; }
.frame:has(#home:not([hidden])) { width: min(100% - 5rem, 86rem); }
.home { min-height: 100svh; grid-template-rows: auto 1fr auto; gap: 1.15rem; padding-block: 1.1rem; }
.home-bar,.home-support { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.wordmark { font-size: clamp(1.35rem,2.7vw,1.85rem); font-weight: 790; letter-spacing: -.06em; }
.help-link,.text-action { background: transparent; border: 0; border-radius: .5rem; font-weight: 680; }
.help-link { color: var(--warm); background: #1c1714dd; }
.text-action { text-decoration: underline; text-decoration-color: #b3aaa389; text-underline-offset: .24em; padding-inline: .2rem; }
.help-link:hover,.text-action:hover { color: #fff0d4; }
.hero-content { align-self: center; display: grid; justify-items: start; width: min(100%,47rem); }
.home h1 { max-width: 15ch; font-family: "Aptos Display", "Segoe UI Variable Display", system-ui, sans-serif; font-size: clamp(3.25rem, 6.7vw, 7.3rem); font-weight: 770; line-height: .98; letter-spacing: -.075em; text-wrap: balance; margin-bottom: .82rem; }
.home h1 em { font-style: normal; color: var(--warm); }
.hero-line,.hero-close { font-size: clamp(1rem,1.55vw,1.2rem); }
.hero-line,.hero-close { color: #e3ddd3; }
.hero-close { max-width: 54ch; margin-top: .65rem; }
.digits.hero-digits { width: min(100%, 39rem); gap: .4rem; margin: .8rem 0 .64rem; }
.digits div { border-bottom: 0; }
.digits.hero-digits strong { color: #fff0d6; font-family: "Aptos Display","Segoe UI Variable Display",system-ui,sans-serif; font-size: clamp(2.75rem, 7vw, 6rem); font-weight: 760; line-height: .96; }
.digits.hero-digits span { color: #ded6ca; font-size: clamp(.9rem,1.4vw,1.05rem); }
.hero-digits[data-waiting] strong { animation: heartbeat 4.8s ease-in-out infinite; }
.hero-digits[data-waiting] div:nth-child(2) strong { animation-delay: .14s; }
.hero-digits[data-waiting] div:nth-child(3) strong { animation-delay: .28s; }
.hero-digits[data-waiting] div:nth-child(4) strong { animation-delay: .42s; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .8rem; }
.hero-actions .hero-line { margin-block: .4rem; }
.home-support { justify-content: flex-start; gap: .25rem 1.2rem; }
.intro,.secondary,.kicker,.pager span,.card time { color: var(--muted); }
.secondary { font-size: .875rem; }
.kicker { font-size: .875rem; }
.menu { display: grid; gap: .55rem; }
.menu button { text-align: left; min-height: 52px; }
form { display: grid; gap: .55rem; }
form label,.screen > label { font-size: .9rem; color: var(--muted); }
input,select { width: 100%; }
form .primary { margin-top: .2rem; }
.digits { display: grid; grid-template-columns: 1.25fr repeat(3,1fr); gap: .3rem; margin-block: .35rem; }
.digits div { text-align: center; padding-bottom: .35rem; }
.digits strong { display: block; font-size: clamp(1.75rem, 7vw, 3.1rem); color: var(--warm); line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.06em; text-shadow: 0 0 16px #ffb6512d; }
.digits span { color: var(--muted); font-size: .85rem; }
.journey-note { max-width: 37ch; }
#since:empty { display: none; }
.card,.withdrawal { border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); padding: .85rem; }
.card h3 { margin-bottom: .2rem; font-size: 1.14rem; }
.card p + p,.card p + a,.withdrawal p + p { margin-top: .4rem; }
.card a,.resource-links a { display: inline-block; padding-block: .35rem; }
.resource-links { display: grid; gap: .15rem; justify-items: start; }
.resource-links a[href^="tel:"] { font-size: 1.2rem; }
.single-card { list-style: none; padding: 0; margin: 0; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: center; }
.pager button { padding-inline: .5rem; }
.pager span { font-size: .85rem; }
.emergency { color: var(--warm); }
.emergency a { font-weight: 700; }
.status { color: var(--warm); font-size: .875rem; }
#privacy-button { padding-inline: .15rem; min-height: 44px; font-size: .875rem; }
dialog { width: min(100% - 2rem, 29rem); max-height: calc(100dvh - 2rem); overflow: auto; border: 1px solid var(--line); border-radius: 1rem; background: #111011; color: var(--text); padding: 1rem; }
dialog::backdrop { background: #050506d9; }
dialog[open] { animation: reveal .23s ease-out both; }
dialog p { margin: .65rem 0; }
.dialog-heading,.link-row { display: flex; gap: .5rem; justify-content: space-between; align-items: center; }
.dialog-heading h2 { font-size: 1.3rem; }
.link-row input { min-width: 0; flex: 1; }
#edit-link-section { margin-top: .9rem; }
@media (max-width: 700px) {
  .frame:has(#home:not([hidden])) { width: min(100% - 2rem, 36rem); }
  .scenery { background-position: 58% center; }
  .home { gap: .6rem; padding-block: .55rem; }
  .home h1 { font-size: clamp(2.5rem, 9.6vw, 4rem); margin-bottom: .55rem; }
  .digits.hero-digits { max-width: 29rem; margin-top: .65rem; }
  .digits.hero-digits strong { font-size: clamp(2.2rem, 10.6vw, 4rem); }
  .home-support { gap: 0 .9rem; }
}
@media (max-height: 670px) { .screen { padding-block: .55rem; gap: .5rem; } .home h1 { font-size: clamp(2.45rem, 7.2vw, 5.25rem); } }
.digits strong:is([data-digits="4"],[data-digits="5"]) { font-size: clamp(1rem, 4.7vw, 3rem); align-content: end; min-height: 1.1em; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; } }

html:has(#home:not([hidden])) { scroll-snap-type: y proximity; scroll-behavior: smooth; }
.frame:has(#home:not([hidden])) { display: block; width: 100%; }
.home,.home-fold {
  min-height: 100svh;
  scroll-snap-align: start;
  padding: clamp(1rem,3vw,2.5rem) max(1.1rem,calc((100% - 78rem) / 2));
  display: grid;
  position: relative;
}
.home { grid-template-rows: auto 1fr auto; gap: .6rem; }
.home-fold { grid-template-rows: 1fr auto; align-items: center; }
.home-fold.horizon { background: linear-gradient(115deg,#100d10f2,#211710d9); }
.home-fold.support-fold { background: linear-gradient(130deg,#08090e,#12151b); }
.hero-content,.fold-content { width: min(100%,48rem); }
.fold-content { padding-block: 1.25rem; }
.home h1,.fold-content h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .99;
  font-size: clamp(2.85rem,7.1vw,7.15rem);
  text-wrap: balance;
}
.home h1 { max-width: 13ch; }
.fold-content h2 { max-width: 13ch; margin-bottom: 1rem; }
.hero-line { max-width: 37ch; font-size: clamp(1rem,2vw,1.3rem); }
.home-bar .help-link { background: #161318dc; color: #fff3e2; }
.scroll-cue {
  display: grid; place-items: center; justify-self: center;
  width: 48px; height: 48px; border-radius: 50%; color: var(--warm);
  background: radial-gradient(circle,#eeb57328,transparent 72%);
  animation: cue-glow 3.6s ease-in-out infinite alternate;
}
.scroll-cue span { width: 13px; height: 13px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.scroll-cue.up span { transform: translateY(3px) rotate(225deg); }
@keyframes cue-glow { from { opacity: .6; } to { opacity: 1; filter: drop-shadow(0 0 7px #ffbe77); } }
.digits { --digit-size: clamp(1.75rem,7vw,3.1rem); }
.digits.hero-digits { --digit-size: clamp(2.35rem,9vw,6.4rem); margin-block: .8rem; gap: .62rem; }
.digits > div { position: relative; min-width: 0; }
.digits > div + div::before {
  content: ":"; position: absolute; left: -.32rem; top: 0;
  transform: translateX(-50%); font-size: calc(var(--digit-size) * .67);
  color: #ffddae; line-height: calc(var(--digit-size) * .96); opacity: .78;
}
.digits.hero-digits strong {
  font-family: Bahnschrift, "Arial Narrow", system-ui, sans-serif; font-size: var(--digit-size);
  letter-spacing: -.055em; position: relative; isolation: isolate;
}
.digits.hero-digits strong::before {
  content: ""; position: absolute; z-index: -1; inset: -17% -7%;
  background: radial-gradient(ellipse,#ed984d78,transparent 69%); opacity: .35;
}
.hero-digits[data-waiting] strong { animation: digit-breathe 3.8s ease-in-out infinite; }
.hero-digits[data-waiting] strong::before { animation: backlight 3.8s ease-in-out infinite; animation-delay: inherit; }
@keyframes digit-breathe { 0%,100% { opacity: .78; text-shadow: 0 0 7px #ffd8a649; } 49% { opacity: 1; text-shadow: 0 0 22px #ffbd80af; } }
@keyframes backlight { 0%,100% { opacity: .18; } 49% { opacity: 1; } }
.hero-digits strong:is([data-digits="4"],[data-digits="5"]) { font-size: clamp(1rem,4vw,3.5rem); min-height: var(--digit-size); align-content: center; }
.home-support { margin-top: 1.2rem; }
@media (max-width: 700px) {
  .frame:has(#home:not([hidden])) { width: 100%; }
  .home h1,.fold-content h2 { font-size: clamp(2.6rem,11.5vw,4.3rem); }
  .home { padding-top: .55rem; }
  .home-support { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html:has(#home:not([hidden])) { scroll-behavior: auto; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.home {
  grid-template-rows: auto 1fr auto;
  gap: clamp(.7rem, 2.8vh, 2.5rem);
  background: linear-gradient(90deg, #15120deb 4%, #1915109c 58%, #17151042);
  padding-bottom: clamp(.65rem, 2.2vh, 1.6rem);
}
.home-bar { align-self: start; padding-bottom: .85rem; border-bottom: 1px solid #e9d9c33d; }
.wordmark { text-decoration: none; color: var(--text); }
.home-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem clamp(.5rem, 1.8vw, 1.5rem); }
.home-nav button {
  display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .2rem;
  background: transparent; border: 0; color: #f1e9db; text-decoration: none; font-weight: 600;
}
.home-nav button:not(.help-link):hover { color: var(--warm); text-decoration: underline; text-underline-offset: .25em; }
.home-bar .home-nav .help-link { background: #3a2920; color: #ffe7c0; border: 1px solid #c099735e; padding-inline: .8rem; }
.home-bar .home-nav .help-link:hover { background: #403023; }
.timer-hero { align-self: start; width: min(100%, 55rem); }
.home .timer-hero h1 { max-width: 15ch; font-size: clamp(2.6rem, 9.4vw, 6.1rem); letter-spacing: -.055em; margin-bottom: .6rem; }
.timer-hero .hero-line { max-width: 54ch; }
.timer-hero .timer-intro { margin-bottom: .75rem; }
.timer-hero .hero-digits { width: min(100%, 40rem); margin-block: .25rem .6rem; }
#home-setup { width: min(100%, 27rem); }
#start-now { width: 100%; min-height: 54px; font-size: 1.05rem; }
.past-start { display: grid; gap: .45rem; width: min(100%, 27rem); margin-top: .95rem; }
.past-start label { color: #f0e0cb; font-size: 1rem; }
.past-start label strong { color: #fff1d7; }
.past-start input { min-width: 0; max-width: 100%; background: #211c17; border-color: #a1886a; }
.past-start input[aria-invalid="true"] { border-color: #f7ad86; }
.timer-hero .status { margin-top: .35rem; }
.home-footer { display: flex; justify-content: center; }
.reminder-offer {
  display: grid; justify-items: start; gap: .55rem; width: min(100%, 30rem); margin-top: 1.1rem;
  padding: 1rem; border: 1px solid #a47f596b; border-radius: 1rem; background: #231c16;
  animation: reminder-reveal .65s ease-out both;
}
.timer-hero .reminder-offer h2 { color: #fff0d8; font: 400 1.55rem / 1.15 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.reminder-offer p { font-size: 1rem; color: #e9d7c1; }
.reminder-offer button { margin-top: .25rem; border-color: #c4996c; background: #34261b; color: #ffebca; font-weight: 650; }
.reminder-offer button:hover { background: #453121; }
@keyframes reminder-reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.scroll-cue.journey-cue {
  width: auto; min-height: 44px; height: auto; display: inline-flex; gap: .65rem;
  padding-inline: .85rem; background: transparent; color: #ffe4bd;
  font-size: .92rem; font-weight: 650; text-decoration: underline; animation: none;
}
.journey-cue span { width: 10px; height: 10px; flex: none; animation: cue-glow 3.6s ease-in-out infinite alternate; }
.scroll-cue.calm-cue {
  position: relative; isolation: isolate; min-height: 46px;
  padding: .45rem .95rem; border: 1px solid #e5b68182; border-radius: 1.35rem;
  background: linear-gradient(120deg, #392c21, #261d17); color: #fff0d8;
  text-decoration: none; box-shadow: 0 5px 16px #120b07aa;
}
.calm-cue::before {
  content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit;
  box-shadow: 0 0 19px 3px #ffba77a1; opacity: .22; pointer-events: none;
  animation: cue-warmth 6s ease-in-out infinite alternate;
}
.scroll-cue.calm-cue:hover { border-color: #ffd69b; background: #483424; }
@keyframes cue-warmth { to { opacity: .64; } }
.home-fold.play-fold { background: #141914; }
.landing {
  display: grid; grid-template-columns: minmax(15rem, .8fr) minmax(0, 1.35fr);
  align-items: center; gap: clamp(2rem, 5.5vw, 6rem);
}
.welcome { display: grid; justify-items: start; }
.play-fold h2 {
  font: 400 clamp(3.2rem, 7vw, 6rem) / .95 Georgia, "Times New Roman", serif;
  letter-spacing: -.055em; margin-bottom: .85rem;
}
.play-fold h2 em { color: #f3cb9d; letter-spacing: -.035em; white-space: nowrap; }
.welcome > p { max-width: 26ch; color: #e9dfcf; font-size: clamp(1.08rem, 1.55vw, 1.3rem); line-height: 1.55; }
.play-space {
  min-width: 0; display: grid; grid-template-rows: auto auto auto;
  padding: clamp(.55rem, 1.2vw, .9rem); border: 1px solid #605344; border-radius: 1.4rem;
  background: #22221c; box-shadow: 0 20px 56px #06070865;
}
.play-prompt { margin: .15rem .18rem .55rem; color: #faead4; font-size: 1rem; font-weight: 680; }
.play-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .38rem; padding-bottom: .65rem; }
.play-tools button, .play-footer button {
  min-height: 44px; padding: .42rem .8rem; color: #e0d7c7;
  background: transparent; border: 1px solid transparent; border-radius: .7rem;
  font-size: .94rem; font-weight: 650; transition: background-color .18s, color .18s, transform .18s;
}
.play-tools button { display: grid; align-content: start; gap: .2rem; text-align: left; background: #2b2e24; border-color: #777260; }
.play-tools button span { font-size: .875rem; font-weight: 500; line-height: 1.25; }
.play-tools button[aria-pressed="true"] { color: #211b15; background: #efd5b1; border-color: #efd5b1; }
.play-tools button:hover:not([aria-pressed="true"]), .play-footer button:hover { color: #fff0d9; background: #39332a; border-color: #ba9d75; }
.play-tools button:active, .play-footer button:active { transform: translateY(1px); }
#play-surface {
  display: block; width: 100%; height: auto; min-width: 0; aspect-ratio: 1.5;
  border-radius: .85rem; background: #151a17; cursor: crosshair; touch-action: none;
}
.play-footer { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .35rem .15rem 0 .48rem; }
.play-footer p { color: #dfd2bd; font-size: .93rem; }
.play-footer button { flex: none; }
.home-fold.support-fold { background: #e6d9c2; color: #27231b; }
.support-fold .hero-line { color: #4e4233; }
.support-fold .primary { background: #2e392c; border-color: #2e392c; color: #fff0dc; box-shadow: none; }
.support-fold .primary:hover { background: #41513e; color: #fff0dc; }
.support-fold .text-action { color: #382d22; }
.support-safety { max-width: 46ch; margin-top: 1.25rem; padding-top: .9rem; border-top: 1px solid #a89577; color: #4e4233; font-size: 1rem; }
.support-safety a { color: #442b1d; font-weight: 700; }
.support-fold :focus-visible { outline-color: #3f2817; }
.support-fold .journey-cue { color: #554538; }
.home-fold.horizon { background: linear-gradient(112deg, #171611f5, #2c211af2); }
.horizon-content { width: min(100%, 63rem); }
.horizon-content h2 { max-width: none; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.045em; margin-bottom: clamp(1.5rem, 5vw, 3.2rem); }
.forecast-lead, .forecast-result-label, #holiday-date { color: #e7d5bf; font-size: clamp(1rem, 1.7vw, 1.2rem); }
#holiday-scene { min-width: 0; }
#holiday-name {
  display: grid; align-content: center; min-height: 2.05em; margin: .2rem 0 .05rem;
  font: 400 clamp(2.8rem, 7.8vw, 7.1rem) / .98 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em; color: #f6d3a6; text-wrap: balance;
}
.forecast-result-label { margin-top: clamp(1rem, 3vw, 1.7rem); }
.digits.forecast-digits { --digit-size: clamp(2.3rem, 8.9vw, 6.3rem); width: min(100%, 42rem); gap: clamp(.24rem, 1.15vw, .8rem); margin: .55rem 0 .6rem; }
.forecast-digits strong { font-family: Bahnschrift, "Arial Narrow", system-ui, sans-serif; font-size: var(--digit-size); line-height: 1; }
.forecast-digits span { font-size: clamp(.82rem, 1.7vw, 1rem); }
#holiday-pause { margin-top: .25rem; }
.site-footer { position: relative; background: #171611; border-top: 1px solid #6f5b434f; color: #e4d8c6; }
.site-footer-inner {
  width: min(100% - 2.2rem, 78rem); margin-inline: auto;
  display: grid; gap: 1.5rem; padding-block: clamp(2rem, 6vw, 4.5rem);
}
.site-footer h2 { margin-bottom: .6rem; color: #fff1dc; font-size: 1.12rem; }
.site-footer p { max-width: 59ch; font-size: 1rem; }
.site-footer p + p { margin-top: .65rem; }
.site-footer #footer-privacy { justify-self: start; }
@media (min-width: 760px) {
  .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 1rem 3rem; }
}
@media (max-width: 800px) {
  .landing { max-width: 35rem; width: 100%; margin-inline: auto; grid-template-columns: 1fr; gap: .75rem; }
  .play-fold { gap: .7rem; }
  .play-fold h2 { margin-bottom: .5rem; }
  .welcome > p { max-width: 32ch; }
}
@media (max-width: 520px) {
  .home-bar { gap: .25rem .4rem; padding-bottom: .45rem; }
  .home-nav { gap: .15rem .45rem; }
  .home-nav button { font-size: .84rem; }
  .home-bar .home-nav .help-link { padding-inline: .45rem; }
  .home .timer-hero h1 { font-size: clamp(2.35rem, 10vw, 3.4rem); }
  .home-footer .calm-cue { padding-inline: .8rem; }
  #play-surface { aspect-ratio: 1.27; }
  .play-tools button { padding-inline: .4rem; }
}
@media (max-width: 350px) {
  .home-bar .wordmark { font-size: 1.15rem; }
  .home-nav { gap: .25rem; }
  .home-nav button { padding-inline: .1rem; font-size: .78rem; }
  .home-footer .journey-cue { gap: .45rem; font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
  .play-tools button, .play-footer button { transition: none; }
}
