/* ── THE APP'S OWN CALENDAR (js/calpick.js) ────────────────────────────────
   Approved on _prototype-calendar.html, 1 Oct 2026. Month in words, round buttons,
   Monday first, today a red ring (the same red as today in Projects), the picked
   day a filled ink circle, the days of the months either side in grey. 2150 on
   the layer ladder: over every pop-up and the question box, under the toasts. */
.cp{background:var(--surface);color:var(--ink);font:500 13px/1.3 'Inter',sans-serif;z-index:2150;-webkit-tap-highlight-color:transparent}
.cp button{font:inherit;color:inherit}
.cp-pop{position:fixed;width:312px;border:1px solid var(--rule);border-radius:10px;padding:12px 16px 14px;
  box-shadow:0 18px 44px -12px rgba(0,0,0,.28),0 2px 6px rgba(0,0,0,.06);animation:cpIn .14s ease-out}
@keyframes cpIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.cp-hd{display:flex;align-items:center;gap:2px;margin:0 -6px 6px 0}
.cp-my{flex:1;display:inline-flex;align-items:center;gap:4px;border:0;background:none;padding:6px 8px;margin-left:-8px;border-radius:17px;font-size:15px!important;font-weight:600!important;cursor:pointer;text-align:left;min-height:34px}
.cp-my:hover{background:var(--m3-state,rgba(0,0,0,.05))}
.cp-my svg{width:16px;height:16px;color:var(--ink-faint)}
.cp-my.up svg{transform:rotate(180deg)}
.cp-nav{width:34px;height:34px;border:0;background:none;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:var(--ink-soft)!important;cursor:pointer;padding:0}
.cp-nav:hover{background:var(--m3-state,rgba(0,0,0,.05));color:var(--ink)!important}
.cp-nav:disabled{opacity:.3;cursor:default;background:none}
.cp-nav svg{width:18px;height:18px}
.cp-nav.l svg{transform:rotate(90deg)}.cp-nav.r svg{transform:rotate(-90deg)}
.cp-wk{display:grid;grid-template-columns:repeat(7,1fr);color:var(--ink-faint);text-align:center;height:28px;align-items:center}
.cp-gw{overflow:hidden}
.cp-grid{display:grid;grid-template-columns:repeat(7,1fr)}
.cp-grid.sn{animation:cpN .16s ease-out}.cp-grid.sp{animation:cpP .16s ease-out}
@keyframes cpN{from{transform:translateX(14px);opacity:.2}to{transform:none;opacity:1}}
@keyframes cpP{from{transform:translateX(-14px);opacity:.2}to{transform:none;opacity:1}}
.cp-d{position:relative;height:36px;border:0;background:none;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;font-variant-numeric:tabular-nums;outline:none}
.cp-d>span{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.cp-d:hover>span{background:var(--m3-state,rgba(0,0,0,.05))}
.cp-d.we{color:var(--ink-soft)!important}
.cp-d.oth,.cp-d.oth.we{color:var(--ink-faint)!important}
.cp-d.today>span{box-shadow:inset 0 0 0 1.5px var(--accent)}
.cp-d.sel>span,.cp-d.sel:hover>span{background:var(--ink);color:var(--surface);box-shadow:none}
.cp-d.dis{opacity:.4;cursor:default}
.cp-d.dis:hover>span{background:none}
.cp-d:focus-visible>span{outline:2px solid var(--ink-faint);outline-offset:1px}
/* the months fill exactly the box the days used: 28px week row + six 36px rows */
.cp-ms-g{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr);gap:6px 4px;height:216px;align-items:center}
.cp-ms{height:44px;border:0;background:none;border-radius:22px;cursor:pointer}
.cp-ms:hover{background:var(--m3-state,rgba(0,0,0,.05))}
.cp-ms.today{box-shadow:inset 0 0 0 1.5px var(--accent)}
.cp-ms.on{background:var(--ink);color:var(--surface)!important;box-shadow:none}
.cp-ms:disabled{opacity:.3;cursor:default;background:none}
.cp-q{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px;padding-top:12px;border-top:1px solid var(--rule-soft)}
.cp-qp{min-height:30px;padding:0 11px;border-radius:15px;border:1px solid var(--rule);background:none;font-weight:600!important;cursor:pointer;white-space:nowrap}
.cp-qp:hover{background:var(--m3-state,rgba(0,0,0,.05))}
.cp-qp.on{background:var(--field);border-color:var(--field)}
/* a From–To pair: the days between sit on a light band, the line above says the span */
.cp-d.inr::before,.cp-d.rs::before,.cp-d.re::before{content:'';position:absolute;top:2px;bottom:2px;left:0;right:0;background:var(--field)}
.cp-d.rs::before{left:50%}.cp-d.re::before{right:50%}
.cp-d>span{position:relative;z-index:1}
.cp-rl{display:flex;align-items:center;gap:8px;margin:0 0 8px;color:var(--ink-faint)}
.cp-rl b{font-weight:600;color:var(--ink)}
.cp-rl .wait{border-bottom:1.5px solid var(--ink);padding-bottom:1px}
/* times: half-hour picks in a short list that scrolls */
.cp-time{margin-top:10px;padding-top:10px;border-top:1px solid var(--rule-soft)}
.cp-tonly .cp-time{margin:0;padding:0;border:0}
.cp-lb{font-size:13px;color:var(--ink-faint);margin-bottom:6px}
.cp-t{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;max-height:112px;overflow-y:auto;scrollbar-width:thin}
.cp-tonly .cp-t{max-height:176px}
.cp-tp{height:32px;border:0;background:none;border-radius:16px;font-variant-numeric:tabular-nums;cursor:pointer}
.cp-tp:hover{background:var(--m3-state,rgba(0,0,0,.05))}
.cp-tp.on,.cp-tp.on:hover{background:var(--ink);color:var(--surface)!important}
.cp-tp:disabled{opacity:.3;cursor:default;background:none}
.cp-pop.cp-tonly{width:248px;padding:10px 12px 12px}
.cp-done{margin-left:auto;min-height:30px;padding:0 14px;border-radius:15px;border:0;background:var(--ink);color:var(--surface)!important;font-weight:600!important;cursor:pointer}
/* the browser's own clock button is gone: a press on the box opens the app's picks instead */
input[type="time"]::-webkit-calendar-picker-indicator,input[type="datetime-local"]::-webkit-calendar-picker-indicator{display:none}
input[type="time"],input[type="datetime-local"]{cursor:pointer}
/* the field it belongs to shows that it is open */
.dfw.cp-open .dfb{color:var(--ink)}

