/* calendario.css */
body.cal-view { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.cal-view .top { flex: none; }
main.full { flex: 1; min-height: 0; max-width: none; width: 100%; margin: 0; padding: 8px 8px 8px; display: flex; flex-direction: column; }
@media (max-width: 700px) { main.full { padding-bottom: calc(68px + var(--safe-b)); } }

.cal-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0; margin-bottom: 8px; }
.cal-head h2 { margin: 0; }
.cal-head-r { display: flex; gap: 6px; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal.cal-full { flex: 1; min-height: 0; gap: 4px; grid-template-rows: auto repeat(var(--rows), minmax(0, 1fr)); }
.dow { text-align: center; color: var(--muted); font-size: 12px; padding: 4px 0; }
.dow.we { color: #c9726c; }

.day { background: var(--bg); border: 1px solid var(--line); min-height: 78px; padding: 4px; border-radius: 6px; cursor: pointer; text-align: left; overflow: hidden; }
.day:hover { background: #21262d; }
.day.blank { border: 0; background: transparent; cursor: default; }
.cal-full .day { min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 4px 6px; }

.day.today, .day.holiday.today { border: 2px solid var(--blue); }
.day.weekend { background: #161c25; }
.day.holiday { background: rgba(248, 81, 73, .14); border-color: rgba(248, 81, 73, .55); }
.day.holiday:hover { background: rgba(248, 81, 73, .22); }
.day.holiday.today { background: rgba(248, 81, 73, .18); }

.cal-full .dh { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.day .n { color: var(--muted); font-weight: 700; font-size: 13px; }
.cal-full .n { font-size: clamp(13px, 1.5vw, 18px); }
.day.holiday .n { color: var(--red); }
.hname { color: var(--red); font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.cal-full .tags { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; margin-top: 3px; scrollbar-width: thin; }
.day .tag { background: var(--green); border-radius: 4px; padding: 2px 4px; margin-top: 3px; cursor: pointer; flex: none; }
.day .tag:hover { background: var(--green2); }
.day .tag b { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day .tag small { font-size: 10px; color: var(--lime); white-space: nowrap; }

@media (max-width: 700px) {
  .day { min-height: 64px; }
  .cal-full .dh { flex-direction: column; gap: 0; }
  .cal-full .day { padding: 3px 4px; }
  .hname { font-size: 9px; line-height: 1.1; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
  .day .tag b { font-size: 10px; }
  .day .tag small { display: none; }
}

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); flex: none; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line); }
.lg-hol { background: rgba(248, 81, 73, .35); border-color: var(--red) !important; }
.lg-we { background: #161c25; }
.lg-today { border: 2px solid var(--blue) !important; }