/* s-lights.css: the twelve morning lights and the layer for two (Us), loaded after app/ui.css.

   A ritual of twelve mornings. Each light opens on the sky of the hour with the string of twelve
   hung across it, in the palette's red, amber, green and gold: the bulbs up to that morning glow,
   that morning's glows most, the rest are clear glass. The first time a light opens on a phone,
   its own bulb comes on and the glow runs along the wire. Akshay's notes are letters: cream card
   stock, his navy ink, his wax seal, which cracks in two when Krista opens one; what she sends back
   stays on the paper. Every color comes from design/tokens.css; this file only mixes them. */

/* ============================== The bulbs' own colors ============================== */
:root,
[data-look="evening"] {
  --lt-glass: rgba(255, 236, 214, .1);
  --lt-edge: rgba(255, 226, 196, .38);
  --lt-shine: rgba(255, 255, 255, .62);
  --lt-rim: rgba(255, 255, 255, .55);
  --lt-hole: color-mix(in srgb, var(--bg) 86%, black);
}
[data-look="day"] {
  --lt-glass: rgba(255, 255, 255, .62);
  --lt-edge: color-mix(in srgb, var(--gold-ink) 34%, transparent);
  --lt-shine: rgba(255, 255, 255, .7);
  --lt-rim: rgba(255, 255, 255, .7);
  --lt-hole: color-mix(in srgb, var(--bg) 90%, var(--text));
}
.lt-wire { fill: none; stroke: var(--art-wire); stroke-width: 1.3; stroke-linecap: round; }
.lt-pin { fill: var(--gold); }
.lt-cap { fill: var(--holly); }
.lt-glass { fill: var(--lt-glass); stroke: var(--lt-edge); stroke-width: 1; }
.lt-fill { stroke: var(--lt-rim); stroke-width: .9; }
.lt-shine { fill: var(--lt-shine); }
.lt-star-dots { fill: var(--art-moon); }
.lt-b.is-lit .lt-glass, .lt-b.is-today .lt-glass { stroke: none; }
.lt-string, .lt-bulb { overflow: visible; }
.lt-glow { transform-box: fill-box; transform-origin: center; }
[data-look="day"] .lt-glow { opacity: .6; }

/* The app bar wears its own string of lights elsewhere; here the string of twelve is the only one. */
.appbar:has(+ .lt-lights)::before, .appbar:has(+ .lt-lights)::after,
.appbar:has(+ .lt-light)::before, .appbar:has(+ .lt-light)::after { content: none; }

/* A warm tile for a small picture, as on rows and options */
.lt-pic { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 18px; background: var(--tile); box-shadow: var(--tile-glow); }
.lt-pic svg { width: 46px; height: 46px; }

/* ============================== One light ============================== */
/* The hero: the sky of the hour, the string as it hung that morning, the sleeps left; the snow at
   its foot is the page. The words under it are centered, like the front of a card. */
.lt-light .hero { align-items: center; gap: 8px; text-align: center; }
.lt-light .hero > :not(.hero-art) { position: relative; }
.lt-light .hero > .hero-art { align-self: stretch; }
.lt-light .hero-art { aspect-ratio: auto; height: auto; }
.lt-light .hero-title { max-width: 16ch; font-size: clamp(32px, 9.4vw, 46px); line-height: 1.04; }
.lt-sky {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--bar-h) + env(safe-area-inset-top)) 8px 60px;
  background:
    radial-gradient(70% 70% at 88% 0%, color-mix(in srgb, var(--art-glow) calc(var(--art-glow-op) * 80%), transparent), transparent 72%),
    linear-gradient(180deg, var(--art-sky-1), var(--art-sky-2) 58%, var(--art-sky-3));
}
.lt-stars { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: var(--art-star-op); }
.lt-string { display: block; width: 100%; max-width: 520px; height: auto; }
.lt-count { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 10px 0 0; }
.lt-count b { font: 470 92px/.8 var(--font-display); letter-spacing: -.05em; color: var(--heading); text-shadow: var(--heading-glow); font-variant-numeric: lining-nums; }
.lt-count span { font: 650 12.5px/1.2 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); }
.lt-count.is-day { margin-top: 12px; }
.lt-lantern-glow { opacity: .9; }
.lt-count.is-day b { font-size: 62px; letter-spacing: -.035em; }
/* An earlier morning keeps its count as history: smaller, in the quiet ink */
.lt-count.is-then { gap: 8px; margin-top: 14px; }
.lt-count.is-then b { font-size: 54px; letter-spacing: -.04em; color: var(--text-2); text-shadow: none; }
.lt-count.is-then span { letter-spacing: .1em; }
.lt-count.is-day.is-then b { font-size: 40px; }
.lt-drift { position: absolute; left: 0; bottom: -1px; z-index: -1; width: 100%; height: 52px; }

