/* நாள்காட்டி -- the daily panchangam screen and its home card.
 *
 * Built only from style.css's tokens and shapes: brass marks today and now,
 * an ivory fill marks the day chosen, --good / --bad always travel with an
 * icon or a word, and Tamil is never letter-spaced. Phone first; from 1000px
 * the month sits in a left column and the day reads beside it; from 1440px
 * the day itself splits in two, so a wide screen is filled, centred. */

/* ---------- the home card ---------- */
.cal-hero {
  order: -1; display: flex; align-items: center; gap: 14px; width: 100%; max-width: 560px;
  padding: 12px 16px 12px 12px; border-radius: 22px; text-align: left; cursor: pointer;
  color: var(--ivory); font: inherit;
  background: rgba(7,8,14,.46); border: 1px solid rgba(230,190,106,.40);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: border-color .2s, background .2s;
}
.cal-hero:hover { border-color: var(--brass); background: rgba(7,8,14,.6); }
.cal-hero:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.cal-hero-date {
  flex-shrink: 0; width: 58px; height: 62px; border-radius: 14px; display: grid; place-content: center;
  text-align: center; border: 1px solid var(--brass-line); background: var(--brass-wash);
}
.cal-hero-date b { font-family: var(--latin); font-size: 32px; font-weight: 400; line-height: 1; }
.cal-hero-date span { font-size: 11.5px; color: var(--brass); }
.cal-hero-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cal-hero-line { font-size: 13px; color: var(--brass); }
.cal-hero-facts { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13.5px; line-height: 1.45; color: var(--soft); }
.cal-hero > svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--brass); }
@media (max-height: 740px) and (max-width: 699px) {
  .cal-hero { padding: 8px 14px 8px 8px; }
  .cal-hero-date { width: 46px; height: 46px; }
  .cal-hero-date b { font-size: 24px; }
  .cal-hero-facts span:nth-child(n+3) { display: none; }
}

/* ---------- the screen ---------- */
.birth.cal .cal-wrap { max-width: 720px; gap: 16px; }
.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-placebtn {
  min-height: 44px; padding: 0 12px 0 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(7,8,14,.45); border: 1px solid var(--line-2); color: var(--ivory); font: inherit; font-size: 15px;
}
.cal-placebtn:hover, .cal-placebtn[aria-expanded="true"] { border-color: var(--brass); }
.cal-placebtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cal-placebtn .chev { width: 14px; height: 14px; color: var(--dim); }
.cal-place { gap: 14px; }
.cal-place .field { position: relative; }
.cal-place #calHere { align-self: flex-start; }
.cal-place #calHere svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.cal-cols { display: flex; flex-direction: column; gap: 16px; }
.cal-headarea, .cal-bodyarea { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* The sheet's top: a big numeral, the weekday and month, the Tamil date. */
.cal-head { display: flex; flex-direction: column; gap: 10px; }
.cal-head h1 { display: flex; align-items: flex-end; gap: 14px; margin: 0; font-size: inherit; }
.cal-head h1:focus { outline: none; }
.cal-num {
  font-family: var(--latin); font-weight: 400; font-size: clamp(88px, 27vw, 124px);
  line-height: .82; color: var(--ivory); font-variant-numeric: lining-nums tabular-nums;
}
.cal-wd { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; }
.cal-wd b { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ivory); }
.cal-wd span { font-size: 15px; color: var(--mist); }
.cal-tdate {
  align-self: flex-start; display: inline-flex; align-items: baseline; gap: 8px;
  padding: 6px 14px; border-radius: 14px; border: 1px solid var(--brass-line); background: rgba(7,8,14,.45);
}
.cal-tdate .m { font-size: 14px; color: var(--brass); }
.cal-tdate b { font-family: var(--latin); font-size: 30px; font-weight: 400; line-height: 1; }
.cal-tdate .y { font-size: 13px; color: var(--dim); }
.cal-tdate.differs { border-style: dashed; }
.cal-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cal-badge {
  font-size: 13px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(7,8,14,.45); color: var(--soft);
}
.cal-badge.good { border-color: rgba(124,199,214,.45); color: var(--good); }
.cal-badge.bad { border-color: rgba(233,131,92,.5); color: var(--bad); }
.cal-badge.obs { border-color: var(--brass-line); color: var(--brass-hi); }

