/* Calendar */
#appview:has(.cal) { background: #fff; }
.cal { padding: 0 0 30px; }
.cal-head { display: flex; align-items: center; gap: 6px; padding: 4px 12px 6px; }
.cal-nav { border: 0; background: none; color: #FF3B30; font-size: 30px; line-height: 1; width: 32px; padding: 0; }
.cal-title { flex: 1; display: flex; flex-direction: column; }
.cal-title b { font-size: 26px; font-weight: 800; }
.cal-title span { font-size: 12.5px; color: #8a8a8e; }
.cal-today { border: 0; background: #f2f2f7; color: #FF3B30; border-radius: 14px; padding: 5px 12px; font-size: 14px; font-weight: 600; }
.cal-seg { display: flex; margin: 2px 14px 8px; background: #7676801f; border-radius: 9px; padding: 2px; }
.cal-seg button { flex: 1; border: 0; background: none; border-radius: 7px; padding: 5px; font-size: 13.5px; font-weight: 600; }
.cal-seg button.on { background: #fff; box-shadow: 0 2px 6px #0002; }
.cal-wd, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 8px; }
.cal-wd span { text-align: center; font-size: 11.5px; color: #8a8a8e; padding: 4px 0; }
.cal-grid { border-bottom: .5px solid #e5e5ea; padding-bottom: 6px; }
.cal-d { border: 0; background: none; height: 50px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 0 0; border-top: .5px solid #eee; }
.cal-d span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; }
.cal-d.today span { color: #FF3B30; font-weight: 700; }
.cal-d.sel span { background: #111; color: #fff; }
.cal-d.today.sel span { background: #FF3B30; color: #fff; }
.cal-d i { display: flex; gap: 2px; height: 6px; }
.cal-d em { width: 5px; height: 5px; border-radius: 50%; }
.cal-list { padding: 4px 14px; }
.cal-ld { font-size: 13px; color: #8a8a8e; font-weight: 600; margin: 8px 2px; }
.cal-none { color: #8a8a8e; text-align: center; padding: 18px; font-size: 14.5px; }
.cal-ev { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 10px 2px; border-bottom: .5px solid #eee; text-align: start; }
.cal-ev i { width: 4px; align-self: stretch; border-radius: 2px; }
.cal-evm { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cal-evm b { font-size: 15.5px; font-weight: 600; }
.cal-evm span, .cal-evt { font-size: 12.5px; color: #8a8a8e; }
.cal-evt { white-space: nowrap; }
.cal-foot { text-align: center; color: #a0a0a5; font-size: 11.5px; margin-top: 16px; }
.cal-wkhead { display: grid; grid-template-columns: 42px repeat(var(--n), 1fr); padding: 0 6px 4px; }
.cal-wkhead button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; font-size: 16px; padding: 2px 0; border-radius: 12px; }
.cal-wkhead small { font-size: 10.5px; color: #8a8a8e; }
.cal-wkhead button.today { color: #FF3B30; font-weight: 700; }
.cal-wkhead button.sel { background: #111; color: #fff; }
.cal-wkhead button.sel small { color: #ddd; }
.cal-adrow { display: grid; grid-template-columns: 42px repeat(var(--n), 1fr); border-bottom: .5px solid #ddd; padding: 2px 6px; min-height: 26px; }
.cal-adl { font-size: 9.5px; color: #8a8a8e; align-self: center; }
.cal-ad { display: flex; flex-direction: column; gap: 2px; padding: 0 1px; }
.cal-ad button { border: 0; color: #fff; font-size: 10.5px; border-radius: 4px; padding: 2px 4px; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-tl { display: grid; grid-template-columns: 42px 1fr; padding: 0 6px 0; position: relative; }
.cal-hours { position: relative; }
.cal-hours span { position: absolute; right: 0; transform: translateY(-50%); font-size: 10px; color: #8a8a8e; white-space: nowrap; }
.cal-cols { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); }
.cal-cols > i { position: absolute; left: 0; right: 0; border-top: .5px solid #e5e5ea; }
.cal-col { position: relative; border-inline-start: .5px solid #f0f0f0; }
.cal-col.today { background: #ff3b3008; }
.cal-blk { position: absolute; left: 1px; right: 1px; border: 0; border-inline-start: 3px solid var(--c); background: color-mix(in srgb, var(--c) 18%, #fff); color: #111; border-radius: 4px;
  padding: 2px 4px; text-align: start; overflow: hidden; display: flex; flex-direction: column; font-size: 11px; }
.cal-blk b { font-size: 11.5px; line-height: 1.25; }
.cal-blk span { color: #555; font-size: 10px; }
.cal-now { position: absolute; left: 0; right: 0; border-top: 2px solid #FF3B30; z-index: 2; }
.cal-detail { padding: 10px 18px; }
.cal-detail h2 { font-size: 24px; margin: 4px 0; }
.cal-loc { color: #8a8a8e; margin: 0; }
.cal-when { white-space: pre-line; line-height: 1.6; margin: 10px 0; }
.cal-kv { display: flex; justify-content: space-between; padding: 6px 0; }
.cal-kv b { font-weight: 500; display: flex; align-items: center; gap: 6px; }
.cal-kv i { width: 10px; height: 10px; border-radius: 50%; }
.cal-notes { white-space: pre-line; line-height: 1.7; margin: 6px 0 0; }
.cal-sticky { position: sticky; top: -54px; z-index: 3; background: #fff; margin-top: -54px; padding-top: 54px; box-shadow: 0 1px 0 #e5e5ea; }
