/* Calendar (js/calendar/*.js). Prefix cal-. Reuses .sl-back / .sl-icon-btn (att-leave.css), .stl-star / .stl-quick(-chip) (staff-leave.css),
   .sm-chip (att-mark.css), .nd-file* / .nd-preview (screens.css).
   Month 22316:134382 · mini 134683 · list 134439 · list filtered 134950 · Birthday Wish 134843 / 134737 · Events Details 135022 / 135112. */

.cal [hidden] { display: none !important; }
.cal-head { display: flex; align-items: center; gap: 8px; height: 40px; }
.cal-head h1 { flex: 1; min-width: 0; }
.cal-icon-btn { flex: none; display: grid; place-items: center; padding: 4px; border-radius: var(--radius-i-sm); }
.cal-icon-btn:hover { background: var(--heles); }

/* ---------- Month view (134382 / 134683) ---------- */
.screen.cal-month { background: var(--goku); }
.cal-top {
  position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: 32px;
  padding: calc(var(--sb-dash) + 24px) 20px 28px; background: var(--goku);
}
.cal-card { display: flex; flex-direction: column; gap: 20px; padding: 12px; border-radius: var(--radius-s-sm); background: var(--gohan); }
.cal-title { display: flex; align-items: center; padding: 10.563px 0; }
.cal-nav { flex: none; width: 31.69px; height: 31.69px; display: grid; place-items: center; border-radius: 6px; }
.cal-nav.prev img { transform: rotate(180deg); }
.cal-nav:hover { background: var(--heles); }
.cal-mname { flex: 1; min-width: 0; border-radius: 6px; font: 700 18px/28px var(--font); color: var(--trunks); text-align: center; }
.cal-mname:hover { background: var(--heles); }
.cal-grid { display: flex; flex-direction: column; gap: 5.282px; padding: 0 8px; }
.cal-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5.282px; }
.cal-dow { padding: 8px 0; font: 700 16px/24px var(--font); color: rgba(0, 0, 0, 0.25); text-align: center; }
.cal-d { position: relative; height: 40px; display: grid; place-items: center; border-radius: 8px; }
.cal-d b { font: 700 16px/24px var(--font); color: var(--bulma); }
.cal-d:not(.is-blank):not(.is-on):hover { background: var(--heles); }
.cal-d.is-today b { color: var(--piccolo); }
.cal-d.is-out b { color: rgba(0, 0, 0, 0.25); }
.cal-d.is-on { background: var(--piccolo); box-shadow: inset 0 0 0 1.32px var(--piccolo); }
.cal-d.is-on b { color: var(--gohan); }
.cal-ind { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); }
.cal-day { display: flex; flex-direction: column; gap: 20px; padding: 0 20px 24px; }
.cal-day-h { font: 700 20px/32px var(--font); color: var(--bulma); }