/* The printed sheet's bottom block: six facts at a glance. */
.cal-glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cal-tile {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 18px; min-width: 0;
  background: rgba(13,16,25,.84); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.cal-tile .k { font-size: 12px; color: var(--brass); }
.cal-tile.good .k { color: var(--good); }
.cal-tile.bad .k { color: var(--bad); }
.cal-tile b { font-size: 16px; font-weight: 600; color: var(--ivory); line-height: 1.35; }
.cal-tile .s { font-size: 12.5px; color: var(--dim); line-height: 1.4; }

/* Moving between days: the week strip, opening into the month. */
.cal-nav {
  position: sticky; top: calc(var(--top) + env(safe-area-inset-top)); z-index: 20;
  display: flex; flex-direction: column; gap: 10px; padding: 10px 0;
  background: linear-gradient(180deg, var(--ink) 82%, rgba(7,8,14,0));
}
.cal-nav:has(.cal-month.open) { position: static; }
.cal-navrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-mtoggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px;
  background: none; border: 0; color: var(--ivory); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.cal-mtoggle .chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; color: var(--dim); transition: transform .2s; }
.cal-mtoggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wday {
  min-height: 56px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; padding: 4px 0; background: var(--ink-2); border: 1px solid var(--line); color: var(--ivory); font: inherit; cursor: pointer;
}
.cal-wday .w { font-size: 11px; color: var(--dim); }
.cal-wday b { font-family: var(--latin); font-size: 20px; font-weight: 400; line-height: 1.1; }
.cal-wday .t { font-size: 10.5px; color: var(--faint); min-height: 14px; }
.cal-wday.today { background: var(--brass-wash); border-color: var(--brass-line); }
.cal-wday[aria-pressed="true"] { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }
.cal-wday[aria-pressed="true"] .w, .cal-wday[aria-pressed="true"] .t { color: rgba(7,8,14,.7); }
.cal-wday[aria-pressed="true"].today { box-shadow: 0 0 0 2px var(--brass); }

/* Table cells cannot be size containers, so the month is: a cell is
 * (width - 32px) / 7 wide, 54px at 410px and 64px at 480px. */
.cal-month { display: none; container-type: inline-size; }
.cal-month.open { display: block; }
.cal-mnav { display: none; justify-content: flex-end; gap: 8px; }
.cal-month.open ~ .cal-mnav { display: flex; }
.cal-mnav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cal-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.cal-grid th { font-size: 12px; font-weight: 600; color: var(--dim); padding: 4px 0; }
.cal-grid td { padding: 0; }
.cal-grid button {
  position: relative; width: 100%; min-height: 56px; aspect-ratio: 1 / 1.18; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; padding: 6px 2px 18px;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--ivory); font: inherit; cursor: pointer;
}
.cal-grid button b { font-family: var(--latin); font-size: 19px; font-weight: 400; line-height: 1.1; }
.cal-grid .t { font-size: 10.5px; color: var(--dim); }
.cal-grid .ph { position: absolute; top: 3px; right: 6px; font-size: 10px; color: var(--brass); }
.cal-grid .st { display: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: var(--mist); }
.cal-grid .ph.full { color: var(--ivory); }
.cal-grid td.out button { opacity: .45; }

/* The month's special days: one colour per kind, shared by the grid's
 * marks and the list's rows. A day no book bars a wedding is washed in
 * turmeric, as a printed calendar picks out its wedding days. */
