html { color-scheme: light dark; }
body { margin: 0; }
[hidden] { display: none !important; }
/* Layout: a "tonight" banner, then the month grid as the main pane with a narrow side rail
   (selected day, requests, balance of overnights, what is coming up). Rail stacks under the grid on phones.
   Look: quiet neutral ground, thin-edged glass sheets, colour reserved for the people. */
:root {
  --bg: #f1f2f6; --fg: #0b0d12; --muted: #5d6576;
  --c0: #2f62f5; --c1: #f2542d; --c2: #0f9f63; --c3: #7c4dea; --c4: #c98600; --c5: #0596b0; --c6: #db3c8b; --c7: #5b667a;
  --glass: rgba(255,255,255,.58); --glass-strong: rgba(255,255,255,.82);
  --edge: rgba(12,18,34,.09); --shine: rgba(255,255,255,.95); --lowlight: rgba(12,18,34,.04);
  --shadow: rgba(20,30,60,.22); --ring: #0b0d12;
  --blob1: #c9d8ff; --blob2: #ffd9c9; --blob3: #e0d6ff;
  --tint: 13%; --tint-strong: 26%;
  --display: "Geist", "Inter", "Helvetica Neue", system-ui, sans-serif;
  --body: "Geist", "Inter", "Helvetica Neue", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090a0e; --fg: #f3f5f9; --muted: #98a1b3;
    --c0: #6b93ff; --c1: #ff7a55; --c2: #3fd08f; --c3: #a68bff; --c4: #f3b73f; --c5: #3ccbe0; --c6: #ff74b6; --c7: #9aa6bb;
    --glass: rgba(255,255,255,.05); --glass-strong: rgba(255,255,255,.1);
    --edge: rgba(255,255,255,.1); --shine: rgba(255,255,255,.14); --lowlight: rgba(0,0,0,.3);
    --shadow: rgba(0,0,0,.7); --ring: #ffffff;
    --blob1: #17275e; --blob2: #4a1f12; --blob3: #2b1c5c;
    --tint: 17%; --tint-strong: 34%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090a0e; --fg: #f3f5f9; --muted: #98a1b3;
  --c0: #6b93ff; --c1: #ff7a55; --c2: #3fd08f; --c3: #a68bff; --c4: #f3b73f; --c5: #3ccbe0; --c6: #ff74b6; --c7: #9aa6bb;
  --glass: rgba(255,255,255,.05); --glass-strong: rgba(255,255,255,.1);
  --edge: rgba(255,255,255,.1); --shine: rgba(255,255,255,.14); --lowlight: rgba(0,0,0,.3);
  --shadow: rgba(0,0,0,.7); --ring: #ffffff;
  --blob1: #17275e; --blob2: #4a1f12; --blob3: #2b1c5c;
  --tint: 17%; --tint-strong: 34%;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 20px 40px; }
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sky i { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .8; animation: drift 30s ease-in-out infinite alternate; }
.sky i:nth-child(1) { width: 50vmax; height: 50vmax; left: -16vmax; top: -22vmax; background: var(--blob1); }
.sky i:nth-child(2) { width: 42vmax; height: 42vmax; right: -16vmax; top: 18vh; background: var(--blob2); animation-duration: 36s; animation-direction: alternate-reverse; }
.sky i:nth-child(3) { width: 38vmax; height: 38vmax; left: 22vw; bottom: -24vmax; background: var(--blob3); animation-duration: 42s; }
@keyframes drift { to { transform: translate3d(4vmax, 3vmax, 0) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .sky i { animation: none; } * { transition: none !important; } }

.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; display: grid; gap: 14px; }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--edge); border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--shine), 0 1px 2px var(--lowlight), 0 24px 48px -30px var(--shadow); }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.03em; font-weight: 600; }
.label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.stack { display: grid; gap: 10px; min-width: 0; }
.tint { background: color-mix(in srgb, var(--c) var(--tint-strong), transparent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.btn { border: 1px solid var(--edge); background: var(--glass-strong); border-radius: 999px; padding: 7px 14px; font-weight: 500; font-size: 13.5px;
  box-shadow: inset 0 1px 0 var(--shine), 0 1px 2px var(--lowlight); transition: transform .12s, opacity .12s; }
.btn.tint { background: color-mix(in srgb, var(--c) var(--tint-strong), transparent); }
.btn.primary, .btn[aria-pressed="true"], .btn[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: transparent; box-shadow: none; }
.btn:hover { opacity: .86; }
.btn:active { transform: scale(.97); }
.btn.round { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; font-size: 16px; }
.seg { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 999px; border: 1px solid var(--edge); background: var(--glass); width: fit-content; max-width: 100%; }
.seg .btn { border-color: transparent; box-shadow: none; background: transparent; }
.seg .btn[aria-pressed="true"], .seg .btn[aria-selected="true"] { background: var(--fg); }

/* banner */
.banner { padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; }
.banner .now { min-width: 0; display: grid; gap: 8px; }
.banner .tonight { font-size: clamp(30px, 6vw, 52px); line-height: 1; }
.banner b.tint { font-weight: 600; padding: 0 .22em; border-radius: .28em; }
.banner .tools { display: grid; gap: 8px; justify-items: end; min-width: 0; }
@media (max-width: 640px) { .banner .tools { justify-items: start; } }
.pline { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.pline b { font-size: 16px; font-weight: 600; }
#sync { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.notice { padding: 11px 16px; border-radius: var(--r-md); }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
@media (max-width: 880px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* calendar */
.cal { padding: 18px; display: grid; gap: 14px; min-width: 0; }
.calhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.calhead h2 { font-size: 24px; }
.nav, .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--fg); min-width: 0; }
.chip i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.dow { text-align: center; }
.day { position: relative; min-height: 78px; padding: 8px 9px; text-align: left; border-radius: var(--r-md);
  border: 1px solid var(--edge); background: color-mix(in srgb, var(--c) var(--tint), transparent);
  box-shadow: inset 0 1px 0 var(--shine); display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .12s; font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; }
.day.x { background: linear-gradient(135deg, color-mix(in srgb, var(--p) var(--tint), transparent) 0 49.5%, color-mix(in srgb, var(--c) var(--tint-strong), transparent) 50.5%); }
.day:hover { transform: translateY(-1px); }
.day.out { opacity: .38; }
.day .num { font-family: var(--mono); font-weight: 600; font-size: 14px; line-height: 1; }
.day .who { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.day .who::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.day .who span { overflow: hidden; text-overflow: ellipsis; }
.day .marks { position: absolute; top: 7px; right: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: 2px; }
.day.today .num { background: var(--fg); color: var(--bg); border-radius: 999px; padding: 4px 7px; margin: -4px -5px; align-self: flex-start; }
.day.sel { outline: 2px solid var(--ring); outline-offset: 1px; }
@media (max-width: 560px) { .cal { padding: 12px; } .grid { gap: 3px; } .day { min-height: 56px; padding: 6px 5px; border-radius: var(--r-sm); }
  .day .num { font-size: 12.5px; } .day .who { font-size: 10.5px; gap: 3px; } .day .marks { top: 4px; right: 4px; font-size: 9px; letter-spacing: 0; } }

/* rail */
.rail { display: grid; gap: 14px; min-width: 0; }
.card { padding: 18px; display: grid; gap: 10px; min-width: 0; }
.card h3 { font-size: 18px; }
.bar { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--c); }
.split { display: flex; flex-wrap: wrap; gap: 4px 14px; font-variant-numeric: tabular-nums; font-size: 13px; }
ul.next { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.next li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--edge); min-width: 0; }
ul.next li:last-child { border-bottom: 0; padding-bottom: 0; }
ul.next b { font-weight: 600; }
.pill { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--edge); width: fit-content; }
.quote { font-style: italic; overflow-wrap: anywhere; }