/* The bulbs come on in order as the light opens, this morning's last; then it breathes. */
@keyframes lt-on { from { opacity: 0; } }
@keyframes lt-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }
.screen[data-enter] .lt-sky .lt-on { animation: lt-on .5s var(--ease) both; animation-delay: calc(var(--k) * 70ms + 180ms); }
.lt-sky .is-today .lt-glow { animation: lt-breathe 3.2s ease-in-out 1.4s infinite; }

/* The first open on this phone: this morning's bulb waits dark, then comes on with a bloom, and the
   glow runs along the wire through every bulb before it. */
@keyframes lt-wake { 0% { opacity: 0; } 30% { opacity: 0; } 62% { opacity: 1; } 100% { opacity: 1; } }
@keyframes lt-bloom { 0%, 40% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.7); } 100% { opacity: 1; transform: scale(1); } }
@keyframes lt-run { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: 1; transform: scale(1.65); } }
.lt-sky.is-waking .lt-b.is-waking .lt-on { animation: lt-wake 1.3s var(--ease-out) both; }
.lt-sky.is-waking .lt-b.is-waking .lt-glow { animation: lt-bloom 1.5s var(--ease-out) both, lt-breathe 3.2s ease-in-out 2.4s infinite; }
.lt-sky.is-waking .lt-b.is-lit .lt-glow { animation: lt-run .7s var(--ease) both; animation-delay: calc(1.25s + var(--k) * 55ms); }
.lt-sky.is-waking .lt-count { animation: lt-rise .5s var(--ease-out) .45s both; }
/* Light 12: the string is complete, and the sky lantern already hangs from the middle pin, dark,
   waiting for train day morning. It sways a little on its wire. */
@keyframes lt-sway { 0%, 100% { rotate: -2.5deg; } 50% { rotate: 2.5deg; } }
.lt-kandil.is-waiting { opacity: .92; transform-box: fill-box; transform-origin: 50% 0; animation: lt-sway 5s ease-in-out infinite; }
.lt-sky.is-full .lt-count { margin-top: 2px; }

/* ============================== His note: the envelope and the letter ============================== */
/* Sealed: a cream envelope with its flap down and his wax seal on the point of the flap */
.lt-note { display: flex; flex-direction: column; gap: 12px; }
.lt-env {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  min-height: 188px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--r-m);
  background: linear-gradient(180deg, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0) 50%), var(--note-paper);
  box-shadow: inset 0 0 0 1px var(--note-line), var(--shadow-2);
  color: var(--note-ink);
  font: inherit;
  cursor: pointer;
  perspective: 700px;
  transition: transform .15s var(--ease);
}
.lt-env:active { transform: scale(.99); }
.lt-env-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: var(--r-m) var(--r-m) 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--note-paper) 88%, var(--gold)), var(--note-paper));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 1px 0 var(--note-line));
  transform-origin: 50% 0;
  backface-visibility: hidden;
}
.lt-env-seal { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; translate: -50% -50%; rotate: -8deg; filter: drop-shadow(0 4px 4px rgba(60, 10, 14, .36)); }
.lt-env-to { position: absolute; left: 0; right: 0; bottom: 34px; font: 400 27px/1.1 var(--font-hand); text-align: center; }
.lt-env-sub { position: absolute; left: 0; right: 0; bottom: 14px; font-size: 13.5px; line-height: 1.3; color: var(--note-ink-2); text-align: center; }
.lt-env-seal, .lt-env-to, .lt-env-sub { pointer-events: none; }