.k-subha { --k: #F2CF4A; }
.k-siva { --k: #8DB8EA; }
.k-vishnu { --k: #F0A347; }
.k-vel { --k: #EF6F6C; }
.k-ganesha { --k: #7FCF8A; }
.k-moon { --k: #C9C3D3; }
.cal-grid .mks { position: absolute; left: 0; right: 0; bottom: 5px; display: flex; justify-content: center; gap: 2px; }
.cal-grid .mk { display: block; color: var(--k); line-height: 0; }
.cal-grid .mk svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@container (max-width: 409.98px) { .cal-grid button { min-height: 62px; } }
@container (min-width: 410px) { .cal-grid .mk svg { width: 14px; height: 14px; } }
@container (min-width: 480px) { .cal-grid button { aspect-ratio: 1 / 1.2; } .cal-grid .st { display: block; } }
.cal-grid td.subha button {
  background: linear-gradient(180deg, rgba(242,207,74,.16), rgba(242,207,74,0) 70%), var(--ink-2);
  box-shadow: inset 0 3px 0 #F2CF4A;
}
.cal-grid td.karinal button { box-shadow: inset 0 -3px 0 rgba(233,131,92,.75); }
.cal-grid td.karinal.subha button { box-shadow: inset 0 3px 0 #F2CF4A, inset 0 -3px 0 rgba(233,131,92,.75); }
.cal-grid td.today button { background: var(--brass-wash); border-color: var(--brass-line); }
.cal-grid td[aria-selected="true"] button { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }
.cal-grid td[aria-selected="true"] .t, .cal-grid td[aria-selected="true"] .st { color: rgba(7,8,14,.72); }
.cal-grid td[aria-selected="true"] .ph.full { color: var(--ink); }
.cal-grid td[aria-selected="true"] .mks {
  left: 50%; right: auto; transform: translateX(-50%); padding: 2px 4px; border-radius: 7px; background: var(--ink);
}
.cal-grid button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.cal-special { display: none; padding-top: 4px; }
.cal-month.open ~ .cal-special { display: block; }
.cal-special h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--brass); }
.cal-special ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cal-special li {
  display: flex; align-items: center; gap: 10px; padding: 3px 8px 3px 3px; border-radius: 12px;
  background: rgba(243,236,223,.03); border: 1px solid var(--line); border-left: 3px solid var(--k, var(--line));
}
.cal-special img, .cal-special .noimg { flex: none; width: 38px; height: 38px; border-radius: 9px; background: var(--ink); }
.cal-special li > div { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cal-special b { flex: 1 1 auto; font-size: 13.5px; font-weight: 600; color: var(--ivory); }
.cal-special .ds { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin-left: auto; }
.cal-special .ds button {
  min-width: 32px; height: 30px; padding: 0 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--k, var(--brass)) 50%, transparent);
  background: color-mix(in srgb, var(--k, var(--brass)) 12%, transparent);
  color: var(--ivory); font: inherit; font-family: var(--latin); font-size: 13px;
}
.cal-special .ds button:hover { background: color-mix(in srgb, var(--k, var(--brass)) 24%, transparent); }
.cal-special .ds button.on { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }
.cal-special .ds button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.cal-special .none { font-size: 12.5px; color: var(--dim); }
.cal-special .cal-small { flex-basis: 100%; margin: 0; font-size: 11.5px; line-height: 1.4; }

/* ---------- the day's cards ---------- */
.cal-body { display: flex; flex-direction: column; gap: 14px; transition: opacity .2s; }
.cal-day-main, .cal-day-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cal-body[aria-busy="true"] { opacity: .55; }
.cal-card h2 { margin: 0 0 12px; font-size: 18px; }
.cal-small { font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.cal-small.good { color: var(--good); }
.cal-ico {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: inline-grid; place-items: center;
}
.cal-ico svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cal-ico.good { background: rgba(124,199,214,.14); color: var(--good); }
.cal-ico.mid { background: rgba(230,190,106,.14); color: var(--mid); }
.cal-ico.bad { background: rgba(233,131,92,.14); color: var(--bad); }
.cal-card .cref { margin-left: 4px; border: 0; cursor: pointer; font-family: inherit; }
.cal-card .cref:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* Sunrise to the next sunrise: bars for what to avoid and what is good. */
.cal-line { position: relative; height: 40px; border-radius: 10px; overflow: hidden; background: rgba(243,236,223,.06); }
.cal-night { position: absolute; top: 0; bottom: 0; right: 0; background: var(--ink-3); }
.cal-lane { position: absolute; left: 0; right: 0; height: 14px; }
.cal-lane:nth-child(2) { top: 5px; }
.cal-lane:nth-child(3) { bottom: 5px; }
.cal-band { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.cal-band.bad { background: rgba(233,131,92,.55); }
.cal-band.good { background: rgba(124,199,214,.55); }
.cal-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ivory); box-shadow: 0 0 8px rgba(243,236,223,.6); }
.cal-ticks { display: flex; justify-content: space-between; margin: 6px 0 12px; font-size: 11.5px; color: var(--dim); }

.cal-times { margin: 0; display: flex; flex-direction: column; }
.cal-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; padding: 9px 0; border-top: 1px solid rgba(243,236,223,.07); }
.cal-row dt { font-size: 14px; color: var(--mist); display: flex; align-items: center; gap: 6px; }
.cal-row dt svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cal-row dd { margin: 0; font-size: 14.5px; color: var(--ivory); line-height: 1.5; }
.cal-row.good dt { color: var(--good); }
.cal-row.bad dt { color: var(--bad); }

.cal-limbs { margin: 0; display: flex; flex-direction: column; }
.cal-limb { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid rgba(243,236,223,.07); }
.cal-limb:first-child { border-top: 0; }
.cal-limb dt { font-size: 13px; color: var(--brass); padding-top: 2px; }
.cal-limb dd { margin: 0; }
.cal-limb ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cal-limb li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14.5px; }
.cal-limb li b { font-weight: 600; color: var(--ivory); }
.cal-limb li > span:last-child { font-size: 13px; color: var(--dim); }
.cal-limb li.now b { color: var(--brass-hi); }
.cal-limb li.now::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); align-self: center; }
.cal-limb li.past b, .cal-limb li.past span { color: var(--faint); }

