/* Countdowns (src/countdown.js, public/countdown/cd.js). Loads after cal.css; --ac is set per holiday. */
.cd { background: #fff; border-radius: 18px; padding: 22px 16px 18px; margin-bottom: 20px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.07); border-top: 6px solid var(--ac); }
.cd-big { font-size: 22px; color: var(--ink); line-height: 1.2; margin-bottom: 14px; }
.cd-days { display: block; font-size: 84px; line-height: 1; font-weight: 850; color: var(--ac); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cd-unit { font-weight: 700; }
.cd-today { display: none; font-size: 30px; font-weight: 800; color: var(--ac); margin: 8px 0 14px; }
.cd.is-today .cd-big, .cd.is-today .cd-clock, .cd.is-today .cd-line { display: none; }
.cd.is-today .cd-today { display: block; }
.cd-clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 460px; margin: 0 auto 14px; }
.cd-clock div { background: var(--cream); border-radius: 12px; padding: 10px 4px 8px; }
.cd-clock b { display: block; font-size: 30px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-clock span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cd-line { font-size: 15.5px; color: #44403c; line-height: 1.6; margin-bottom: 6px; }
.cd-tz { margin-bottom: 12px; }
.cd-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cd-btn { font: inherit; font-size: 14.5px; font-weight: 650; border: 1.5px solid var(--ac); color: var(--ac); background: #fff; border-radius: 99px; padding: 9px 16px; min-height: 44px; cursor: pointer; }
.cd-btn:hover { background: var(--cream); }
ul.dates .in { color: var(--muted); font-size: 13.5px; margin-left: 4px; }
ul.dates a { color: var(--ac); }

/* sister-site panel */
.w24 { border-left: 5px solid #15803d; }
.btn24 { display: inline-block; background: #15803d; color: #fff !important; text-decoration: none; font-weight: 700; border-radius: 99px; padding: 11px 18px; }

/* sleeps chart */
.chart-opts { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14.5px; margin: 4px 0 10px; }
.chart-opts label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.chart { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.chart svg { width: 100%; height: auto; display: block; }

/* any-date maker */
.maker label { display: block; font-size: 14px; font-weight: 650; color: var(--ink); margin-bottom: 10px; }
.maker input { display: block; width: 100%; margin-top: 5px; font: inherit; font-size: 16px; padding: 10px 12px; border: 1.5px solid #d6d3d1; border-radius: 10px; background: #fff; color: var(--ink); }
.maker input.bad { border-color: #dc2626; }
.mk-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cd-label { font-weight: 700; }

/* full screen */
.cd-full { position: fixed; inset: 0; z-index: 2147483000; background: #111827; color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.cd-full.snowy { background: radial-gradient(ellipse at 50% 120%, #1e3a5f, #0b1324 70%); }
.fs-in { position: relative; z-index: 2; padding: 20px; }
.fs-n { font-size: min(34vw, 46vh); font-weight: 850; line-height: .95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.fs-u { font-size: min(6vw, 8vh); font-weight: 700; margin-top: 1vh; }
.fs-c { font-size: min(4.5vw, 5vh); opacity: .75; margin-top: 1.5vh; font-variant-numeric: tabular-nums; }
.fs-x { position: absolute; top: 14px; right: 14px; z-index: 3; font: inherit; font-size: 15px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 99px; padding: 9px 16px; cursor: pointer; }
.fs-snow { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fs-snow i { position: absolute; top: -12px; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: cd-fall linear infinite; will-change: transform; }
@keyframes cd-fall { to { transform: translate3d(30px, 105vh, 0); } }

@media (max-width: 520px) {
  .cd-days { font-size: 68px; }
  .cd-clock b { font-size: 24px; }
  .mk-row.two { grid-template-columns: 1fr; }
}

@media print {
  @page { size: letter portrait; margin: 0.5in; }
  body { background: #fff; }
  body > *:not(.container), .container > *:not(#chart-panel), #chart-panel > *:not(#chart) { display: none !important; }
  .container { padding: 0; max-width: none; }
  #chart-panel { box-shadow: none; padding: 0; margin: 0; }
  #chart { border: 0; padding: 0; }
}