/* The seal is two halves along a crooked line; whole until it cracks */
.lt-half { position: absolute; inset: 0; display: block; }
.lt-half svg { display: block; width: 100%; height: 100%; }
.lt-half.is-l { clip-path: polygon(0 0, 53% 0, 46% 28%, 55% 50%, 47% 72%, 52% 100%, 0 100%); }
.lt-half.is-r { clip-path: polygon(53% 0, 100% 0, 100% 100%, 52% 100%, 47% 72%, 55% 50%, 46% 28%); }
@keyframes lt-crack-l { 0% { transform: none; } 30% { transform: translate(-2px, 0) rotate(-6deg); } 100% { transform: translate(-46px, 70px) rotate(-62deg); opacity: 0; } }
@keyframes lt-crack-r { 0% { transform: none; } 30% { transform: translate(2px, 0) rotate(6deg); } 100% { transform: translate(46px, 70px) rotate(62deg); opacity: 0; } }
@keyframes lt-flap { from { transform: none; } to { transform: rotateX(180deg); opacity: 0; } }
@keyframes lt-glow-up { 0% { box-shadow: inset 0 0 0 1px var(--note-line), var(--shadow-2); } 100% { box-shadow: inset 0 0 0 1px var(--note-line), 0 0 44px -6px color-mix(in srgb, var(--bulb-gold) 70%, transparent), var(--shadow-2); } }
.is-cracking .lt-half.is-l { animation: lt-crack-l .46s cubic-bezier(.5, 0, .75, .4) both; }
.is-cracking .lt-half.is-r { animation: lt-crack-r .46s cubic-bezier(.5, 0, .75, .4) both; }
.lt-env.is-cracking { animation: lt-glow-up .44s var(--ease) both; cursor: default; }
.lt-env.is-cracking .lt-env-flap { animation: lt-flap .34s var(--ease) .1s both; }
.lt-env.is-cracking .lt-env-to, .lt-env.is-cracking .lt-env-sub { transition: opacity .3s var(--ease) .1s; opacity: 0; }

/* Open: the letter on its card stock, the broken seal in its corner, his words in his hand */
.lt-paper { padding-top: 30px; }
.lt-paper .note-hand { font-size: 22px; line-height: 1.45; text-wrap: pretty; }
.lt-broken { position: absolute; top: -15px; right: 18px; width: 42px; height: 42px; filter: drop-shadow(0 3px 3px rgba(60, 10, 14, .34)); }
.lt-broken .lt-half.is-l { transform: translate(-2px, 1px) rotate(-9deg); }
.lt-broken .lt-half.is-r { transform: translate(3px, 2px) rotate(8deg); }
/* What came back: her line in her own ink under his, signed with her name */
.lt-her { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--note-line); }
.lt-her-line { margin: 0; font: 400 21px/1.4 var(--font-hand); color: var(--accent-press); }
[data-look="evening"] .lt-her-line { color: var(--art-coach); }
.lt-her-sign { margin: 2px 0 0; font: 700 18px/1.2 var(--font-hand); text-align: right; color: var(--note-ink-2); }
/* Her heart, punched through the paper: a heart-shaped hole that stays */
.lt-punch { position: absolute; left: 16px; bottom: 14px; width: 30px; height: 30px; rotate: -12deg; }
.lt-punch svg { display: block; width: 30px; height: 30px; overflow: visible; }
.lt-punch .shape { fill: var(--lt-hole); stroke: color-mix(in srgb, var(--note-ink) 22%, transparent); stroke-width: .8; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .8)); }
.lt-paper.is-punched { padding-bottom: 54px; }
.lt-paper.is-punched .lt-her { padding-left: 0; }
@keyframes lt-punch-in { 0% { transform: scale(2.4); opacity: 0; } 55% { transform: scale(.86); opacity: 1; } 100% { transform: none; } }
@keyframes lt-thunk { 0%, 100% { transform: none; } 40% { transform: translateY(2px) scale(.994); } }
.lt-paper.is-punching .lt-punch { animation: lt-punch-in .44s cubic-bezier(.2, .9, .3, 1.2) both; }
.lt-paper.is-punching { animation: lt-thunk .32s var(--ease) .12s both; }
.lt-replies { gap: 8px; }

/* The letter slides out of its envelope and his words write themselves on, line by line */
@keyframes lt-slide { from { opacity: 0; transform: translateY(26px) scale(.97); } }
@keyframes lt-write { from { clip-path: inset(-12% 100% -12% 0); } to { clip-path: inset(-12% -4% -12% 0); } }
@keyframes lt-rise { from { opacity: 0; transform: translateY(10px); } }
.lt-note.is-opening .lt-paper { animation: lt-slide .5s var(--ease-out) both; transform-origin: 50% 100%; }
.lt-note.is-opening .lt-ink { animation: lt-write .6s cubic-bezier(.45, .05, .4, 1) both; animation-delay: calc(.22s + var(--i) * .34s); }
.lt-note.is-opening .lt-broken { animation: lt-on .4s var(--ease) .16s both; }
.lt-note.is-opening .lt-replies { animation: lt-rise .4s var(--ease-out) .45s both; }
.lt-her.is-writing .lt-her-line { animation: lt-write .8s cubic-bezier(.45, .05, .4, 1) both; }
.lt-her.is-writing .lt-her-sign { animation: lt-on .4s var(--ease) .7s both; }