/* ---------- Day rows (shared by month + list) ---------- */
.cal-rows { display: flex; flex-direction: column; gap: 24px; }
.cal-none { padding: 0 8px; font: 400 14px/20px var(--font); color: var(--trunks); }
.cal-hol { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 8px; border-radius: var(--radius-s-sm); background: rgba(64, 166, 159, 0.12); }
.cal-hol img, .cal-row > img { flex: none; }
.cal-hol-t { flex: 1; min-width: 0; font: 700 14px/20px var(--font); color: var(--bulma); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-hol-all { flex: none; width: 66px; text-align: right; font: 400 12px/16px var(--font); color: var(--zeno); white-space: nowrap; }
.cal-row { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 0 8px; text-align: left; }
.cal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; text-align: left; border-radius: 4px; }
.cal-t { font: 700 14px/20px var(--font); color: var(--bulma); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-s { font: 400 12px/16px var(--font); color: var(--trunks); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-bday-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.cal-bday-row { display: flex; align-items: center; gap: 12px; height: 36px; }
.cal-bday-row .cal-text { align-self: stretch; }
.cal-bday-row .cal-text:hover .cal-t { text-decoration: underline; }
.cal-wish { flex: none; height: 32px; padding: 4px 8px; border-radius: 4px; background: var(--jiren); font: 400 14px/24px var(--font); color: var(--piccolo); white-space: nowrap; }
.cal-wish:hover { background: rgba(78, 70, 180, 0.2); }
.cal-wish.is-done { background: var(--heles); color: var(--trunks); }
.cal-ev { border-radius: 8px; }
.cal-ev:hover { background: var(--heles); }
.cal-time {
  flex: none; align-self: stretch; width: 66px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  font: 400 12px/16px var(--font); color: var(--zeno); white-space: nowrap;
}

/* ---------- List view (134439 / 134950) ---------- */
.screen.cal-list { display: flex; flex-direction: column; overflow: hidden; background: var(--goku); }
.cal-lv-top { flex: none; display: flex; flex-direction: column; gap: 24px; padding: calc(var(--sb-dash) + 24px) 20px 24px; }
.cal-strip { display: flex; align-items: center; gap: 8px; touch-action: pan-y; user-select: none; }
.cal-wnav { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; }
.cal-wnav:hover { background: var(--heles); }
.cal-wdays { flex: 1; min-width: 0; display: flex; gap: 8px; }
.cal-wd { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 8px; border-radius: 8px; text-align: center; }
.cal-wd span { font: 400 12px/16px var(--font); color: rgba(0, 0, 0, 0.25); }
.cal-wd b { font: 700 16px/24px var(--font); color: var(--bulma); }
.cal-wd:not(.is-on):hover { background: var(--heles); }
.cal-wd.is-on { background: var(--piccolo); }
.cal-wd.is-on span { color: var(--beerus); }
.cal-wd.is-on b { color: var(--gohan); }
.cal-chips { display: flex; gap: 4px; }
.cal-lv-body {
  flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 24px; padding: 0 20px 24px;
}
.cal-lv-body::-webkit-scrollbar { display: none; }
.cal-dcard { flex: none; display: flex; flex-direction: column; gap: 20px; padding: 12px; border-radius: var(--radius-s-sm); background: var(--gohan); }
.cal-dcard-h { display: flex; align-items: center; gap: 10px; }
.cal-dcard-h h2 { flex: 1; min-width: 0; font: 700 14px/24px var(--font); color: rgba(0, 0, 0, 0.25); }
.cal-dcard.is-today .cal-dcard-h h2 { color: var(--piccolo); }
.cal-today { flex: none; padding: 4px 8px; border-radius: var(--radius-i-sm); background: var(--jiren); font: 500 12px/16px var(--font); color: var(--piccolo); }
.cal-dcard .cal-rows { padding: 0; }

/* ---------- Birthday Wish sheet (134843 / 134737) ---------- */
.sheet.cal-wish-sheet { padding-bottom: 0; }
.cal-wish-body { display: flex; flex-direction: column; gap: 24px; }
.cal-cake { display: flex; justify-content: center; }
.cal-to-row { display: flex; align-items: center; gap: 12px; }
.cal-to-row:has(.cal-to.is-open) { align-items: flex-start; }
.cal-to-slot { flex: 1; min-width: 0; display: flex; }
.cal-to { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; overflow: hidden; border-radius: 4px; text-align: left; }
.cal-to-l { flex: none; font: 400 12px/16px var(--font); color: #5D626C; }
.cal-to-names { flex: 1; min-width: 0; font: 400 16px/24px var(--font); color: var(--trunks); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more {
  flex: none; height: 20px; display: grid; place-items: center; padding: 0 4px; border: 1px solid var(--beerus); border-radius: 4px;
  font: 400 12px/16px var(--font); color: var(--trunks); white-space: nowrap;
}
.cal-to:hover .cal-more { border-color: var(--piccolo); color: var(--piccolo); }
.cal-to.is-open { align-items: flex-start; }
.cal-to.is-open .cal-to-names { max-height: 120px; overflow-y: auto; white-space: normal; font-weight: 700; color: var(--bulma); scrollbar-width: none; }
.cal-caret { display: inline-block; width: 1px; height: 18px; margin-left: 2px; vertical-align: -3px; background: var(--bulma); animation: cal-blink 1s steps(1) infinite; }
@keyframes cal-blink { 50% { opacity: 0; } }
.cal-add { flex: none; display: grid; place-items: center; padding: 8px; border-radius: 4px; background: var(--goku); }
.cal-add:hover { background: #EBEBEB; }
.cal-form { display: flex; flex-direction: column; gap: 12px; }
.cal-msg { display: block; padding: 15px 16px; border: 1px solid var(--goku); border-radius: var(--radius-i-sm); background: var(--goku); cursor: text; }
.cal-msg:focus-within { border-color: var(--piccolo); }
.cal-msg input { width: 100%; border: 0; outline: 0; background: transparent; font: 400 16px/24px var(--font); color: var(--bulma); }
.cal-msg input::placeholder { color: var(--trunks); opacity: 1; }
.cal-sheet-foot {
  position: sticky; bottom: 0; margin: 0 -20px; padding: 12px 20px; border-top: 1px solid var(--beerus); background: var(--gohan);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}
.cal-send { width: 100%; font-weight: 600; }

/* ---------- Events Details (135022 / 135112) ---------- */
.cal-evd-wrap { position: absolute; inset: 0; }
/* White backdrop under the status bar once the page scrolls (135022 has a white status bar). */
.cal-evd-wrap::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: var(--sb); z-index: 3; background: var(--gohan); pointer-events: none; }
.screen.cal-evd { background: var(--goku); }
.cal-evd-top { background: var(--gohan); }
.cal-evd-nav { display: flex; align-items: center; justify-content: space-between; height: 42px; box-sizing: content-box; padding: calc(var(--sb) + 16px) 20px 4px; }
.cal-evd-hero { display: flex; flex-direction: column; gap: 24px; padding: 24px 20px; }
.cal-evd-title { font: 700 24px/32px var(--font); color: var(--bulma); overflow-wrap: anywhere; }
.cal-evd-when { font: 400 14px/24px var(--font); color: var(--trunks); }
.cal-evd-desc { margin-top: 12px; font: 400 16px/24px var(--font); color: var(--bulma); overflow-wrap: anywhere; }
.cal-evd-tags { display: flex; gap: 8px; min-width: 0; }
.cal-tag {
  min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 16px 2px 12px; border-radius: 8px;
  font: 700 14px/24px var(--font); color: var(--bulma); white-space: nowrap;
}
.cal-tag span { overflow: hidden; text-overflow: ellipsis; }
.cal-tag img { flex: none; }
.cal-tag.cat { flex: none; background: var(--roshi-10); }
.cal-tag.loc { background: var(--heles); }
.cal-tabs { display: flex; height: 56px; padding: 0 20px; border-bottom: 1px solid var(--beerus); }
.cal-tab {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; margin-bottom: -1px; padding: 8px 16px;
  border-bottom: 2px solid transparent; font: 700 14px/24px var(--font); color: var(--trunks); white-space: nowrap;
}
.cal-tab.is-on { border-color: var(--piccolo); color: var(--piccolo); }
.cal-tab:not(.is-on):hover { background: var(--heles); }
.cal-tab-n { margin-left: 8px; font: 400 12px/16px var(--font); color: var(--trunks); }
.cal-evd-body { display: flex; flex-direction: column; gap: 24px; padding: 24px 20px 104px; }
.cal-evd-body.gallery { padding-top: 32px; }
.cal-card16 { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 16px; background: var(--gohan); }
.cal-card8 { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 8px; background: var(--gohan); }
.cal-card-h { font: 700 14px/24px var(--font); color: var(--bulma); }
.cal-desc-box { padding: 12px 16px; border-radius: 8px; background: var(--heles); font: 400 16px/24px var(--font); color: var(--bulma); overflow-wrap: anywhere; }
.cal-evd .nd-thumb { width: 40px; height: 40px; }
.cal-acts { display: flex; flex-direction: column; gap: 24px; list-style: none; margin: 0; padding: 0; }
.cal-act { position: relative; display: flex; flex-direction: column; gap: 4px; }
.cal-act:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 22px; bottom: -26px; width: 2px; background: var(--beerus); }
.cal-act-row { display: flex; align-items: center; gap: 12px; font: 400 14px/24px var(--font); color: var(--bulma); }
.cal-act-row b { font-weight: 700; }
.cal-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.cal-dot.krillin { background: rgba(255, 179, 25, 0.56); }
.cal-dot.frieza { background: rgba(92, 51, 207, 0.56); }
.cal-act-when { padding: 0 24px; font: 400 12px/16px var(--font); color: #5D626C; }
.cal-notes { gap: 8px; }
.cal-note { display: flex; flex-direction: column; gap: 4px; font: 400 12px/16px var(--font); }
.cal-note-by { color: var(--bulma); }
.cal-note-t { color: var(--trunks); overflow-wrap: anywhere; }
.cal-note + .cal-note { margin-top: 8px; }
.cal-add-note {
  align-self: flex-start; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 8px 8px 4px;
  border-radius: 4px; background: var(--jiren); font: 700 12px/16px var(--font); color: var(--piccolo);
}
.cal-add-note:hover { background: rgba(78, 70, 180, 0.2); }
.cal-note-edit { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.cal-note-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--beerus); border-radius: 8px; outline: 0; resize: vertical;
  font: 400 14px/20px var(--font); color: var(--bulma);
}
.cal-note-input:focus { border-color: var(--piccolo); }
.cal-note-btns { display: flex; justify-content: flex-end; gap: 8px; }
.cal-note-btn { padding: 4px 12px; border-radius: 4px; font: 700 12px/24px var(--font); color: var(--trunks); }
.cal-note-btn:hover { background: var(--heles); }
.cal-note-btn.save { background: var(--piccolo); color: var(--gohan); }
.cal-note-btn.save:hover { filter: brightness(1.08); }
.cal-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.cal-empty-text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cal-empty-t { font: 700 18px/28px var(--font); color: var(--trunks); }
.cal-upload { border-radius: 4px; font: 400 16px/24px var(--font); color: var(--piccolo); text-decoration: underline; text-underline-position: from-font; }
.cal-upload:hover { background: var(--jiren); }
.cal-evd-body.gallery .cal-gallery { margin-top: 16px; }
.cal-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cal-gimg { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--beerus); }
.cal-gimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cal-gimg:hover img { filter: brightness(0.94); }
.cal-fab {
  position: absolute; right: 16px; bottom: 97px; z-index: 5; min-width: 80px; height: 56px; display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 16px 20px 16px 16px; border-radius: 16px; background: var(--piccolo);
  box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  font: 700 16px/24px var(--font); color: var(--gohan); white-space: nowrap;
}
.cal-fab:hover { filter: brightness(1.08); }