/* a phone: a sheet from the bottom, 44px days */
.cp-bd{position:fixed;inset:0;background:rgba(0,0,0,.32);z-index:2149;animation:cpFade .2s ease-out}
@keyframes cpFade{from{opacity:0}to{opacity:1}}
.cp-sheet{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(430px,100%);border-radius:10px 10px 0 0;
  padding:6px 16px calc(16px + env(safe-area-inset-bottom));box-shadow:0 -10px 40px rgba(0,0,0,.25);animation:cpUp .22s cubic-bezier(.2,.8,.2,1)}
@keyframes cpUp{from{transform:translate(-50%,100%)}to{transform:translate(-50%,0)}}
.cp-grab{width:36px;height:4px;border-radius:2px;background:var(--rule);margin:4px auto 6px}
.cp-sh{display:flex;align-items:center;gap:8px;min-height:44px;margin-bottom:2px}
.cp-sht{flex:1;font-size:15px;font-weight:600}
.cp-x{width:44px;height:44px;margin-right:-10px;border:0;background:none;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:var(--ink-soft)!important;cursor:pointer;padding:0}
.cp-x svg{width:20px;height:20px}
.cp-sheet .cp-nav{width:44px;height:44px}
.cp-sheet .cp-my{min-height:44px}
.cp-sheet .cp-d{height:46px}
.cp-sheet .cp-d>span{width:44px;height:44px;font-size:15px}
.cp-sheet .cp-wk{height:30px}
.cp-sheet .cp-ms-g{height:276px}
.cp-sheet .cp-ms{height:52px;border-radius:26px}
.cp-sheet .cp-q{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:10px -16px 0;padding:12px 16px 0}
.cp-sheet .cp-q::-webkit-scrollbar{display:none}
.cp-sheet .cp-qp{min-height:44px;border-radius:22px;padding:0 16px;flex-shrink:0}
.cp-sheet .cp-tp{height:44px;border-radius:22px;font-size:15px}
.cp-sheet .cp-t{max-height:144px}
.cp-sheet.cp-tonly .cp-t{max-height:240px}
.cp-sheet .cp-done{min-height:44px;border-radius:22px;padding:0 18px;flex-shrink:0}
.cp-sheet .cp-rl{font-size:15px}
@media (prefers-reduced-motion:reduce){.cp-pop,.cp-sheet,.cp-bd,.cp-grid.sn,.cp-grid.sp{animation:none}}