/* ============================== The light's story ============================== */
/* Here and there, a Marathi word, the Moon, a few lines to read */
.lt-story { display: flex; flex-direction: column; gap: 16px; }
.lt-story > p { font-size: 17px; line-height: 1.62; color: var(--text); text-wrap: pretty; }
.lt-aside { font-size: 15px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.lt-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: var(--r-l);
  background: var(--sheen), var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--edge);
}
.lt-pair-side { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px 18px; text-align: center; }
.lt-pair-side + .lt-pair-side { box-shadow: inset 1px 0 0 var(--line); }
.lt-pair-side .lt-pic { width: 68px; height: 68px; border-radius: 20px; margin-bottom: 2px; }
.lt-pair-side .lt-pic svg { width: 52px; height: 52px; }
.lt-pair-where { font: 600 12.5px/1.3 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
.lt-pair-title { font: 560 19px/1.2 var(--font-display); color: var(--heading); text-wrap: balance; }
.lt-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 18px 16px 18px;
  border-radius: var(--r-l);
  background: var(--sheen), var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--edge);
  text-align: center;
}
.lt-word-mr { font: 700 40px/1.35 var(--font-hand); color: var(--gold-ink); }
.lt-word figcaption { display: flex; flex-direction: column; gap: 2px; }
.lt-word-say { font-size: 15px; line-height: 1.4; color: var(--text-2); }
.lt-word-means { font: 600 17px/1.35 var(--font-ui); color: var(--text); text-wrap: balance; }

/* A small piece of night sky with the Moon in it. It carries the evening look in both looks
   (data-look="evening" on the card), so it is the plum night of the hero drawing by day too. */
.lt-moon {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 16px 20px 16px 6px;
  border-radius: var(--r-l);
  background: radial-gradient(120% 140% at 0% 50%, var(--art-sky-2), var(--art-sky-1) 72%);
  color: var(--text);
  box-shadow: var(--shadow-1), inset 0 0 0 1px color-mix(in srgb, var(--gold) 26%, transparent);
}
.lt-moon > .lt-stars { opacity: .75; }
.lt-moon-art { display: block; }
.lt-moon-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lt-moon-line { font: 400 22px/1.32 var(--font-hand); color: var(--text); text-wrap: balance; }
.lt-moon-fact { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.lt-moon.is-big { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 20px; background: radial-gradient(70% 90% at 50% 50%, var(--art-sky-2), var(--art-sky-1) 75%); }
/* The Moon in Us is a small toy: a tap and it glows, and his line writes itself on again */
button.lt-moon { appearance: none; width: 100%; margin: 0; border: 0; font: inherit; text-align: left; cursor: pointer; transition: transform .15s var(--ease); }
button.lt-moon:active { transform: scale(.99); }
@keyframes lt-moon-bloom { 0% { filter: none; transform: scale(1); } 40% { filter: drop-shadow(0 0 18px var(--art-moon-halo)) brightness(1.18); transform: scale(1.07); } 100% { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--art-moon-halo) 60%, transparent)); transform: scale(1); } }
.lt-moon.is-glowing .lt-moon-art { animation: lt-moon-bloom 1.4s var(--ease-out) both; }
.lt-moon.is-glowing .lt-moon-line { animation: lt-write 1.1s cubic-bezier(.45, .05, .4, 1) .2s both; }
.lt-moon.is-glowing .lt-moon-fact { animation: lt-rise .5s var(--ease-out) 1s both; }

/* Where a light points: the packing list, the plan, the day */
.lt-links { margin-top: 2px; }

/* Before and after this morning, like the pages of a small book */
.lt-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.lt-page {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 66px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--r-m);
  background: var(--sheen), var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--edge);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lt-page:active { transform: scale(.985); }
