:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #17181c;
  --soft: rgba(23, 24, 28, 0.58);
  --line: rgba(23, 24, 28, 0.1);
  --accent: #e8792b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 8px 12px;
}
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ss { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(348px, 100%); padding: 16px 16px 14px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(23, 24, 28, 0.35); }
.ss__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 2px; }
.ss__what { display: grid; gap: 1px; min-width: 0; }
.ss__what strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; }
.ss__what span { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.ss__clip { display: block; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap; }
.ss__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }
.ss__pill { flex: none; height: 26px; padding: 5px 11px; border-radius: 13px; background: rgba(23, 24, 28, 0.05); font-size: 12px; font-weight: 680; color: var(--ink); transition: background-color 0.4s ease, color 0.4s ease; }
.ss.is-gold .ss__pill { background: color-mix(in srgb, var(--accent) 16%, #ffffff); color: color-mix(in srgb, var(--accent) 80%, #3a1c05); }
.ss.is-night .ss__pill { background: #1c2238; color: #e8ecff; }

/* the sky: colours, sun and passed arc are all written by the script from one number, the hour */
.ss__sky { position: relative; height: min(150px, 34vh); border-radius: 18px; overflow: hidden; cursor: ew-resize; touch-action: pan-y; outline: none; }
.ss__sky:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.ss__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ss__arc { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.400; stroke-dasharray: 2 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ss__done { fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
/* the sun is an ordinary round element laid over the stretched drawing, so it never becomes an oval */
.ss__above { position: absolute; left: 0; right: 0; top: 0; height: 74.667%; overflow: hidden; pointer-events: none; }
.ss__sun, .ss__halo { position: absolute; left: 50%; top: 50%; border-radius: 50%; }
.ss__sun { width: 18px; height: 18px; margin: -9px 0 0 -9px; background: #ffd23f; }
.ss__halo { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: radial-gradient(closest-side, rgba(255, 243, 196, 0.75), rgba(255, 243, 196, 0)); }
.ss__ground { fill: #1d1f27; }
.ss__horizon { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ss__tick { fill: none; stroke: #ffffff; stroke-width: 1.500; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ss__hair { stroke: rgba(255, 255, 255, 0.7); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 0.2s ease; }
.ss__sky.is-read .ss__hair { opacity: 1; }
.ss__at { position: absolute; bottom: 5px; width: 44px; margin-left: -22px; text-align: center; font-size: 10.500px; line-height: 14px; font-weight: 680; color: rgba(255, 255, 255, 0.86); pointer-events: none; }
.ss__at--rise { left: 12.500%; }
.ss__at--set { left: 87.500%; }

.ss__now { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px; }
.ss__time { flex: none; height: 36px; }
.ss__time b { display: block; font-size: 34px; line-height: 36px; font-weight: 680; font-stretch: 86%; letter-spacing: -0.02em; }
.ss__left { min-width: 0; font-size: 12.500px; font-weight: 640; color: var(--soft); }
.ss__clip--left { text-align: right; }
.ss__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-top: 10px; border-top: 1.500px solid var(--line); }
.ss__facts div { display: grid; gap: 1px; padding: 0 2px; }
.ss__facts dt { font-size: 11px; line-height: 14px; font-weight: 600; color: var(--soft); }
.ss__facts dd { font-size: 13.500px; line-height: 18px; font-weight: 720; white-space: nowrap; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (max-width: 350px) { .ss { padding: 14px 12px 12px; } .ss__time b { font-size: 30px; } .ss__left { font-size: 12px; } }
@media (max-height: 400px) { .ss { gap: 10px; } .ss__facts { padding-top: 8px; } }
@media (prefers-reduced-motion: reduce) { .ss__pill, .ss__hair { transition: none; } }
