/* =====================================================================
   Calendar
   ===================================================================== */
.app-calendar { position: relative; background: var(--surface); }
.app-calendar .cal-split { position: relative; }

/* ---------- sidebar ---------- */
.app-calendar .cal-side { width: 240px; padding: 12px 10px 14px; gap: 2px; }
.app-calendar.cal-side-hidden .cal-side { display: none; }
.app-calendar .cal-scrim { display: none; }

.cal-mini { padding: 2px 0 6px; }
.cal-mini-head { display: flex; align-items: center; gap: 0; padding: 0 0 6px 8px; }
.cal-mini-title { flex: 1; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.cal-mini-title span { color: var(--text-2); font-weight: 500; }
.cal-mini-head .icon-btn { width: 26px; height: 26px; border-radius: 8px; color: var(--text-2); }
.cal-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 1px; }
.cal-mini-dow { font-size: 10.5px; font-weight: 700; color: var(--text-3); text-align: center; height: 22px; line-height: 22px; }
.cal-mini-day {
  position: relative; width: 28px; height: 28px; justify-self: center; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--text); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums;
  transition: background .12s;
}
.cal-mini-day:hover { background: var(--hover); }
.cal-mini-day.out { color: var(--text-3); }
.cal-mini-day.sel { background: var(--tile-hover); font-weight: 700; }
.cal-mini-day.today { background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.cal-mini-day.has::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--text-3); }
.cal-mini-day.today.has::after { background: var(--accent-fg); opacity: .85; }

.cal-up { display: flex; flex-direction: column; gap: 1px; }
.cal-up-item {
  display: flex; align-items: stretch; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 9px;
  background: none; color: var(--text); text-align: left; transition: background .12s;
}
.cal-up-item:hover { background: var(--hover); }
.cal-up-item > i { flex: 0 0 3px; border-radius: 2px; background: var(--c); }
.cal-up-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.cal-up-text b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-up-text small { font-size: 11.5px; color: var(--text-2); }
.cal-up-empty { margin: 0; padding: 4px 10px; font-size: 12px; color: var(--text-3); }