.lt-page > svg { flex: none; width: 20px; height: 20px; color: var(--text-3); }
.lt-page.is-next { justify-content: flex-end; text-align: right; }
.lt-page.is-dark { cursor: default; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.lt-page.is-empty { visibility: hidden; }
.lt-page-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lt-page-label { font: 600 12px/1.3 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
.lt-page-title { font: 560 16.5px/1.25 var(--font-display); text-wrap: balance; }
.lt-page.is-dark .lt-page-title { font: 500 14.5px/1.3 var(--font-ui); color: var(--text-2); }
.lt-page.is-dark .lt-page-label { color: var(--text-3); }

/* ============================== Krista's one tap ============================== */
/* Her cup: three pictures, one tap, and a line once it is picked. The two approvals are the Kids
   page's own cards (desk-task in s-kids.css), so both places look and work the same. */
.lt-cup-said { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font: 500 15px/1.4 var(--font-ui); color: var(--text-2); }
.lt-cup-said.is-set { color: var(--text); font-weight: 600; }
.lt-cup-said svg { flex: none; width: 18px; height: 18px; color: var(--good); }
.lt-cup-said.is-new { animation: lt-rise .4s var(--ease-out) both; }
.lt-task .desk-snacks { margin-top: 8px; }

/* ============================== The grid of twelve ============================== */
/* The string as it hangs this morning, across the top of the grid */
.lt-head-string { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: -4px -6px 2px; }
.lt-head-string .lt-string { max-width: 460px; }
.lt-head-cap { margin: 0; font: 650 12.5px/1.3 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); text-align: center; }
.lt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.lt-cell { display: flex; min-width: 0; }
.lt-day {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  min-height: 140px;
  margin: 0;
  padding: 14px 8px 14px;
  border: 0;
  border-radius: 18px;
  background: var(--sheen), var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--edge);
  color: var(--text);
  font: inherit;
  text-align: center;
  text-decoration: none;
  transition: transform .12s var(--ease), box-shadow .18s var(--ease);
}
a.lt-day:active, button.lt-day:active { transform: scale(.97); }
button.lt-day { cursor: pointer; }
.lt-day-n { position: absolute; top: 9px; left: 11px; font: 560 15px/1 var(--font-display); color: var(--text-3); font-variant-numeric: lining-nums; }
.lt-day-art { display: grid; place-items: center; height: 54px; margin-bottom: 4px; }
.lt-day-art svg { width: 44px; height: 46px; }
.lt-day-title { font: 560 16px/1.18 var(--font-display); color: var(--heading); text-wrap: balance; }
.lt-day-sub { margin-top: auto; padding-top: 3px; font: 500 12.5px/1.3 var(--font-ui); color: var(--text-2); }
.lt-cell.is-dark .lt-day { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.lt-cell.is-dark .lt-day-title { font: 600 13.5px/1.25 var(--font-ui); color: var(--text-2); white-space: nowrap; margin-top: auto; }
.lt-cell.is-dark .lt-day-sub { min-height: 2.6em; margin-top: 2px; color: var(--gold-ink); font-weight: 600; text-wrap: balance; }
.lt-cell.is-next .lt-day { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent); }
.lt-cell.is-today .lt-day {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bulb-gold) 18%, var(--surface)), var(--surface) 70%);
  box-shadow: 0 0 0 1.5px var(--gold), 0 14px 30px -14px color-mix(in srgb, var(--bulb-amber) 60%, transparent), var(--shadow-1);
}
.lt-cell.is-today .lt-day-n, .lt-cell.is-today .lt-day-sub { color: var(--gold-ink); }
.lt-cell.is-today .lt-day-sub { font-weight: 650; letter-spacing: .02em; }
.lt-cell.is-needs .lt-day-sub { color: var(--accent); font-weight: 700; letter-spacing: .02em; }
/* What a door still holds: his seal unopened, a new light, her heart, his first draft */
.lt-marks { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; gap: 4px; min-height: 22px; }
.lt-mark { display: grid; place-items: center; flex: none; }
.lt-mark.is-seal svg { display: block; width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(60, 10, 14, .4)); }
.lt-mark.is-new { width: 9px; height: 9px; margin: 0 4px; border-radius: 50%; background: var(--bulb-gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 40%, transparent), 0 0 10px 1px color-mix(in srgb, var(--bulb-amber) 80%, transparent); }
.lt-mark.is-heart svg { display: block; width: 16px; height: 16px; }
.lt-mark.is-heart .shape { fill: var(--accent); }
.lt-mark.is-draft { width: 22px; height: 22px; border-radius: 50%; background: var(--tile); box-shadow: var(--tile-glow); }
.lt-mark.is-draft svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .lt-mark.is-new { animation: lt-breathe 2.6s ease-in-out infinite; }
}
/* Train day, the finale under the twelve */
.lt-finale {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 10px 18px 10px 14px;
  border-radius: var(--r-l);
  background: var(--sheen), var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--edge);
  color: var(--text);
  text-decoration: none;
}
.lt-finale-art { display: grid; place-items: center; width: 52px; }
.lt-finale-art svg { width: 40px; height: auto; }
.lt-finale-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lt-finale-title { font: 560 20px/1.2 var(--font-display); color: var(--heading); }
.lt-finale-sub { font-size: 14px; color: var(--text-2); }
.lt-finale.is-dark { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.lt-finale.is-dark .lt-finale-title { color: var(--text-2); }
.lt-finale.is-today { box-shadow: 0 0 0 1.5px var(--gold), 0 14px 30px -14px color-mix(in srgb, var(--bulb-amber) 60%, transparent), var(--shadow-1); }
/* Before the plan is written: the string, all clear glass */
.lt-before { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-block: auto; padding: 8px 4px 40px; text-align: center; }
.lt-before .lt-string { max-width: 380px; }
.lt-before .lede { max-width: 28ch; }

/* Akshay's preview of a morning to come, in a sheet */
.lt-preview-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.lt-preview-head > span { display: flex; flex-direction: column; gap: 2px; }
.lt-preview-head .eyebrow { color: var(--gold-ink); }
.lt-preview-head .lt-bulb { width: 56px; height: 59px; }
.lt-preview-note { margin-top: 4px; }
.lt-draft-line { display: flex; align-items: center; gap: 8px; }
.lt-draft-line svg { flex: none; }

/* ============================== Us: the layer for two ============================== */
/* Folded: one envelope for Krista under Akshay's wax seal */
.lt-us.is-sealed .lt-gate { margin-block: auto; }
.lt-gate {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 10 / 7.4;
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-m);
  background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 45%), var(--note-paper);
  box-shadow: inset 0 0 0 1px var(--note-line), var(--shadow-2);
  color: var(--note-ink);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  perspective: 800px;
  transition: transform .15s var(--ease);
}
.lt-gate:active { transform: scale(.99); }
.lt-gate-flap { position: absolute; top: 0; left: 0; width: 100%; height: 48%; transform-origin: 50% 0; }
.lt-gate-flap path { fill: color-mix(in srgb, var(--gold) 9%, transparent); stroke: var(--note-line); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.lt-gate-seal { position: absolute; top: 48%; left: 50%; display: block; width: 96px; height: 96px; translate: -50% -50%; rotate: -8deg; filter: drop-shadow(0 4px 4px rgba(60, 10, 14, .38)); }
.lt-gate-to { position: absolute; left: 0; right: 0; bottom: 17%; font: 400 31px/1.1 var(--font-hand); text-align: center; }
.lt-gate-line { position: absolute; left: 0; right: 0; bottom: 8%; font-size: 14.5px; line-height: 1.3; color: var(--note-ink-2); text-align: center; }
.lt-gate.is-cracking { cursor: default; animation: lt-glow-up .44s var(--ease) both; }
.lt-gate.is-cracking .lt-gate-flap { animation: lt-flap .34s var(--ease) .1s both; }
.lt-gate.is-cracking .lt-gate-to, .lt-gate.is-cracking .lt-gate-line { transition: opacity .3s var(--ease); opacity: 0; }
/* Open: the layer comes up as the seal breaks */
.lt-us.is-opening > .head ~ * { animation: lt-rise .44s var(--ease-out) both; }
.lt-us.is-opening > .head ~ :nth-child(3) { animation-delay: .06s; }
.lt-us.is-opening > .head ~ :nth-child(4) { animation-delay: .12s; }
.lt-us.is-opening > .head ~ :nth-child(n + 5) { animation-delay: .18s; }

/* Akshay's notes, a bundle on his card stock, each known by the light it came with */
.lt-letters {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 30%), var(--note-paper);
  color: var(--note-ink);
  box-shadow: inset 0 0 0 1px var(--note-line), var(--shadow-1);
  overflow: hidden;
}
.lt-letter {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 10px 16px 10px 14px;
  color: inherit;
  text-decoration: none;
  transition: background-color .15s var(--ease);
}
.lt-letter + .lt-letter { border-top: 1px dashed var(--note-line); }
.lt-letter:hover { background: color-mix(in srgb, var(--note-ink) 4%, transparent); }
.lt-letter:active { background: color-mix(in srgb, var(--note-ink) 8%, transparent); }
.lt-letter-art { display: grid; place-items: center; width: 40px; height: 40px; }
.lt-letter-art svg { width: 34px; height: 36px; }
.lt-letter-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lt-letter-title { font: 560 18px/1.25 var(--font-display); color: var(--note-ink); }
.lt-letter-sub { font-size: 13.5px; line-height: 1.35; color: var(--note-ink-2); }
.lt-letter.is-sealed .lt-letter-title { font-weight: 700; }
.lt-letter.is-sealed .lt-letter-art svg { filter: drop-shadow(0 2px 2px rgba(60, 10, 14, .3)); }
.lt-letter-trail { display: inline-flex; align-items: center; gap: 8px; }
.lt-letter-trail .chev { color: var(--note-ink-2); }
.lt-heart { display: grid; place-items: center; }
.lt-heart svg { width: 18px; height: 18px; display: block; }
.lt-heart .shape { fill: var(--note-ink); }