.cal-ca { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; }
.cal-ca + .cal-ca { padding-top: 10px; border-top: 1px solid rgba(243,236,223,.07); }
.cal-ca-rasi { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 15px; color: var(--mist); }
.cal-ca-rasi b { font-family: var(--serif); font-size: 20px; color: var(--ivory); }
.cal-ca-rasi span { font-size: 13px; color: var(--dim); }
.cal-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cal-pills li { font-size: 13px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--soft); }
.cal-pills li span { color: var(--dim); }

/* The verdict is a sentence, so it takes its own line under the work's name
 * instead of a squeezed column beside it. */
.cal-check .prow summary { gap: 4px 10px; flex-wrap: wrap; padding: 10px 0; }
.cal-check .p-name { flex: 1 1 auto; }
.cal-check .p-grade { order: 3; flex-basis: 100%; padding-left: 36px; text-align: left; font-weight: 500; font-size: 13.5px; line-height: 1.45; }
.cal-check .prow .chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.cal-clear { margin: 0 0 8px 36px; font-size: 14px; color: var(--good); }
.cal-reasons { margin: 0 0 12px 36px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cal-reasons li { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.5; color: var(--soft); }
.cal-reasons .cal-ico { width: 20px; height: 20px; margin-top: 1px; }
.cal-reasons .cal-ico svg { width: 11px; height: 11px; }
.cal-check + .dasa-note { margin-top: 12px; }

.cal-dos { display: grid; gap: 14px; }
.cal-dos h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 15px; }
.cal-dos h3.good { color: var(--good); }
.cal-dos h3.bad { color: var(--bad); }
.cal-dos ul { margin: 0; padding: 0 0 0 34px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.55; }

.cal-obs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cal-obs li { display: flex; flex-direction: column; gap: 2px; }
.cal-obs b { font-family: var(--serif); font-size: 17px; }

.cal-fold summary {
  list-style: none; display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; font-size: 16px; font-weight: 600;
}
.cal-fold summary::-webkit-details-marker { display: none; }
.cal-fold .chev { margin-left: auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; color: var(--dim); transition: transform .2s; }
.cal-fold[open] .chev { transform: rotate(180deg); }
.cal-fold + .cal-fold { border-top: 1px solid rgba(243,236,223,.07); }
.cal-hora { margin: 0 0 8px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.cal-hora li { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; padding: 4px 0; }
.cal-hora li span { color: var(--dim); }
.cal-hora li.now b { color: var(--brass-hi); }
.cal-sources { margin: 0 0 8px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cal-sources .cite { text-align: left; background: none; cursor: pointer; font: inherit; font-size: 13px; color: var(--soft); }
.cal-sources .cite:hover { border-color: var(--brass-line); }
.cal-notes { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--dim); }
.cal-retry { align-self: flex-start; }
.err.hidden + .cal-retry { display: none; }
.cal-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- a book line, opened ---------- */
.csheet .cs-panel {
  inset: auto 0 0 0; max-height: 82dvh; overflow-y: auto; border-radius: 26px 26px 0 0;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2);
}
.cs-body { display: flex; flex-direction: column; gap: 10px; padding-right: 44px; }
.cs-body h2 { margin: 0; font-size: 22px; }
.cs-body p { margin: 0; line-height: 1.6; }
.cal-quote {
  margin: 4px 0; padding: 12px 14px; border-radius: 12px; border-left: 3px solid var(--brass);
  background: rgba(230,190,106,.06); font-family: var(--serif); font-size: 16px; line-height: 1.7; color: var(--ivory);
}