/* forms */
.field { display: grid; gap: 4px; min-width: 0; align-content: start; }
.field > span { font-size: 12px; font-weight: 500; color: var(--muted); }
input[type=text], input[type=email], input[type=date], input[type=time], input[type=number], select, textarea { width: 100%; min-width: 0; padding: 8px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--edge); background: var(--glass-strong); }
textarea { resize: vertical; min-height: 60px; }
.settings { padding: 22px; display: grid; gap: 16px; }
.settings h2 { font-size: 22px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.prow { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--edge); background: var(--glass); }
.prow > .grow { flex: 1 1 180px; min-width: 0; }
.prow > .full { flex: 1 1 100%; }
.sw { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--c); padding: 0; }
.sw[aria-pressed="true"] { outline: 2px solid var(--ring); outline-offset: 2px; }
.strip { display: flex; flex-wrap: wrap; gap: 4px; }
.strip button { min-width: 44px; padding: 5px 4px; border-radius: var(--r-sm); border: 1px solid var(--edge); display: grid; gap: 1px; justify-items: center; font-weight: 600; font-size: 12.5px;
  background: color-mix(in srgb, var(--c) var(--tint-strong), transparent); }
.strip button small { font-family: var(--mono); font-size: 9.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; }
.strip button.wk { margin-left: 8px; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 65ch; }
.foot { font-size: 12px; color: var(--muted); text-align: center; max-width: 65ch; margin: 4px auto 0; }
.no-org .org { display: none !important; }
.stack.tight { gap: 6px; }
#me-pick { width: auto; }