/* What Krista sent back, on Akshay's phone: her lines in her own hand */
.lt-from .row-icon:has(> .lt-ink-heart) { background: var(--surface-2); box-shadow: none; }
.lt-ink-heart svg { display: block; width: 20px; height: 20px; }
.lt-ink-heart .shape { fill: var(--accent); }
.lt-from .lt-said { font: 400 20px/1.3 var(--font-hand); color: var(--heading); }
.lt-us .empty { font-size: 15.5px; }

/* The things Akshay gave: coupons, the two cups, the mistletoe, a line about the kids */
.lt-gift { gap: 14px; padding: 16px 18px 18px 16px; }
.lt-gift-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; }
.lt-gift-head > span:nth-child(2) { min-width: 0; }
.lt-gift-title { display: block; font: 560 21px/1.2 var(--font-display); color: var(--heading); }
.lt-gift-line { display: block; margin-top: 2px; font-size: 15px; line-height: 1.45; color: var(--text-2); text-wrap: pretty; }
.lt-gift-pick { font: 600 16px/1.4 var(--font-ui); color: var(--text); }
.lt-mistletoe { padding-block: 14px; }
button.lt-mistletoe { appearance: none; width: 100%; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.lt-mistletoe .chev { color: var(--text-3); }
.lt-mist-seal svg { display: block; width: 34px; height: 34px; rotate: 10deg; filter: drop-shadow(0 2px 3px rgba(60, 10, 14, .4)); }
.lt-mistletoe.is-sealed .lt-gift-line { color: var(--text); font-weight: 600; }
@keyframes lt-seal-in { 0% { transform: scale(2.2) rotate(-30deg); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } 100% { transform: none; } }
.lt-mistletoe.is-sealing .lt-mist-seal { animation: lt-seal-in .46s cubic-bezier(.2, .9, .3, 1.2) both; }
.lt-kids-note { gap: 6px; padding: 16px 18px; }
.lt-kids-note p { font-size: 16.5px; line-height: 1.5; color: var(--text); text-wrap: pretty; }

/* The two cups: the quiet hour as three choices in time order, each on its own line */
.lt-hours { display: flex; flex-direction: column; gap: 8px; }
.lt-hour {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin: 0;
  padding: 10px 14px 10px 16px;
  border: 0;
  border-radius: var(--r-m);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow .15s var(--ease), transform .12s var(--ease);
}
.lt-hour:active { transform: scale(.99); }
.lt-hour-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lt-hour-main b { font: 600 16.5px/1.25 var(--font-ui); white-space: nowrap; }
.lt-hour-main span { font-size: 13.5px; line-height: 1.35; color: var(--text-2); }
.lt-hour.is-picked { box-shadow: inset 0 0 0 1.5px var(--accent-ring), var(--accent-glow); }
.lt-hour-check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--edge-strong); color: var(--on-accent); }
.lt-hour.is-picked .lt-hour-check { background: var(--accent-ring); box-shadow: none; }
.lt-cups.is-kept .lt-gift-line { color: var(--text); font-weight: 600; }
.lt-kept-check { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }

