/* Starfall Night (/starfall-night, December, a seasonal place in Frostpeak; page pick A "sky window", 2026-11-30): the head card
   with the picture (src/art/starfall-sky.js), today's shard, the wrap card, your shards, the Night's cards, the Frostpeak land card
   and the starshard pick-up card on land pages. Tokens only; each shard's color comes in as --sn-c / --sn-g. Phone rules: 44px
   targets, 12px gaps, titles/pills/intros centered, primary action on top and full width. */
.sn-page { display: flex; flex-direction: column; gap: var(--gap); }
.sn-page > * { margin: 0; }
.sn-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.sn-head h1, .sn-head .lede { margin: 0; }
.sn-head .lede { max-width: 62ch; }
.sn-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sn-pic { position: relative; width: 100%; }
.sn-frame svg { display: block; width: 100%; height: auto; border: var(--line) solid var(--ink); border-radius: var(--r-tile); box-sizing: border-box; }
.sn-frame.sn-tall { display: none; }
.sn-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.sn-today-row, .sn-gift-row { display: flex; gap: 12px; align-items: center; }
.sn-today-row h2, .sn-today-row p, .sn-gift-row p { margin: 0; }
.sn-today-row svg, .sn-gift-row svg { flex: none; }
.sn-today .btn-row { margin-top: 12px; }
.sn-sub { margin: 16px 0 0; font-size: 1rem; }
.sn-wrap-form { display: grid; gap: 12px; margin-top: 8px; }
.sn-wrap-form label { display: grid; gap: 4px; font-weight: 700; }
.sn-wrap-form select, .sn-wrap-form input { min-height: 44px; font: inherit; border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 0 12px; background: var(--card); color: var(--ink); }
.sn-wrap-form .btn-row { margin: 0; }
.sn-fine { font-size: var(--fs-sm); margin: 8px 0 0; }
.sn-tiles { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sn-tile { display: grid; justify-items: center; align-content: start; text-align: center; gap: 4px; padding: 12px 8px; border: 2px solid var(--ink); border-radius: var(--r-tile); background: var(--tint); }
.sn-tile b { font-family: var(--display); }
.sn-tile small { color: var(--muted); font-size: var(--fs-xs); }
.sn-tile.is-none { background: var(--tint-2); border-style: dashed; }
.sn-tile.is-aside { background: var(--hi); box-shadow: 0 0 0 4px var(--sn-g) /* style-ok: the shard's own glow */; }
.sn-tile form { margin: 0; }
.sn-tile .btn { min-height: 44px; }
.sn-on { background: var(--sun-glow); }
.sn-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: var(--sn-c) /* style-ok: the shard's land color */; flex: none; }
.sn-who-list { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.sn-who-list li { display: flex; gap: 6px; align-items: center; }
.sn-who-list small { color: var(--muted); }
.sn-mine .btn-row { margin-top: 12px; }
.sn-waits { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.sn-waits li { display: flex; gap: 10px; align-items: center; }
.sn-waits li > div { flex: 1; display: grid; min-width: 0; }
.sn-waits small { color: var(--muted); }
.sn-waits .btn { min-height: 44px; min-width: 64px; justify-content: center; }
.sn-back { justify-content: center; }

/* The pictures' motion: two twinkle sets and your climbing shard on the Night, today's shard falling in during the build-up. Each
   group moves as one element (opacity and transform only); off under the site setting and the OS one. */
.sn-tw1, .sn-tw2 { opacity: 0; }
body:not(.reduce-motion) .sn-tw1 { animation: sn-tw 3.4s ease-in-out infinite; }
body:not(.reduce-motion) .sn-tw2 { animation: sn-tw 3.4s ease-in-out -1.7s infinite; }
body:not(.reduce-motion) .sn-you { animation: sn-up 5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
body:not(.reduce-motion) .sn-fall0 { animation: sn-fall 7s cubic-bezier(.4, 0, .9, .6) infinite; transform-box: view-box; }
body:not(.reduce-motion) .sn-fall1, body:not(.reduce-motion) .sn-fall2 { animation: sn-glow 4s ease-in-out infinite; }
@keyframes sn-tw { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes sn-up { 0% { transform: translateY(14px); opacity: .6; } 40%, 100% { transform: none; opacity: 1; } }
@keyframes sn-fall { 0% { transform: translate(120px, -130px); opacity: 0; } 10% { opacity: 1; } 40%, 100% { transform: none; opacity: 1; } }
@keyframes sn-glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
body.reduce-motion .sn-tw1, body.reduce-motion .sn-tw2 { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .sn-tw1, .sn-tw2, .sn-you, .sn-fall0, .sn-fall1, .sn-fall2, .sn-drop, .sn-trail, .sn-pool, .sn-twinkle { animation: none !important; }
  .sn-tw1, .sn-tw2 { opacity: 1; }
}

/* The starshard's pick-up card on a land page (services/stars.js starCards): the shard drops into its dip once, then only its two
   sparkles twinkle. */
.star-here.sn-here { border-color: var(--sky); }
.star-here.sn-here svg { animation: none; }
body:not(.reduce-motion) .sn-here .sn-drop { animation: sn-drop 1.4s cubic-bezier(.5, 0, .8, .4) both; transform-box: view-box; }
body:not(.reduce-motion) .sn-here .sn-trail { animation: sn-trail 1.6s linear both; }
body:not(.reduce-motion) .sn-here .sn-pool { animation: sn-pool 1.8s ease-out both; transform-origin: 50px 86px; transform-box: view-box; }
body:not(.reduce-motion) .sn-here .sn-twinkle { animation: sn-twinkle 2.4s ease-in-out 1.6s infinite; }
@keyframes sn-drop { 0% { transform: translate(28px, -120px); opacity: 0; } 20% { opacity: 1; } 85% { transform: translate(0, 0); } 90% { transform: translate(0, 2px); } 100% { transform: none; } }
@keyframes sn-trail { 0%, 10% { opacity: 0; } 40%, 60% { opacity: .9; } 100% { opacity: .35; } }
@keyframes sn-pool { 0%, 70% { opacity: 0; transform: scale(.4); } 85% { opacity: 1; transform: scale(1.1); } 100% { opacity: .85; transform: none; } }
@keyframes sn-twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* The Frostpeak land card (routes/world.js SEASON_CARDS): a crop of the wide picture above the words on phones, beside them
   from 768px. It ships only a wide crop, so it shows at every width. */
.sn-land { display: grid; gap: 16px 24px; align-items: center; padding: 16px; text-align: center; }
.sn-land-pic { display: block; border-radius: var(--r-tile); }
.sn-land-pic svg { display: block; width: 100%; height: auto; border: var(--line) solid var(--ink); border-radius: var(--r-tile); box-sizing: border-box; }
.sn-land-txt { display: grid; justify-items: center; gap: 8px; }
.sn-land-txt h2, .sn-land-txt p { margin: 0; }
.sn-land-txt .btn-row { justify-self: stretch; justify-content: center; margin-top: 4px; }
@media (min-width: 768px) {
  .sn-land { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); text-align: left; }
  .sn-land-txt { justify-items: start; }
  .sn-land-txt .btn-row { justify-content: flex-start; }
}

@media (max-width: 767px) {
  .sn-frame.sn-wide { display: none; }
  .sn-frame.sn-tall { display: block; }
  /* phones: today's shard, then your shards, then the wrap card (the desktop grid pairs today and wrap side by side) */
  .sn-grid { display: contents; }
  .sn-today { order: 1; } .sn-got { order: 2; } .sn-shards { order: 3; } .sn-wrap { order: 4; } .sn-back { order: 5; }
  .sn-today-row { flex-direction: column; text-align: center; }
  .sn-today h2, .sn-sub { text-align: center; }
  .sn-shards .head-row, .sn-who .head-row { flex-direction: column; align-items: center; text-align: center; }
  .sn-shards > p, .sn-wrap > p, .sn-wrap h2, .sn-mine h2, .sn-got h2 { text-align: center; }
  .sn-today .btn-row .btn, .sn-wrap-form .btn, .sn-mine .btn-row .btn, .sn-land-txt .btn { width: 100%; min-height: 44px; justify-content: center; }
  .sn-mine .btn-row { flex-direction: column; }
  .sn-gift-row { flex-direction: column; text-align: center; }
  .sn-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* the shard card sits under the land banner, so on phones it stays short: the shard beside the words, the button under both */
  .star-here.sn-here { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 12px; align-items: center; padding: 12px; }
  .star-here.sn-here > svg { width: 56px; height: 56px; }
  .star-here.sn-here h2 { font-size: 1.1rem; margin: 0 0 2px; }
  .star-here.sn-here p { font-size: var(--fs-sm); }
  .star-here.sn-here form { grid-column: 1 / -1; margin: 0; }
  .star-here.sn-here .btn { width: 100%; min-height: 44px; justify-content: center; }
}
