/* Night Sky Tonight: your sky as a dome, with a hillside around the rim.
 * One Page Toys tool family, self-contained, theme-aware (light/dark).
 * The page chrome follows the theme; the dome is always the night (it takes
 * the color of the real sky at the chosen moment, from dusk blue to black). */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&display=swap");

:root{
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ink: #1b1d2b;
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #eceef7;
  --muted: #666a80;
  --line: #e1e4f0;
  --line-strong: #c9cde0;
  --accent: #4451b8;
  --accent-hover: #3542a3;
  --gold: #d99a2b;
  --accent-soft: rgba(68, 81, 184, 0.13);
  --radius: 20px;
  --radius-sm: 13px;
  --radius-pill: 999px;
  --shadow: 0 2px 8px rgba(26, 30, 60, 0.06);
  --shadow-md: 0 8px 22px rgba(26, 30, 60, 0.10);
  --shadow-lg: 0 18px 44px rgba(26, 30, 60, 0.18);
  --glass: rgba(255, 255, 255, 0.78);
}
:root[data-theme="dark"]{
  --ink: #ecedf5;
  --bg: #0b0c13;
  --surface: #15171f;
  --surface-2: #1e2029;
  --muted: #9a9db2;
  --line: #242732;
  --line-strong: #373a4a;
  --accent: #9aa4ff;
  --accent-hover: #b3bbff;
  --gold: #f3c266;
  --accent-soft: rgba(154, 164, 255, 0.16);
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 10px 30px -6px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 50px -10px rgba(0, 0, 0, 0.7);
  --glass: rgba(21, 23, 31, 0.7);
}