/* Coupons: small tickets with a perforated stub, torn off and stamped once used */
.lt-coupons { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; filter: var(--ticket-shadow); }
.lt-coupon {
  --stub: 66px;
  --notch: 7px;
  position: relative;
  display: grid;
  grid-template-columns: var(--stub) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  min-height: 86px;
  padding: 10px 14px 10px 0;
  border-radius: var(--r-m);
  background: var(--sheen), var(--surface);
  color: var(--text);
  -webkit-mask: radial-gradient(circle at var(--stub) 0, transparent var(--notch), black calc(var(--notch) + .5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at var(--stub) 100%, transparent var(--notch), black calc(var(--notch) + .5px)) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle at var(--stub) 0, transparent var(--notch), black calc(var(--notch) + .5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at var(--stub) 100%, transparent var(--notch), black calc(var(--notch) + .5px)) bottom / 100% 51% no-repeat;
}
.lt-coupon::before {
  content: "";
  position: absolute;
  top: calc(var(--notch) + 4px);
  bottom: calc(var(--notch) + 4px);
  left: calc(var(--stub) - 1px);
  border-left: 1.5px dashed color-mix(in srgb, var(--gold) 75%, transparent);
}
.lt-coupon-stub { display: grid; place-items: center; align-self: stretch; }
.lt-coupon-stub svg { width: 38px; height: 38px; }
.lt-coupon-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lt-coupon-good { font: 600 12px/1.3 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
.lt-coupon-title { font: 560 17.5px/1.25 var(--font-display); color: var(--heading); text-wrap: balance; }
.lt-coupon-own { margin-top: 2px; font: 400 18px/1.3 var(--font-hand); color: var(--text); }
.lt-coupon-on { margin-top: 2px; font: 600 12.5px/1.3 var(--font-ui); letter-spacing: .04em; color: var(--text-2); }
.lt-coupon-end { display: flex; align-items: center; }
.lt-use { min-height: 44px; padding: 0 16px; font-size: 15px; }
.lt-coupon.is-used { background: var(--surface-2); }
.lt-coupon.is-used .lt-coupon-title, .lt-coupon.is-used .lt-coupon-stub { opacity: .7; }
.lt-coupon .stamp { margin-right: 2px; }
.lt-coupon-form { grid-column: 2 / -1; margin: 6px 0 4px; }
.lt-coupon.is-writing { padding-bottom: 14px; }
@keyframes lt-tear { 0% { transform: none; } 35% { transform: translateY(6px) rotate(-2deg); } 70% { transform: translateY(-2px) rotate(.6deg); } 100% { transform: none; } }
@keyframes lt-stub-off { 0% { transform: none; opacity: 1; } 100% { transform: translate(-18px, 26px) rotate(-24deg); opacity: 0; } }
.lt-coupon.is-torn { animation: lt-tear .55s cubic-bezier(.2, .8, .3, 1.2) both; }
.lt-coupon.is-torn .lt-coupon-stub svg { animation: lt-stub-off .6s var(--ease) .1s both, lt-on .4s var(--ease) .8s both; }
/* Giving one: the coupon itself in the sheet, then one button */
.lt-give { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 4px; text-align: center; }
.lt-give .h2 { margin-top: 6px; }
.lt-give .fine { max-width: 30ch; }
.lt-give-art svg { display: block; width: 64px; height: 64px; }
.lt-coupon-big { width: 100%; max-width: 380px; min-height: 96px; text-align: left; box-shadow: none; filter: var(--ticket-shadow); }
.lt-coupon-big .lt-coupon-stub svg { width: 44px; height: 44px; }
.lt-coupon-big .lt-coupon-title { font-size: 20px; }

/* A note on its own screen, like a letter on the table: the light's bulb and name over it, the note
   in the middle of the page, the light it came with at the foot */
.lt-notes .lt-note-mark { align-self: center; display: grid; place-items: center; margin-top: 6px; }
.lt-notes .lt-note-mark svg { width: 56px; height: 59px; }
.lt-notes .head { align-items: center; margin-top: -6px; text-align: center; }
.lt-notes .lt-note { margin-block: auto; }
.lt-notes .note { padding: 38px 28px 26px; }
.lt-notes .note.is-punched { padding-bottom: 58px; }
.lt-notes .note-hand { font-size: 24px; line-height: 1.45; }
.lt-notes .note-sign { font-size: 23px; }
.lt-notes .lt-env { min-height: 200px; }
.lt-notes .lt-came { margin-top: 12px; }

/* ============================== Small phones ============================== */
@media (max-width: 340px) {
  .lt-count b { font-size: 78px; }
  .lt-grid { gap: 8px; }
  .lt-day { min-height: 132px; padding-inline: 6px; }
  .lt-day-title { font-size: 15px; }
  .lt-cell.is-dark .lt-day-title { font-size: 12.5px; }
  .lt-coupon { --stub: 56px; column-gap: 10px; }
  .lt-coupon-stub svg { width: 32px; height: 32px; }
  .lt-gate-seal { width: 80px; height: 80px; }
}

/* ============================== Wider windows ============================== */
@media (min-width: 720px) {
  .lt-sky { padding-top: 26px; padding-bottom: 64px; }
  .lt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .lt-day { min-height: 150px; }
  .lt-coupons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lt-coupon:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ============================== Still motion ============================== */
@media (prefers-reduced-motion: reduce) {
  .lt-sky .lt-on, .lt-sky .lt-glow, .lt-sky .lt-count, .lt-note .lt-paper, .lt-note .lt-ink, .lt-note .lt-replies, .lt-her .lt-her-line, .lt-her .lt-her-sign,
  .lt-paper, .lt-punch, .lt-coupon, .lt-coupon-stub svg, .lt-mist-seal, .lt-mark, .lt-us > *, .lt-kandil, .lt-moon * { animation: none !important; }
}