@media (min-width: 700px) {
  .cal-glance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cal-dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .csheet .cs-panel {
    inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(640px, 92vw); max-height: 80vh; border-radius: 28px; border: 1px solid var(--line-2);
    box-shadow: 0 50px 140px rgba(0,0,0,.6);
  }
}
@media (min-width: 1000px) {
  /* Its own row under the two buttons: a zero-height break before it, since
   * a max-width would otherwise let it squeeze in beside them. */
  .hero-cta { flex-wrap: wrap; }
  .hero-cta::after { content: ''; order: 2; flex-basis: 100%; height: 0; margin-top: -12px; }
  .cal-hero { order: 3; max-width: 600px; }
  .birth.cal { padding-left: var(--gutter); padding-right: var(--gutter); }
  .birth.cal .cal-wrap { max-width: 1240px; margin-left: auto; margin-right: auto; }
  .birth.cal::before {
    background:
      linear-gradient(90deg, rgba(7,8,14,.6) 0%, rgba(7,8,14,.9) 25%, rgba(7,8,14,.9) 75%, rgba(7,8,14,.6) 100%),
      var(--ink) url(/static/img/sky-1920.webp) 60% 50% / cover no-repeat;
  }
  .cal-cols {
    display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); gap: 28px;
    grid-template-areas: "nav head" "nav body"; align-items: start;
  }
  .cal-headarea { grid-area: head; }
  .cal-bodyarea { grid-area: body; }
  .cal-nav {
    grid-area: nav; position: sticky; top: calc(var(--top) + 16px); padding: 16px; border-radius: 22px;
    background: var(--ink-2); border: 1px solid var(--line);
    max-height: calc(100dvh - var(--top) - 32px); overflow-y: auto; scrollbar-width: thin;
  }
  .cal-nav:has(.cal-month.open) { position: sticky; }
  .cal-week, .cal-mtoggle .chev { display: none; }
  .cal-mtoggle { pointer-events: none; }
  .cal-month, .cal-month.open, .cal-special { display: block; }
  .cal-mnav { display: flex; position: absolute; top: 16px; right: 16px; }
  .cal-navrow { padding-right: 96px; }
}
/* A big screen: the month, then the day's hours under its header, then the
 * rest of the day in a column of its own. The day's two groups step out of
 * their box (display: contents) to take those columns; the error, when
 * there is one, gets a row of its own so it never sits on the cards. */
@media (min-width: 1440px) {
  .birth.cal .cal-wrap { max-width: 1680px; }
  .cal-cols {
    grid-template-columns: minmax(400px, min(30vw, 540px)) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: min-content min-content 1fr; row-gap: 0;
    grid-template-areas: "nav head side" "nav err side" "nav body side";
  }
  .cal-headarea { margin-bottom: 16px; }
  .cal-bodyarea, .cal-body { display: contents; }
  #calErr, .cal-retry { grid-area: err; justify-self: start; margin-bottom: 14px; }
  .cal-day-main { grid-area: body; }
  .cal-day-side { grid-area: side; }
  .cal-day-main, .cal-day-side { transition: opacity .2s; }
  .cal-body[aria-busy="true"] > * { opacity: .55; }
}
/* A month column wide enough for two: the list halves its height, so the
 * month and its special days fit a 1080-line screen together. */
@media (min-width: 1680px) {
  .cal-special ul { grid-template-columns: 1fr 1fr; }
  .cal-special li.k-subha { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-body, .cal-day-main, .cal-day-side, .cal-hero, .cal-mtoggle .chev, .cal-fold .chev { transition: none; }
}