.cal-cal .cal-check {
  flex: 0 0 16px; width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center;
  background: var(--c); color: #fff; transition: background .12s, box-shadow .12s;
}
.app-calendar .cal-cal .cal-check .ic { color: #fff; }
.cal-cal.off .cal-check { background: transparent; box-shadow: inset 0 0 0 1.6px var(--c); }
.cal-cal.off .cal-check .ic { opacity: 0; }
.cal-cal.off span:not(.count) { color: var(--text-2); }

/* ---------- toolbar ---------- */
.app-calendar .cal-toolbar { height: 54px; gap: 8px; padding: 0 12px 0 10px; }
.app-calendar .cal-toolbar .cal-title { margin: 0 4px; font-family: var(--font-display); font-size: 20px; font-weight: 300; letter-spacing: -.01em; }
.cal-title b { font-weight: 600; }
.cal-side-btn { color: var(--text-2) !important; }
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-nav .icon-btn { width: 30px; height: 30px; color: var(--text-2); }
.cal-nav .icon-btn:hover { color: var(--text); }
.cal-today { margin: 0 2px; }
.app-calendar .cal-add { background: var(--accent); color: var(--accent-fg); border-radius: 10px; margin-left: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.app-calendar .cal-add:hover { background: var(--accent); filter: brightness(1.08); }

.cal-view { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }

/* ---------- month ---------- */
.cal-month { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.cal-dow span { padding: 7px 12px 6px; text-align: right; font-size: 11.5px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.cal-dow span.we { color: var(--text-3); }
.cal-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); }
.cal-cell {
  position: relative; min-width: 0; min-height: 0; overflow: hidden; padding: 4px 5px 4px;
  display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  container-type: inline-size; transition: background .12s;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:nth-last-child(-n+7) { border-bottom: 0; }
.cal-cell.we { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.cal-cell.sel { background: rgba(var(--accent-rgb), .08); }
.cal-cell-head { flex: 0 0 26px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.cal-cell-month { font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.cal-num {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.cal-cell.out .cal-num, .cal-cell.out .cal-cell-month { color: var(--text-3); }
.cal-cell.sel:not(.today) .cal-num { background: var(--tile-hover); }
.cal-cell.today .cal-num { background: var(--accent); color: var(--accent-fg); box-shadow: 0 2px 8px -2px rgba(var(--accent-rgb), .7); }
.cal-pills { display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.cal-pill {
  position: relative; display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; height: 19px; flex: 0 0 19px;
  padding: 0 6px 0 9px; border: 0; border-radius: 5px; text-align: left;
  background: color-mix(in srgb, var(--c) 20%, transparent);
  color: color-mix(in srgb, var(--c) 52%, var(--text));
  font-size: 11.5px; font-weight: 600; transition: background .12s;
}
.cal-pill::before { content: ''; position: absolute; left: 3px; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--c); }
.cal-pill:hover { background: color-mix(in srgb, var(--c) 30%, transparent); }
.cal-pill .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-pill .tm { flex: 0 0 auto; font-size: 10.5px; font-weight: 500; opacity: .8; font-variant-numeric: tabular-nums; }
@container (max-width: 112px) { .cal-pill .tm { display: none; } }
.cal-more {
  margin-right: auto; height: 20px; padding: 0 7px; border: 0; border-radius: 10px; background: var(--tile);
  font-size: 11px; font-weight: 700; color: var(--text-2); white-space: nowrap;
}
.cal-more:hover { background: var(--hover); color: var(--text); }

/* ---------- week / day time grid ---------- */
.cal-tg { --gut: 60px; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.cal-tg-head {
  flex: 0 0 auto; display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(0, 1fr));
  border-bottom: 1px solid var(--line); overflow: hidden; scrollbar-gutter: stable;
  box-shadow: 0 6px 12px -12px rgba(0, 0, 0, .5); position: relative; z-index: 2;
}
.cal-tg-corner { align-self: end; padding: 0 8px 7px 0; text-align: right; font-size: 10px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.cal-tg-dayhead {
  height: 56px; min-width: 0; padding: 0 4px; border: 0; border-left: 1px solid transparent; background: none; color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .12s;
}
.cal-tg-dayhead:hover { background: var(--hover); }
.cal-tg-dayhead .dow { font-size: 12px; font-weight: 600; color: var(--text-2); }
.cal-tg-dayhead .num {
  min-width: 32px; height: 32px; padding: 0 4px; border-radius: 16px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 19px; font-weight: 400; font-variant-numeric: tabular-nums;
}
.cal-tg-dayhead.sel:not(.today) .num { background: var(--tile-hover); }
.cal-tg-dayhead.today .dow { color: var(--accent); }
.cal-tg-dayhead.today .num { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.cal-tg-day .cal-tg-dayhead { justify-content: flex-start; padding-left: 14px; gap: 10px; }
.cal-tg-day .cal-tg-dayhead .dow { font-size: 13.5px; }

.cal-tg-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; position: relative; }
.cal-tg-body { position: relative; height: calc(var(--hour) * 24); display: grid; grid-template-columns: var(--gut) minmax(0, 1fr); margin-bottom: 10px; }
.cal-tg-gutter { position: relative; }
.cal-tg-gutter span {
  position: absolute; right: 9px; transform: translateY(-50%); font-size: 10.5px; font-weight: 600; color: var(--text-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cal-tg-cols {
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  background:
    linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 100% var(--hour),
    linear-gradient(to bottom, transparent calc(var(--hour) / 2), color-mix(in srgb, var(--line) 45%, transparent) calc(var(--hour) / 2), color-mix(in srgb, var(--line) 45%, transparent) calc(var(--hour) / 2 + 1px), transparent calc(var(--hour) / 2 + 1px)) 0 0 / 100% var(--hour);
}
.cal-tg-col { position: relative; min-width: 0; border-left: 1px solid var(--line); }
.cal-tg-col.we { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.cal-tg-col.today { background: rgba(var(--accent-rgb), .045); }

.cal-ev {
  position: absolute; z-index: 1; min-width: 0; padding: 4px 6px 4px 9px; border: 0; border-radius: 7px; text-align: left;
  display: flex; flex-direction: column; gap: 1px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 22%, var(--surface));
  color: color-mix(in srgb, var(--c) 48%, var(--text));
  box-shadow: inset 3px 0 0 var(--c), 0 0 0 1px var(--surface);
  font-size: 11.5px; line-height: 1.25; transition: filter .12s, transform .1s;
}
.cal-ev:hover { z-index: 2; filter: brightness(1.06) saturate(1.1); }
.cal-ev:active { transform: scale(.985); }
.cal-ev b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: break-word; }
.cal-ev small { font-size: 10.5px; font-weight: 500; opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.short { flex-direction: row; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.cal-ev.short b { display: block; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.cal-ev.short small { flex: 0 100 auto; min-width: 0; }
.cal-ev.past { opacity: .72; }
[data-theme="light"] .cal-ev { background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: color-mix(in srgb, var(--c) 55%, #000); }

.cal-now { position: absolute; left: 0; right: 0; height: 0; z-index: 4; pointer-events: none; }
.cal-now[hidden] { display: none; }
.cal-now::before { content: ''; position: absolute; left: var(--gut); right: 0; top: -.5px; height: 1px; background: rgba(239, 68, 68, .35); }
.cal-now i {
  position: absolute; top: -1px; height: 2px; background: #ef4444; border-radius: 1px;
  left: calc(var(--gut) + (100% - var(--gut)) * var(--i) / var(--cols)); width: calc((100% - var(--gut)) / var(--cols));
}
.cal-now i::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px var(--surface); }
.cal-now-label {
  position: absolute; left: 3px; width: calc(var(--gut) - 9px); top: -9px; height: 18px; border-radius: 9px;
  display: grid; place-items: center; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* day view with info panel */
.cal-dayview { flex: 1; min-height: 0; display: flex; }
.cal-dayinfo {
  flex: 0 0 290px; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 16px; overflow-y: auto;
  border-left: 1px solid var(--line); background: var(--sidebar);
}
.cal-di-date { display: flex; align-items: center; gap: 12px; }
.cal-di-num { font-family: var(--font-display); font-size: 52px; font-weight: 200; line-height: 1; letter-spacing: -.03em; }
.cal-di-num.today { color: var(--accent); font-weight: 300; }
.cal-di-meta { display: flex; flex-direction: column; }
.cal-di-meta b { font-size: 16px; }
.cal-di-meta small { font-size: 12.5px; color: var(--text-2); }
.cal-di-weather {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 10px 12px; border: 0; border-radius: 14px; text-align: left; color: #fff;
  background: linear-gradient(135deg, #4a9be8, #2f6fd1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.cal-di-weather .ic { grid-row: 1 / 3; }
.cal-di-weather span { font-size: 13px; }
.cal-di-weather span b { font-size: 15px; }
.cal-di-weather small { font-size: 11.5px; opacity: .85; }
.cal-di-weather:hover { filter: brightness(1.06); }
.cal-dayinfo .side-group-label { padding-left: 2px; }
.cal-di-list { display: flex; flex-direction: column; gap: 6px; }
.cal-di-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; text-align: center; color: var(--text-3); }
.cal-di-empty p { margin: 0; font-size: 12.5px; color: var(--text-2); }
.cal-di-add { margin-top: auto; width: 100%; }

/* agenda rows (day panel + phone month) */
.cal-agenda-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 12px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-align: left; transition: background .12s;
}
.cal-agenda-row:hover { background: var(--surface-3); }
.cal-agenda-row > i { flex: 0 0 4px; align-self: stretch; border-radius: 2px; background: var(--c); }
.cal-agenda-time { flex: 0 0 auto; min-width: 44px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.cal-agenda-time b { font-size: 12.5px; }
.cal-agenda-time small { font-size: 11px; color: var(--text-3); }
.cal-agenda-text { display: flex; flex-direction: column; min-width: 0; }
.cal-agenda-text b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-agenda-text small { font-size: 11.5px; color: var(--text-2); }

/* ---------- details popover ---------- */
.cal-pop {
  position: absolute; z-index: 25; width: 284px; padding: 14px 14px 12px; border-radius: 16px;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-hi), var(--shadow-pop);
  animation: cal-pop-in .16s var(--ease);
}
.no-glass .cal-pop { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
@keyframes cal-pop-in { from { opacity: 0; transform: scale(.96); } }
.cal-pop-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.cal-pop-swatch { flex: 0 0 12px; height: 12px; margin-top: 6px; border-radius: 4px; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.cal-pop-head h3 { flex: 1; margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; word-break: break-word; }
.cal-pop-head .icon-btn { width: 26px; height: 26px; margin: -2px -4px 0 0; color: var(--text-2); }
.cal-pop-row { display: flex; align-items: center; gap: 10px; padding: 4px 0 4px 1px; font-size: 13px; color: var(--text-2); }
.cal-pop-row .ic { color: var(--text-3); }
.cal-pop-row em { font-style: normal; color: var(--text-3); margin-left: 6px; }
.cal-pop-cal { flex: 0 0 15px; height: 15px; display: grid; place-items: center; }
.cal-pop-cal::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--k); }
.cal-pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- new / edit sheet ---------- */
.cal-sheet-layer {
  position: absolute; inset: 0; z-index: 30; display: flex; justify-content: center; align-items: flex-start; padding: 64px 12px 12px;
  background: rgba(6, 10, 18, .38); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  animation: cal-fade .18s ease; transition: opacity .18s;
}
[data-theme="light"] .cal-sheet-layer { background: rgba(30, 40, 60, .18); }
.cal-sheet-layer.closing { opacity: 0; }
.cal-sheet-layer.closing .cal-sheet { transform: translateY(-10px) scale(.98); }
@keyframes cal-fade { from { opacity: 0; } }
@keyframes cal-sheet-in { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
@keyframes cal-sheet-up { from { transform: translateY(100%); } }
.cal-sheet {
  --c: var(--accent);
  width: min(460px, 100%); max-height: 100%; overflow-y: auto; padding: 16px 18px 18px; border-radius: 20px;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line-2);
  animation: cal-sheet-in .26s var(--ease); transition: transform .18s var(--ease);
}
.cal-sheet-head { display: flex; align-items: center; gap: 10px; }
.cal-sheet-badge { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); transition: background .2s, color .2s; }
.cal-sheet-head h3 { flex: 1; margin: 0; font-size: 15px; font-weight: 700; }
.cal-sheet-head .icon-btn { width: 28px; height: 28px; color: var(--text-2); }
.cal-sheet-titlewrap { display: flex; align-items: stretch; gap: 12px; padding: 2px 2px 2px 4px; }
.cal-sheet-bar { flex: 0 0 4px; border-radius: 2px; background: var(--c); transition: background .2s; }
.cal-sheet-title {
  flex: 1; min-width: 0; padding: 6px 0; border: 0; outline: 0; background: none; color: var(--text);
  font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: -.01em;
}
.cal-sheet-title::placeholder { color: var(--text-3); }
.cal-sheet-group { padding: 2px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cal-sheet-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-height: 50px; padding: 8px 0; }
.cal-sheet-row + .cal-sheet-row { border-top: 1px solid var(--line); }
.cal-sheet-ic { color: var(--text-2); display: grid; place-items: center; }
.cal-sheet-lbl { width: 66px; font-size: 13px; font-weight: 600; }
.cal-sheet-row .input { height: 32px; padding: 0 10px; background: var(--surface); font-variant-numeric: tabular-nums; }
.cal-sheet-row input[type="date"] { width: 156px; }
.cal-sheet-times { display: flex; align-items: center; gap: 6px; }
.cal-sheet-times .input { width: 122px; }
.cal-sheet-dash { color: var(--text-3); }
.cal-sheet-hint { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-3); }
.cal-sheet-hint.bad { color: #e5484d; }
.cal-sheet-cals, .cal-sheet-swatches { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cal-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
.app-calendar .cal-chip.on { background: color-mix(in srgb, var(--k) 18%, transparent); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--k); }
.cal-sw {
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--k); color: #fff; transition: box-shadow .14s, transform .1s;
}
.cal-sw .ic { opacity: 0; transition: opacity .12s; }
.cal-sw:hover { transform: scale(1.08); }
.cal-sw.on { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--k); }
.cal-sw.on .ic { opacity: 1; }
.cal-sheet-actions { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.app-calendar .cal-sheet-del { color: #e5484d; }

/* =====================================================================
   Narrow (phone / small window)
   ===================================================================== */
.cal-narrow .cal-side {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 16; width: min(290px, 86%);
  background: var(--glass-solid); border-right: 1px solid var(--line); box-shadow: var(--shadow-pop);
  transform: translateX(-104%); transition: transform .26s var(--ease); visibility: hidden;
}
.cal-narrow.cal-side-open .cal-side { transform: none; visibility: visible; }
.cal-narrow.cal-side-open .cal-scrim { display: block; position: absolute; inset: 0; z-index: 15; background: rgba(0, 0, 0, .32); animation: cal-fade .2s; }
.cal-narrow .cal-toolbar { height: auto; flex-wrap: wrap; row-gap: 8px; padding: 8px 10px 10px; }
.cal-narrow .cal-toolbar .cal-title { font-size: 18px; }
.cal-narrow .cal-seg { order: 10; width: 100%; }
.cal-narrow .cal-seg button { flex: 1; justify-content: center; }

.cal-narrow .cal-month .cal-grid { flex: 0 0 auto; grid-template-rows: repeat(6, 50px); }
.cal-narrow .cal-dow span { text-align: center; padding: 6px 0; }
.cal-narrow .cal-cell { align-items: center; padding: 3px 0; border-right: 0; }
.cal-narrow .cal-cell.we { background: none; }
.cal-narrow .cal-cell.sel { background: none; }
.cal-narrow .cal-cell-head { justify-content: center; flex-basis: 30px; }
.cal-narrow .cal-num { min-width: 30px; height: 30px; border-radius: 15px; font-size: 14px; }
.cal-narrow .cal-cell.sel:not(.today) .cal-num { background: var(--text); color: var(--surface); }
.cal-dots { display: flex; gap: 3px; justify-content: center; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; }
.cal-agenda { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.cal-agenda-head { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 2px; }
.cal-agenda-head b { font-size: 16px; }
.cal-agenda-head span { font-size: 13px; color: var(--text-2); }
.cal-agenda-head .btn { margin-left: auto; align-self: center; }
.cal-agenda-empty { margin: 0; padding: 18px 0; text-align: center; font-size: 13px; color: var(--text-3); }

.cal-narrow .cal-tg { --gut: 46px; }
.cal-narrow .cal-tg-corner { font-size: 0; }
.cal-narrow .cal-tg-dayhead { flex-direction: column; gap: 1px; height: 58px; padding: 0; }
.cal-narrow .cal-tg-dayhead .dow { font-size: 11px; }
.cal-narrow .cal-tg-dayhead .num { min-width: 28px; height: 28px; font-size: 16px; }
.cal-narrow .cal-tg-day .cal-tg-dayhead { flex-direction: row; gap: 10px; }
.cal-narrow .cal-tg-gutter span { right: 6px; font-size: 9.5px; }
.cal-narrow .cal-ev { padding: 3px 4px 3px 7px; font-size: 10.5px; }
.cal-narrow .cal-ev small { display: none; }
.cal-narrow .cal-ev b { word-break: normal; overflow-wrap: normal; -webkit-line-clamp: 4; }
.cal-narrow .cal-tg-day .cal-ev small { display: block; }
.cal-narrow .cal-now-label { font-size: 9px; }

.cal-narrow .cal-sheet-layer { align-items: flex-end; padding: 0; }
.cal-narrow .cal-sheet { width: 100%; max-height: 92%; border-radius: 22px 22px 0 0; padding-bottom: 26px; animation: cal-sheet-up .3s var(--ease); }
.cal-narrow .cal-sheet-lbl { display: none; }
.cal-narrow .cal-sheet-row input[type="date"] { flex: 1; width: auto; }
.cal-narrow .cal-sheet-times { flex: 1; }
.cal-narrow .cal-sheet-times .input { flex: 1; width: auto; min-width: 0; }
.cal-narrow .cal-sheet-hint { margin-left: 26px; }