/* calendar on the left with cards under it; the selected day and open requests stay beside it */
.cols > .cal, .cols > .below { grid-column: 1; }
.cols > .rail { grid-column: 2; grid-row: 1 / span 2; }
.below { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; align-items: start; min-width: 0; }
.below .wide { grid-column: 1 / -1; }
ul.next.cols2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); column-gap: 22px; }
.fgrid.two { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.check { display: flex; gap: 8px; align-items: center; }
@media (max-width: 880px) { .cols > .rail { grid-column: 1; grid-row: auto; } }
@media (max-width: 560px) { .day .who::before { display: none; } }
.overnote { padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c4) 55%, transparent); background: color-mix(in srgb, var(--c4) 14%, transparent); font-size: .9rem; line-height: 1.45; }
.blocks { display: grid; gap: 10px; } .blocks .prow { align-items: end; flex-wrap: wrap; } .blocks .prow .field { flex: 0 1 190px; } .blocks .prow .muted { padding-bottom: 10px; }
.hprev { font-weight: 600; }

.state { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; justify-content: space-between; }
.state > .grow { flex: 1 1 260px; min-width: 0; align-self: center; }
.state .row { align-items: end; }
.state .field { min-width: 150px; }
[inert] { opacity: .55; }
ul.next.cols3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 22px; }
ul.next.cols3 li { border-bottom: 0; padding-bottom: 0; }
.below .wide { grid-column: 1 / -1; }
.st-ok { color: var(--c2); border-color: color-mix(in srgb, var(--c2) 55%, transparent); }
.st-wait { color: var(--c4); border-color: color-mix(in srgb, var(--c4) 60%, transparent); }
.st-draft { color: var(--muted); }
#reqs-label { border-top: 1px solid var(--edge); padding-top: 14px; margin-top: 4px; width: 100%; }
#n-label { border-top: 1px solid var(--edge); padding-top: 14px; margin-top: 4px; width: 100%; }
.nrow { display: flex; gap: 10px; align-items: start; justify-content: space-between; }
.nrow small { display: block; }
#n-form input { flex: 1 1 140px; }
#n-form select { flex: 0 1 150px; width: auto; }
#q-title { border-top: 1px solid var(--edge); padding-top: 14px; margin-top: 4px; width: 100%; }
#reqs-label { border-top: 0; padding-top: 0; margin-top: 0; }
.grid { user-select: none; -webkit-user-select: none; }
.day.inrange { outline: 2px solid var(--ring); outline-offset: 1px; }

