.evening { padding: 0 0 calc(var(--safe-bottom) + 32px); }

.sky-head { position: relative; overflow: hidden; padding-top: var(--safe-top); border-radius: 0 0 28px 28px; background: var(--night); color: var(--creme); }
.sky { display: block; width: 100%; height: auto; }
.sky-overlay {
  position: absolute; top: calc(var(--safe-top) + 12px); left: 18px; right: 12px;
  display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none;
}
.sky-overlay > * { pointer-events: auto; }
.streak { display: flex; align-items: baseline; gap: 8px; }
.streak strong { display: inline-block; color: var(--abricot); text-shadow: 0 0 6px var(--navy), 0 0 14px var(--navy); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.streak span { font-size: 15px; opacity: .9; }
.streak.bump strong { animation: bump .6s ease; }
@keyframes bump { 40% { transform: scale(1.25); } }
.sky-link {
  min-height: 44px; padding: 8px 14px; border-radius: 999px;
  color: var(--creme); font-size: 15px; font-weight: 600;
  box-shadow: inset 0 0 0 1.5px rgba(251, 246, 239, .5);
}
.sky-note { margin: -8px 0 16px; color: var(--muted); font-size: 14px; }

.star.new { transform-box: fill-box; transform-origin: center; animation: star-on 1.2s ease-out both; }
@keyframes star-on {
  0% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(2.6); }
  100% { transform: scale(1); }
}
.cloud { animation: cloud-pass 4.5s ease-in-out both; }
/* Le nuage attend que l'écran de lancement soit parti pour passer. */
html:not(.launched) .cloud { animation-play-state: paused; }
@keyframes cloud-pass {
  from { transform: translateX(-120px); }
  to { transform: translateX(400px); }
}

.evening-body { padding: 24px var(--pad) 0; }
.evening-title { margin-bottom: 8px; }
.section-title { margin: 24px 0 12px; font-size: 17px; font-weight: 600; }

/* Le rituel : la barre, puis une tuile par geste. */
.ritual { margin: 24px 0 12px; padding: 14px 16px 16px; border-radius: 18px; background: var(--card); }
.ritual-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ritual-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.ritual-head span { color: var(--muted); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ritual .bar { height: 10px; }
.ritual .bar span { min-width: 0; }

.gestes { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.geste {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px 14px 12px 12px;
  border-radius: 18px; background: var(--card); text-align: left;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.geste-tile { display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 14px; }
.geste-tile .icon { width: 28px; height: 28px; stroke-width: 2; }
.geste-couper { background: var(--ciel); color: var(--navy); }
.geste-vider { background: var(--abricot); color: var(--brun); }
.geste-moment { background: var(--night-tile); color: var(--abricot); box-shadow: inset 0 0 0 1px rgba(251, 246, 239, .14); }
.geste-text { display: grid; flex: 1; gap: 2px; }
.geste-text strong { font-weight: 600; }
.geste-text span { color: var(--muted); font-size: 15px; }
.geste .box {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  color: transparent; box-shadow: inset 0 0 0 2px var(--ring);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.geste .box .icon { width: 18px; height: 18px; stroke-width: 2.8; }

/* Le prochain geste à faire ressort, en relief. */
.geste.is-next { background: var(--field); box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 var(--line); }
.geste.is-next .box { box-shadow: inset 0 0 0 2px var(--line); }
.geste.is-next:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line), 0 1px 0 var(--line); }

/* Geste fait : contour et coche ciel. */
.geste.is-on { box-shadow: inset 0 0 0 2px var(--ciel); }
.geste.is-on .box { background: var(--ciel); color: var(--navy); box-shadow: none; }
.geste.pop .box { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }
.geste[aria-disabled="true"] { cursor: default; }

.card-zone { display: grid; gap: 8px; justify-items: center; }
.card-zone.is-next .btn { animation: nudge .8s ease 2; }
@keyframes nudge { 50% { transform: translateY(-3px); } }

.tarot { width: min(64%, 250px); margin: 4px auto 0; perspective: 1000px; }
.tarot-inner { position: relative; display: grid; transform-style: preserve-3d; }
.tarot-face { grid-area: 1 / 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.tarot-back { transform: rotateY(180deg); }
.tarot-note { display: block; margin-top: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.tarot.flip .tarot-inner { animation: flip .7s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes flip {
  from { transform: rotateY(-180deg); }
  to { transform: rotateY(0); }
}

.stock-card { display: grid; gap: 10px; justify-items: start; margin-top: 28px; padding: 18px; border-radius: 18px; background: var(--card); }

/* Ciel animé, sur tous les écrans qui l'affichent. --sky-t (l'horloge du ciel, posée par
   renderSky) fait reprendre chaque animation où elle en était quand l'écran se redessine. */
.sky .tw { animation: twinkle var(--tw) ease-in-out calc(var(--tw-delay) + var(--sky-t, 0s)) infinite; }
/* Les étincelles clignotent ; les étoiles dodues (constellation comprise) respirent,
   pour garder leur abricot au lieu de virer au gris. */
.sky g.tw { transform-box: fill-box; transform-origin: center; animation-name: twinkle-pop; }
@keyframes twinkle { 50% { opacity: .3; } }
@keyframes twinkle-pop { 50% { transform: scale(.8); opacity: .88; } }
.moon-halo { transform-box: fill-box; transform-origin: center; animation: moon-halo 8s ease-in-out var(--sky-t, 0s) infinite; }
@keyframes moon-halo { 50% { transform: scale(1.3); opacity: .45; } }
/* L'aurore : les deux rideaux ondulent lentement, chacun à son rythme. */
.aurora .curtain { animation: aurora-sway 14s ease-in-out var(--sky-t, 0s) infinite alternate; }
.aurora .curtain.far { animation-duration: 19s; animation-delay: calc(-7s + var(--sky-t, 0s)); animation-direction: alternate-reverse; }
@keyframes aurora-sway {
  from { translate: -5px 0; }
  to { translate: 5px 0; }
}
.meteor { animation: meteor var(--dur) ease-in both; }
@keyframes meteor {
  0% { transform: translateX(0); opacity: 0; }
  12%, 70% { opacity: 1; }
  100% { transform: translateX(var(--travel)); opacity: 0; }
}