*, *::before, *::after{ box-sizing: border-box; }
html, body{ height: 100%; -webkit-tap-highlight-color: transparent; }
body{
  margin: 0; min-height: 100%;
  display: flex; flex-direction: column;
  font-family: var(--font-sans); color: var(--ink);
  background: radial-gradient(70% 40% at 50% 0%, var(--accent-soft), transparent 72%), var(--bg);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Top bar (family chrome) ---------- */
.topbar{
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 30px);
  padding-top: max(14px, env(safe-area-inset-top));
  padding-left: max(clamp(16px, 4vw, 30px), env(safe-area-inset-left));
  padding-right: max(clamp(16px, 4vw, 30px), env(safe-area-inset-right));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand{ display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.brand__mark{ width: 1.1em; height: 1.1em; border: 1.5px solid var(--ink); border-radius: 6px; background: linear-gradient(90deg, var(--ink) 0 50%, var(--surface) 50% 100%); }
.topbar__right{ display: inline-flex; align-items: center; gap: 12px; }
.topbar__tag{ font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.iconbtn{ appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 1rem; line-height: 1; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease; }
.iconbtn:hover{ transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--ink); }
.iconbtn:focus-visible{ outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 5px var(--accent-soft), 0 0 0 6px var(--accent); }
.theme-toggle__sun, .theme-toggle__moon, .theme-toggle__auto{ display: none; }
:root[data-theme-mode="system"] .theme-toggle__auto{ display: inline; }
:root[data-theme-mode="light"] .theme-toggle__sun{ display: inline; }
:root[data-theme-mode="dark"] .theme-toggle__moon{ display: inline; }

/* ---------- Stage ---------- */
.stage{
  position: relative; z-index: 2; flex: 1 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
  padding: clamp(18px, 4vw, 40px) 16px clamp(48px, 6vw, 72px);
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: max(clamp(48px, 6vw, 72px), env(safe-area-inset-bottom));
}
.ns{
  width: 100%; max-width: 540px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
}
.ns__a, .ns__b{ display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }

.ns__head{ text-align: center; }
.eyebrow{ margin: 0 0 8px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.headline{
  margin: 0 auto; max-width: 20em;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 6.2vw, 2.4rem); line-height: 1.12; letter-spacing: -0.012em; color: var(--ink);
  font-variation-settings: "opsz" 120;
  text-wrap: balance;
}
.headline b, .headline .hl{ color: var(--accent); font-weight: 600; }
.sentence{
  margin: 12px auto 0; max-width: 36em;
  font-size: 0.95rem; line-height: 1.5; color: var(--ink);
  text-wrap: pretty;
}
.sentence .dim{ color: var(--muted); }

/* ---------- Place ---------- */
.place{
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow);
}
.place__sum{
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px; min-height: 48px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}
.place__sum::-webkit-details-marker{ display: none; }
.place__sum:focus-visible{ outline: none; box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
.place__pin{ width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; }
.place__name{ font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.place__tz{ font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.place__change{ margin-left: auto; flex: none; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.place[open] .place__change{ color: var(--muted); }
.place__body{ padding: 4px 14px 16px; display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.field{ display: grid; gap: 6px; min-width: 0; }
.field__k{ font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0; }
.field__in{
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1.5px solid var(--line-strong); border-radius: 10px;
  background: var(--surface-2); color: var(--ink);
  font: 600 0.95rem/1.2 var(--font-sans);
}
.field__in:focus{ outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.coords{ border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.coords__row{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fine{ margin: 0; font-size: 0.76rem; line-height: 1.5; color: var(--muted); }
.fine:empty, .fine[hidden]{ display: none; }
.fine--center{ text-align: center; padding: 0 8px; }
.fine--light{ margin: 8px 8px 0; color: rgba(255,255,255,0.7); text-align: center; }

/* ---------- Buttons ---------- */
.btn{
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 700 0.86rem/1.15 var(--font-sans); cursor: pointer; box-shadow: var(--shadow);
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--ink); }
.btn:active{ transform: translateY(1px); }
.btn--primary{ background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--block{ width: 100%; }
.btn:disabled{ opacity: 0.55; cursor: progress; transform: none; }
.btn[hidden]{ display: none; }
.btn:focus-visible, .chip:focus-visible, .tog:focus-visible, .date-in:focus-visible{
  outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 5px var(--accent);
}

/* ---------- The sky panel ---------- */
.panel{
  --sky-a: #121a36; --sky-b: #05070f;
  position: relative; width: 100%;
  padding: 10px 10px 12px;
  border-radius: var(--radius);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(255,255,255,0.07), transparent 70%),
    linear-gradient(180deg, var(--sky-a), var(--sky-b));
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden;
  color: #fff;
  transition: background 600ms ease;
}
.panel__bar{
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  min-height: 26px; margin: 2px 0 8px;
}
.status, .heading-pill{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: var(--radius-pill);
  background: rgba(8, 10, 20, 0.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; color: rgba(255,255,255,0.92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.status:empty, .heading-pill[hidden]{ display: none; }
.dome{
  display: block; width: 100%; aspect-ratio: 1 / 1; height: auto;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  cursor: crosshair; border-radius: 14px;
}
.dome:focus-visible{ outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,0.85), 0 0 0 5px rgba(154,164,255,0.55); }
.dome.is-grab{ cursor: grabbing; }
.hint{
  margin: 10px 8px 0; text-align: center;
  font-size: 0.7rem; line-height: 1.45; color: rgba(255,255,255,0.74);
  transition: opacity 400ms ease;
}
.hint.is-quiet{ opacity: 0.5; }
.toggles{ display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 2px; }
.tog{
  appearance: none; cursor: pointer; min-height: 36px; padding: 6px 13px;
  border-radius: var(--radius-pill); border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8);
  font: 700 0.72rem/1 var(--font-sans); letter-spacing: 0.02em;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.tog[hidden]{ display: none; }
.tog:hover{ border-color: rgba(255,255,255,0.4); }
.tog[aria-pressed="true"]{ background: rgba(243,194,102,0.92); color: #2c1d05; border-color: transparent; }
.sound-btn{
  position: absolute; right: 10px; top: 10px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; color: #fff;
  background: rgba(8, 10, 20, 0.36); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
  transition: background 160ms ease, transform 160ms ease;
}
.sound-btn:hover{ background: rgba(8, 10, 20, 0.55); }
.sound-btn:focus-visible{ outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(243,194,102,0.6); }
.sound-btn svg{ width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn .sb-spk{ fill: currentColor; }
.sound-btn .sb-off{ display: none; }
.sound-btn[aria-pressed="false"] .sb-on{ display: none; }
.sound-btn[aria-pressed="false"] .sb-off{ display: inline; }

/* the card that opens when you tap a star or planet */
.skycard{
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 4;
  padding: 12px 14px 12px;
  border-radius: 14px;
  background: rgba(10, 12, 24, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.14);
  color: #fff;
  animation: cardIn 260ms cubic-bezier(.2,.8,.2,1);
}
.skycard[hidden]{ display: none; }
@keyframes cardIn{ from{ opacity: 0; transform: translateY(10px); } to{ opacity: 1; transform: none; } }
.skycard__top{ display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding-right: 36px; }
.skycard__dot{ align-self: center; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px currentColor; flex: none; }
.skycard__name{ font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.005em; }
.skycard__sub{ font-size: 0.74rem; color: rgba(255,255,255,0.68); }
.skycard__x{
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.1); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.skycard__x:hover{ background: rgba(255,255,255,0.2); }
.skycard__x:focus-visible{ outline: none; box-shadow: 0 0 0 2px #fff; }
.skycard__grid{
  margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px 10px;
}
.skycard__grid div{ display: grid; gap: 1px; min-width: 0; }
.skycard__grid dt{ font-size: 0.58rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.skycard__grid dd{ margin: 0; font-size: 0.86rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; }
.skycard__note{ margin: 10px 0 0; font-size: 0.78rem; line-height: 1.45; color: rgba(255,255,255,0.78); }
.skycard__note:empty{ display: none; }

/* ---------- Time and date ---------- */
.when{
  padding: 14px 16px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow);
}
.when__line{ display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.when__line--date{ margin-top: 12px; align-items: center; }
.when__k{ font-size: 0.64rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.when__v{ font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.when__v--date{ font-size: 1.1rem; }
.when__sun{ font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip--now{ margin-left: auto; align-self: center; }
.date-nav{ margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.date-in{
  appearance: none; -webkit-appearance: none; min-height: 40px; max-width: 150px; padding: 6px 10px;
  border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); color: var(--ink);
  font: 600 0.82rem/1.2 var(--font-sans); color-scheme: light;
}
:root[data-theme="dark"] .date-in{ color-scheme: dark; }
.chips{ margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip{
  appearance: none; min-height: 40px; padding: 8px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--ink); cursor: pointer;
  font: 700 0.78rem/1 var(--font-sans);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.chip--sq{ width: 40px; padding: 0; font-size: 1.1rem; }
.chip:hover{ border-color: var(--ink); }
.chip:active{ transform: scale(0.97); }
.chip.is-on{ background: var(--ink); border-color: var(--ink); color: var(--bg); }
.night-axis{ display: flex; justify-content: space-between; font-size: 0.58rem; letter-spacing: 0.08em; color: var(--muted); margin-top: 2px; text-transform: uppercase; }

.range{
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 34px; margin: 4px 0 0; background: transparent; cursor: pointer; display: block;
  --track: linear-gradient(90deg, var(--line-strong), var(--line-strong));
}
.range::-webkit-slider-runnable-track{ height: 6px; border-radius: 999px; background: var(--track); }
.range::-moz-range-track{ height: 6px; border-radius: 999px; background: var(--track); }
.range::-webkit-slider-thumb{
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px;
  border-radius: 50%; background: var(--surface); border: 2.5px solid var(--accent);
  box-shadow: var(--shadow-md); cursor: grab;
}
.range::-moz-range-thumb{ width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--accent); box-shadow: var(--shadow-md); cursor: grab; }
.range:focus-visible{ outline: none; }
.range:focus-visible::-webkit-slider-thumb{ box-shadow: 0 0 0 6px var(--accent-soft), 0 0 0 7px var(--accent); }
.range:focus-visible::-moz-range-thumb{ box-shadow: 0 0 0 6px var(--accent-soft), 0 0 0 7px var(--accent); }
.range--night{ --track: linear-gradient(90deg, #8cc2ef, #f0a24a 22%, #1c2140 30%, #05060c 50%, #1c2140 70%, #f0a24a 78%, #8cc2ef); }

/* ---------- Cards ---------- */
.card{
  padding: 16px 16px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow);
  display: grid; gap: 12px; min-width: 0;
}
.card__head{ display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card__sub{ font-size: 0.74rem; color: var(--muted); }
.sec-title{ margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.005em; color: var(--ink); }

.rows{ list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.row{
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: 10px; align-items: center;
  padding: 9px 8px; margin: 0 -8px; border-radius: 10px;
  text-align: left; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; width: calc(100% + 16px);
  transition: background 140ms ease;
}
.row:hover{ background: var(--surface-2); }
.row:focus-visible{ outline: none; box-shadow: 0 0 0 2px var(--accent); }
.row.is-on{ background: var(--accent-soft); }
.row__ic{ width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #0a0d1c; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.row__ic canvas{ display: block; width: 30px; height: 30px; }
.row__main{ min-width: 0; display: grid; gap: 2px; }
.row__name{ font-weight: 700; font-size: 0.92rem; }
.row__name small{ font-weight: 500; color: var(--muted); font-size: 0.74rem; margin-left: 4px; }
.row__where{ font-size: 0.8rem; line-height: 1.35; color: var(--ink); }
.row__note{ font-size: 0.74rem; line-height: 1.4; color: var(--muted); }
.row__side{ text-align: right; display: grid; gap: 1px; font-variant-numeric: tabular-nums; }
.row__big{ font-family: var(--font-display); font-weight: 600; font-size: 1rem; white-space: nowrap; }
.row__small{ font-size: 0.66rem; color: var(--muted); white-space: nowrap; }
.row--sep{ margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line-strong); border-radius: 0 0 10px 10px; }
.rows__h{ margin: 8px 0 -2px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }

/* ---------- Stats ---------- */
.stats{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat{
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  min-width: 0;
}
.stat__k{ font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat__v{ font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__s{ font-size: 0.7rem; color: var(--muted); text-align: center; line-height: 1.3; }

/* share.js mounts its pill here */
.share-row{ display: flex; justify-content: center; margin: -4px 0 -6px; }
.share-row .opt-share{ --ops-fg: var(--ink); }
.backlink{ font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; transition: color 140ms ease, border-color 140ms ease; }
.backlink:hover{ color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Wide screens: the sky on the left, the list on the right ---------- */
@media (min-width: 980px){
  .ns{
    max-width: 1100px;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    column-gap: 28px;
  }
  .ns__head{ grid-column: 1 / -1; }
  .stats{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 360px){
  .coords__row{ grid-template-columns: 1fr; }
  .date-in{ max-width: 128px; }
}
@media (prefers-reduced-motion: reduce){
  .btn, .iconbtn, .chip, .tog, .hint, .panel, .sound-btn, .row{ transition: none; }
  .skycard{ animation: none; }
}
@media (max-width: 480px){
  /* a narrow phone: the time sits under the words instead of squeezing them */
  .row{ grid-template-columns: 30px minmax(0, 1fr); }
  .row__side{ grid-column: 2; display: flex; align-items: baseline; gap: 8px; text-align: left; margin-top: 2px; }
  .row__big{ font-size: 0.95rem; }
}

/* the shared tip-jar and fullscreen badges default to the right-center of the viewport,
 * which on a phone is exactly where the dome's sound button sits: dock them bottom-right */
.opt-tipjar.opt-tipjar{ top: auto; bottom: max(14px, env(safe-area-inset-bottom)); transform: none; }
.opt-fs.opt-fs{ top: auto; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 54px); transform: none; }
.opt-tipjar.opt-tipjar.tj-nudge{ animation: none; }