.about { padding: 26px; margin-top: 14px; display: grid; gap: 14px; }
.about h2 { font-size: 22px; margin: 6px 0 0; }
.about h3 { font-size: 16px; margin: 0 0 4px; }
.about p { margin: 0; line-height: 1.55; max-width: 70ch; }
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--edge); border-radius: var(--r-md); padding: 10px 14px; background: var(--glass); }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin-top: 8px; }
.app #about { display: none; }
#acct { justify-content: flex-end; }

/* ---------- landing ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.02em; color: inherit; text-decoration: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; padding: 44px 6px 26px; }
.hero-copy { display: grid; gap: 18px; justify-items: start; }
.hero h1 { font-size: clamp(38px, 6.2vw, 68px); line-height: 1; max-width: 13ch; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--c0), var(--c6) 55%, var(--c1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(17px, 2.1vw, 21px); line-height: 1.45; margin: 0; color: var(--muted); max-width: 30ch; }
.btn.big { padding: 13px 24px; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; justify-content: center; }
.hero-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; } .hero-copy > :nth-child(3) { animation-delay: .16s; } .hero-copy > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.art { position: relative; min-height: 380px; display: grid; place-items: center; }
.art-cal { width: min(100%, 380px); padding: 18px; display: grid; gap: 14px; transform: rotate(-2deg); animation: rise .9s .15s cubic-bezier(.2,.7,.2,1) both, bob 9s 1s ease-in-out infinite alternate; }
.art-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.art-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.art-grid i { aspect-ratio: 1; border-radius: 9px; background: color-mix(in srgb, var(--c0) 30%, transparent); animation: pop .5s cubic-bezier(.2,.9,.3,1.3) both; }
.art-grid i.b { background: color-mix(in srgb, var(--c1) 30%, transparent); }
.art-grid i.sw { animation: pop .5s cubic-bezier(.2,.9,.3,1.3) both, swap 6s 2s ease-in-out infinite; }
.art-grid i.now { outline: 2px solid var(--ring); outline-offset: 1px; }
.art-grid i:nth-child(1) { animation-delay: 300ms; }
.art-grid i:nth-child(2) { animation-delay: 328ms; }
.art-grid i:nth-child(3) { animation-delay: 356ms; }
.art-grid i:nth-child(4) { animation-delay: 384ms; }
.art-grid i:nth-child(5) { animation-delay: 412ms; }
.art-grid i:nth-child(6) { animation-delay: 440ms; }
.art-grid i:nth-child(7) { animation-delay: 468ms; }
.art-grid i:nth-child(8) { animation-delay: 496ms; }
.art-grid i:nth-child(9) { animation-delay: 524ms; }
.art-grid i:nth-child(10) { animation-delay: 552ms; }
.art-grid i:nth-child(11) { animation-delay: 580ms; }
.art-grid i:nth-child(12) { animation-delay: 608ms, 2s; }
.art-grid i:nth-child(13) { animation-delay: 636ms, 2s; }
.art-grid i:nth-child(14) { animation-delay: 664ms; }
.art-grid i:nth-child(15) { animation-delay: 692ms; }
.art-grid i:nth-child(16) { animation-delay: 720ms; }
.art-grid i:nth-child(17) { animation-delay: 748ms; }
.art-grid i:nth-child(18) { animation-delay: 776ms; }
.art-grid i:nth-child(19) { animation-delay: 804ms; }
.art-grid i:nth-child(20) { animation-delay: 832ms; }
.art-grid i:nth-child(21) { animation-delay: 860ms; }
.art-grid i:nth-child(22) { animation-delay: 888ms; }
.art-grid i:nth-child(23) { animation-delay: 916ms; }
.art-grid i:nth-child(24) { animation-delay: 944ms; }
.art-grid i:nth-child(25) { animation-delay: 972ms; }
.art-grid i:nth-child(26) { animation-delay: 1000ms; }
.art-grid i:nth-child(27) { animation-delay: 1028ms; }
.art-grid i:nth-child(28) { animation-delay: 1056ms; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
@keyframes swap { 0%, 35% { background: color-mix(in srgb, var(--c0) 30%, transparent); } 50%, 85% { background: color-mix(in srgb, var(--c1) 30%, transparent); } 100% { background: color-mix(in srgb, var(--c0) 30%, transparent); } }
@keyframes bob { to { transform: rotate(-1deg) translateY(-8px); } }
.art-legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.art-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--c0); }
.art-legend .b::before { background: var(--c1); }
.chip-float { position: absolute; padding: 9px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; white-space: nowrap; animation: rise .8s both, float 7s ease-in-out infinite alternate; }
.chip-float.c1 { top: 6%; right: 0; color: var(--c2); animation-delay: .7s, 1.5s; }
.chip-float.c2 { bottom: -3%; left: 2%; animation-delay: .9s, 2.2s; }
.chip-float.c3 { top: 44%; right: -3%; color: var(--muted); animation-delay: 1.1s, 2.9s; }
@keyframes float { to { transform: translateY(-10px); } }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.feat { display: grid; gap: 4px; padding: 16px; border-radius: var(--r-md); align-content: start; transition: transform .25s; }
.feat:hover { transform: translateY(-4px); }
.feat svg { color: var(--c0); margin-bottom: 6px; }
.feat span { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px 6px; }
.how div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.how i { grid-row: span 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--mono); font-weight: 600; background: var(--fg); color: var(--bg); }
.how span { color: var(--muted); font-size: 13.5px; }
.tryhead { padding: 22px 6px 2px; display: grid; gap: 4px; scroll-margin-top: 12px; }
.tryhead h2 { font-size: clamp(24px, 3.4vw, 34px); } .tryhead p { margin: 0; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 24px; gap: 26px; } .art { min-height: 300px; } .how { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .hero-copy > *, .art-cal, .art-grid i, .chip-float { animation: none !important; } .js .reveal { opacity: 1; transform: none; } }
.app #hero, .app .features, .app .how, .app .tryhead { display: none; }
dialog#signin { border-radius: var(--r-lg); padding: 30px 28px 26px; width: min(92vw, 380px); color: var(--fg); background: var(--bg); text-align: center; }
dialog#signin[open] { display: grid; gap: 14px; justify-items: center; animation: rise .35s cubic-bezier(.2,.7,.2,1); }
dialog#signin::backdrop { background: rgba(8,10,16,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog#signin h2 { font-size: 24px; } dialog#signin p { margin: 0; min-height: 1.4em; }
dialog#signin .big { width: 100%; }
#si-close { position: absolute; top: 12px; right: 12px; }
#si-form:not([hidden]) { display: grid; gap: 10px; width: 100%; }
#si-form input { width: 100%; text-align: center; }
#si-form .btn { padding: 11px; }
.btn.linkish { background: none; border-color: transparent; box-shadow: none; color: var(--muted); text-decoration: underline; }


.doc { max-width: 760px; margin: 30px auto; }
.doc h1 { font-size: 40px; }
.doc ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* Signed in: no pitch, only their own space. */
.member #hero, .member .features, .member .how, .member #about { display: none; }
.member .tryhead { padding-top: 6px; }

/* ---------- admin dashboard ---------- */
.dash-head { padding: 18px 6px 4px; display: grid; gap: 6px; }
.dash-head h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; }
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.dash > .dcard { grid-column: span 3; display: grid; gap: 8px; align-content: start; animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.dash > .half { grid-column: span 6; } .dash > .wide { grid-column: 1 / -1; }
.count { font-family: var(--display); font-size: 42px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; align-items: end; height: 110px; }
.bars i { display: block; border-radius: 4px 4px 1px 1px; background: var(--c0); min-height: 2px; }
.bars.b i { background: var(--c1); } .bars.c i { background: var(--c2); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); padding: 6px 10px 6px 0; white-space: nowrap; }
.tbl td { padding: 7px 10px 7px 0; border-top: 1px solid var(--edge); white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
@media (max-width: 900px) { .dash > .dcard { grid-column: span 6; } .dash > .half { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .dash > .dcard { animation: none; } }
/* A visitor with only the link: the calendar and the notes for everyone, nothing else. */
.public .banner, .public #day-card, .public #stats-card, .public #up-card, .public #cal-state { display: none !important; }
/* ---------- compact calendar header ---------- */
.banner .tools .ctl { justify-content: flex-end; gap: 8px; }
.banner .tools .sub { font-size: 12.5px; color: var(--muted); justify-content: flex-end; gap: 10px; }
#cal-pick { width: auto; max-width: 230px; border-radius: 999px; padding: 7px 30px 7px 14px; font-weight: 500; }
#state-ctl { gap: 8px; align-items: center; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-block; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; font-size: 11px; }
.menu-items { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; gap: 4px; padding: 8px; min-width: 230px; border-radius: var(--r-md); background: var(--bg); }
.menu-items .btn { text-align: left; border-radius: 10px; white-space: nowrap; background: transparent; border-color: transparent; box-shadow: none; }
.menu-items .btn:hover { background: var(--glass-strong); opacity: 1; }
dialog#send-dlg, dialog#del-dlg, dialog#ans-dlg { border-radius: var(--r-lg); padding: 30px 28px 26px; width: min(92vw, 400px); color: var(--fg); background: var(--bg); }
dialog#send-dlg[open], dialog#del-dlg[open], dialog#ans-dlg[open] { display: grid; gap: 14px; animation: rise .35s cubic-bezier(.2,.7,.2,1); }
dialog#send-dlg::backdrop, dialog#del-dlg::backdrop, dialog#ans-dlg::backdrop { background: rgba(8,10,16,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog#send-dlg h2, dialog#del-dlg h2, dialog#ans-dlg h2 { font-size: 24px; } dialog#send-dlg p, dialog#del-dlg p, dialog#ans-dlg p { margin: 0; }
#sd-close { position: absolute; top: 12px; right: 12px; }
#sd-body .big { width: 100%; margin-top: 4px; }
@media (max-width: 640px) { .banner .tools .ctl, .banner .tools .sub { justify-content: flex-start; } }

/* The first line's menu must open over the cards below it. */
.banner { position: relative; z-index: 5; }
.btn.danger { background: #d92d20; color: #fff; border-color: transparent; }
.menu-items .btn.danger-text { color: #d92d20; }
#an-close { position: absolute; top: 12px; right: 12px; }
#an-form:not([hidden]) { display: grid; gap: 10px; }
a.btn { color: inherit; text-decoration: none; display: inline-block; }
a.btn.primary { color: var(--bg); }

/* ---------- the day card ---------- */
#day-card { gap: 12px; }
#day-card #d-title { font-size: 22px; line-height: 1.15; }
#d-who .chip { padding: 6px 12px 6px 10px; border-radius: 999px; font-weight: 600; background: color-mix(in srgb, var(--c) var(--tint-strong), transparent); }
#d-who .muted { margin-left: 8px; }
#d-x { font-size: 13.5px; gap: 4px; }
#n-label, #q-title { border-top: 1px solid var(--edge); padding-top: 12px; margin-top: 2px; width: 100%; }
#d-notes { gap: 6px; }
.nrow { align-items: center; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--edge); }
.nrow span { line-height: 1.35; } .nrow small { font-size: 12px; margin-top: 1px; }
.btn.x { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; font-size: 16px; line-height: 1; flex: none; background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.x:hover { background: color-mix(in srgb, #d92d20 14%, transparent); color: #d92d20; opacity: 1; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
#n-form:not([hidden]) { display: grid; gap: 8px; padding: 10px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--edge); }
#n-form input { width: 100%; border: 0; background: transparent; padding: 6px 4px; font-size: 15px; box-shadow: none; }
#n-form input:focus { outline: none; }
#n-form:focus-within { border-color: var(--ring); }
#n-form select { width: auto; flex: 0 1 auto; padding: 5px 26px 5px 10px; font-size: 12.5px; border-radius: 999px; }
#n-form .row, #d-req .row { align-items: center; gap: 6px; }
#d-req:not([hidden]) { padding: 12px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--edge); }
#d-btns { gap: 8px; }
#d-btns .btn { flex: 1 1 0; padding: 10px 8px; white-space: nowrap; }
#d-btns #b-note::before { content: "＋ "; } #d-btns #b-change::before { content: "⇄ "; }
#d-btns #q-msg { flex: 1 1 100%; }
#n-form .grow, #d-req .row .grow { flex: 1 1 0; min-width: 0; }
#n-form .row { flex-wrap: nowrap; }
#n-form select { max-width: 150px; }

/* ---------- header card: status on top, then tonight; calendar, Customize and Delete on the right ---------- */
.banner .now .top { gap: 10px; align-items: center; min-height: 30px; }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
#btn-delete:hover { color: #d92d20; opacity: 1; }
.rail #hist-card ul.next { grid-template-columns: 1fr; }

/* ---------- polish: nothing in the day card may be wider than the card; header controls share one height ---------- */
#day-card { overflow: hidden; }
#day-card > * { min-width: 0; max-width: 100%; }
#n-label, #q-title { width: auto; }
#n-form .row { flex-wrap: nowrap; gap: 6px; min-width: 0; }
#n-form input { flex: 1 1 auto; min-width: 0; }
#n-form select { flex: 0 1 auto; min-width: 0; max-width: 60%; }
#n-go, #q-go, #d-btns .btn { white-space: nowrap; }
#n-go { flex: none; padding: 8px 16px; }
#d-btns { flex-wrap: nowrap; } #d-btns .btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
#d-req .fgrid.two { grid-template-columns: 1fr 1fr; gap: 8px; }
#d-req .fgrid.two input { padding-inline: 8px; font-size: 13px; }
.banner { padding: 20px 24px; align-items: center; }
.banner .tools .ctl { flex-wrap: wrap; }
.banner .ctl .btn, #cal-pick { height: 38px; padding-block: 0; display: inline-flex; align-items: center; }
#cal-pick { max-width: 210px; text-overflow: ellipsis; background-color: var(--glass-strong); border: 1px solid var(--edge); }
#btn-delete { padding-inline: 10px; }
.banner .now .top .pill { font-size: 11px; padding: 3px 9px; }
.btn.sm { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; }
.banner .tools .sub { padding-right: 4px; }
#d-btns { flex-wrap: wrap; } #d-btns .btn { flex: 1 1 110px; }
#d-btns #q-msg:empty { display: none; }

/* ---------- no flashes between screens ---------- */
.wrap { transition: opacity .28s ease; }
.wait .wrap { opacity: 0; pointer-events: none; transition: none; }
.wait body::after { content: ""; position: fixed; left: 50%; top: 40vh; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; border: 3px solid var(--edge); border-top-color: var(--fg); animation: spin .8s linear infinite, late .5s both; z-index: 5; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes late { 0%, 70% { opacity: 0; } 100% { opacity: 1; } }
/* The status row and the big line under it keep clear of each other: the name's highlight must not touch the button above. */
.banner .now { gap: 0; }
.banner .now .top { margin-bottom: 14px; }
.banner .tonight { line-height: 1.12; margin-bottom: 8px; }
.banner b.tint { padding: .02em .2em; border-radius: .26em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
/* The left column keeps its place when the right one grows (opening the change form must not push "Coming up" down):
   the calendar's row is exactly as tall as the calendar, and the row under it takes whatever extra height the right column needs. */
@media (min-width: 881px) { .cols { grid-template-rows: auto 1fr; } .cols > .below { align-self: start; } .cols > .cal { align-self: start; } }
