/* Campus ILC · Acompañamiento: Mentoría, Espiritual, Calendario y Proyecto Integrador
   Prefijos: men- (mentoría), esp- (espiritual), cal- (calendario), pi- (proyecto). */

/* ═════════════════════ MENTORÍA ═════════════════════ */
.men-body { padding-top: var(--s-8); }
.men-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--s-6); align-items: start; }
.men-welcome { position: relative; padding-left: var(--s-6); margin-bottom: var(--s-6); }
.men-welcome::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 2px; background: var(--burgundy); }
.men-welcome h2 { color: var(--burgundy); font-size: var(--t-2xl); }
.men-welcome p { margin-top: 10px; color: var(--ink-soft); font-size: 1.08rem; max-width: 64ch; }

.men-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s-5); align-items: stretch; }
.men-stack { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
.men-label { font-size: 1.3rem; align-self: flex-start; }

/* Mentor asignado */
.men-mentor { padding: var(--s-6) var(--s-6) var(--s-5); display: flex; flex-direction: column; align-items: center; text-align: center; }
.men-portrait { position: relative; display: grid; place-items: center; margin: var(--s-6) 0 var(--s-5); }
.men-portrait::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid var(--gold-soft); opacity: .7; }
.men-portrait::after { content: ""; position: absolute; inset: -18px; border-radius: 50%; border: 1px dashed rgba(169, 132, 79, .28); }
.men-portrait .avatar { font-size: 3.4rem; letter-spacing: .04em; color: #F6E9DF; box-shadow: inset 0 0 0 3px rgba(217, 196, 160, .55), 0 18px 40px rgba(62, 9, 0, .22); background: radial-gradient(120% 120% at 30% 20%, #8E2A18 0%, #5D0D00 45%, #3E0900 100%); }
.men-name { font-size: 1.6rem; color: var(--ink); }
.men-role { color: var(--ink-soft); margin-top: 2px; }
.men-rol2 { color: var(--gold); font-size: 0.68rem; margin-top: 8px; letter-spacing: .18em; }
.men-frase { margin: var(--s-5) 0 0; font-family: var(--font-display); font-style: italic; font-size: 1.28rem; line-height: 1.3; color: var(--ink-soft); padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); width: 100%; }
.men-mentor-foot { width: 100%; margin-top: auto; padding-top: var(--s-5); }
.men-count { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 0.8rem; color: var(--ink-mute); }
.men-count svg { width: 14px; height: 14px; }

/* Próxima sesión */
.men-session { padding: var(--s-6); }
.men-session .card-head { margin-bottom: var(--s-4); }
.men-session-body { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.men-date { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 8px; border-radius: var(--r-md); background: var(--burgundy-50); color: var(--burgundy); text-transform: uppercase; aspect-ratio: 1 / 1.02; }
.men-date small { font-size: 0.8rem; letter-spacing: .1em; font-weight: 600; }
.men-date b { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; font-weight: 600; margin: 2px 0; }
.men-session-info h4 { font-size: 1.35rem; color: var(--ink); }
.men-session-info p { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); margin-top: 6px; font-size: 0.95rem; }
.men-session-info p svg { width: 18px; height: 18px; color: var(--ink-mute); }
.men-req-btn { margin-top: var(--s-4); }
.men-session-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; }
.men-session-links .link { font-size: 0.86rem; }
.men-session-links .link svg { width: 15px; height: 15px; }
.men-pend { display: flex; align-items: center; gap: 8px; margin-top: var(--s-4); padding: 10px 14px; border-radius: var(--r-md); background: var(--warn-bg); color: var(--warn); font-size: 0.88rem; font-weight: 600; }
.men-pend[hidden] { display: none; }
.men-pend svg { width: 16px; height: 16px; }
.men-pend .link { margin-left: auto; color: var(--warn); }

/* Objetivos */
.men-goals { padding: var(--s-6); }
.men-goals .link svg { width: 15px; height: 15px; }
.men-goals .card-title, .men-session .card-title { font-size: 1.32rem; }
.men-body .card-head .link { white-space: nowrap; flex: none; }
.men-goals-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.men-goal { display: flex; flex-direction: column; padding: 0 var(--s-5); border-left: 1px solid var(--line); }
.men-goal:first-child { padding-left: 0; border-left: 0; }
.men-goal:last-child { padding-right: 0; }
.men-goal-head { display: flex; align-items: center; gap: 10px; }
.men-goal-head svg { width: 20px; height: 20px; color: var(--bar); }
.men-goal-head h4 { font-size: 1.2rem; }
.men-goal p { margin-top: 8px; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; flex: 1; }
.men-goal-bar { display: flex; align-items: center; gap: 12px; margin-top: var(--s-4); }
.men-goal-bar .progress { flex: 1; }
.men-goal-bar .progress > span { background: var(--bar); }
.men-goal-bar b { font-size: 0.9rem; color: var(--ink-soft); font-weight: 600; min-width: 3ch; text-align: right; }
.men-goal-label { display: flex; align-items: center; gap: 8px; }
.men-goal-label svg { width: 17px; height: 17px; color: var(--burgundy); }

/* Lateral: recursos y bandeja */
.men-aside { display: flex; flex-direction: column; gap: var(--s-5); }
.men-side { padding: var(--s-5) var(--s-5) var(--s-4); }
.men-side .card-head { margin-bottom: var(--s-3); }
.men-side .card-title { font-size: 1.32rem; }
.men-side .link { font-size: 0.86rem; }
.men-res-list, .men-inbox-list { list-style: none; }
.men-res-list li + li, .men-inbox-list li + li { border-top: 1px solid var(--line); }
.men-res, .men-msg { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 6px; margin: 0 -6px; background: none; border: 0; text-align: left; border-radius: var(--r-md); transition: background var(--d-fast) var(--ease-out); width: calc(100% + 12px); }
.men-res:hover, .men-msg:hover { background: var(--canvas); }
.men-res .res-thumb { width: 96px; height: 66px; }
.men-res-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.men-res-body .badge { height: 20px; font-size: 0.64rem; padding: 0 8px; }
.men-res-body strong { font-weight: 600; font-size: 0.95rem; line-height: 1.3; color: var(--ink); }
.men-res-body > span:last-child { font-size: 0.82rem; color: var(--ink-mute); }
.men-done { font-style: normal; color: var(--ok); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.men-done svg { width: 13px; height: 13px; }
.men-chev { width: 18px; height: 18px; color: var(--burgundy); flex: none; transition: transform var(--d-ui) var(--ease-out); }
.men-res:hover .men-chev, .men-msg:hover .men-chev { transform: translateX(3px); }

.men-msg { align-items: flex-start; }
.men-msg .avatar { margin-top: 2px; }
.men-me { background: linear-gradient(140deg, #A9844F, #7A5A2E) !important; }
.men-msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.men-msg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.men-msg-top strong { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.men-to { font-family: var(--font-text); font-size: 0.78rem; color: var(--ink-mute); font-weight: 400; }
.men-msg-top time { font-size: 0.78rem; color: var(--ink-mute); white-space: nowrap; }
.men-msg-subj { font-weight: 600; font-size: 0.88rem; color: var(--ink); }
.men-msg-prev { font-size: 0.87rem; color: var(--ink-soft); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.men-msg-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; color: var(--ok); font-weight: 600; margin-top: 2px; }
.men-msg-meta svg { width: 13px; height: 13px; }
.men-msg.is-unread .men-msg-top strong, .men-msg.is-unread .men-msg-prev { color: var(--ink); }
.men-msg.is-unread .men-msg-prev { font-weight: 500; }
.men-unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--burgundy); flex: none; margin-top: 8px; box-shadow: 0 0 0 4px var(--burgundy-100); }
.men-more { margin-top: 8px; font-size: 0.86rem; }

/* Historial y solicitudes */
.men-lower { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; margin-top: var(--s-8); }
.men-hist .link svg, .men-reqs-card .link svg { width: 15px; height: 15px; }
.men-timeline { list-style: none; position: relative; }
.men-timeline li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: var(--s-5); position: relative; padding-bottom: var(--s-5); }
.men-timeline li:last-child { padding-bottom: 0; }
.men-timeline li::before { content: ""; position: absolute; left: 84px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--bar); z-index: 1; }
.men-timeline li::after { content: ""; position: absolute; left: 89px; top: 18px; bottom: -4px; width: 1px; background: var(--line-strong); }
.men-timeline li:last-child::after { display: none; }
.men-timeline time { text-align: right; color: var(--ink-mute); font-size: 0.82rem; text-transform: uppercase; letter-spacing: .08em; line-height: 1.1; padding-right: 2px; }
.men-timeline time b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--burgundy); letter-spacing: 0; font-weight: 600; }
.men-timeline li > div { padding-left: var(--s-5); }
.men-tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.men-tl-head strong { font-size: 1rem; }
.men-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 4px; color: var(--bar); background: color-mix(in srgb, var(--bar) 10%, white); }
.men-tl-note { margin-top: 4px; color: var(--ink-soft); font-size: 0.93rem; line-height: 1.5; }

.men-reqs { list-style: none; }
.men-req { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.men-req:first-child { padding-top: 0; }
.men-req-date { width: 56px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: var(--r-sm); background: var(--stone); color: var(--burgundy); text-transform: uppercase; line-height: 1.1; }
.men-req-date small { font-size: 0.66rem; letter-spacing: .1em; font-weight: 600; }
.men-req-date b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.men-req-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.men-req-body strong { font-size: 0.97rem; }
.men-req-body span { font-size: 0.85rem; color: var(--ink-soft); }
.men-req-body em { font-family: var(--font-display); font-size: 1rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.men-req-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.men-cancel { font-size: 0.82rem; color: var(--ink-mute); }
.men-cancel:hover { color: var(--danger); }
.men-empty { text-align: center; padding: var(--s-5) var(--s-4); color: var(--ink-soft); font-size: 0.93rem; }
.men-empty svg { width: 32px; height: 32px; margin: 0 auto 10px; color: var(--burgundy-200); }
.men-empty .btn { margin-top: 14px; }
.men-note { display: flex; gap: 10px; margin-top: var(--s-5); padding: 12px 14px; border-radius: var(--r-md); background: var(--canvas); color: var(--ink-soft); font-size: 0.85rem; line-height: 1.45; }
.men-note svg { width: 17px; height: 17px; flex: none; color: var(--gold); margin-top: 1px; }
.men-note a { overflow-wrap: anywhere; }

/* Formularios de los modales de mentoría (también usados por otras vistas del grupo) */
.men-form { display: flex; flex-direction: column; gap: var(--s-5); }
.men-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.men-fs legend { margin-bottom: 8px; }
.men-radios { display: grid; gap: 10px; }
.men-radios--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.men-radios--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.men-radios .radio-card > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.men-radios .radio-card svg { width: 20px; height: 20px; color: var(--burgundy); margin-bottom: 4px; }
.men-radios .radio-card strong { font-size: 0.97rem; }
.men-radios .radio-card small { font-size: 0.8rem; color: var(--ink-mute); line-height: 1.3; }
.men-ta-sm { min-height: 96px; }
.men-err { color: var(--danger); font-weight: 600; }
.men-err[hidden] { display: none; }
.men-to-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--canvas); border-radius: var(--r-md); }
.men-to-row span { display: flex; flex-direction: column; line-height: 1.25; }
.men-to-row small { color: var(--ink-mute); font-size: 0.82rem; }

/* Hilo de mensajes */
.men-thread { display: flex; flex-direction: column; gap: 14px; max-height: 46vh; overflow-y: auto; padding: 2px 2px 6px; }
.men-bubble { display: flex; gap: 12px; align-items: flex-start; }
.men-bubble > div { background: var(--stone); border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg); padding: 12px 16px; max-width: 86%; }
.men-bubble.is-mine { flex-direction: row-reverse; }
.men-bubble.is-mine > div { background: var(--burgundy-50); border-radius: var(--r-lg) 4px var(--r-lg) var(--r-lg); }
.men-bubble p { font-size: 0.95rem; line-height: 1.55; overflow-wrap: anywhere; }
.men-bubble-meta { font-size: 0.8rem !important; color: var(--ink-mute); margin-bottom: 4px; }
.men-bubble-meta strong { color: var(--ink); }
.men-bubble-subj { font-weight: 600; }
.men-reply { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.men-reply .textarea { min-height: 96px; }
.men-reply .row-between { justify-content: flex-end; }
.men-reply .men-err { margin-right: auto; }

/* Vista previa de recursos */
.men-res-hero { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 8; background: var(--stone); }
.men-res-hero img { width: 100%; height: 100%; object-fit: cover; }
.men-res-hero.is-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(20, 6, 2, .65)); pointer-events: none; }
.men-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--burgundy); display: grid; place-items: center; z-index: 2; box-shadow: var(--e3); transition: transform var(--d-ui) var(--ease-out); }
.men-play:hover { transform: scale(1.06); }
.men-play svg { width: 28px; height: 28px; margin-left: 4px; }
.men-play[hidden] { display: none; }
.men-player { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; display: flex; align-items: center; gap: 12px; color: #fff; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.men-player[hidden] { display: none; }
.men-player .progress { flex: 1; }
.men-player .progress > span { transition: width 900ms linear; }

@media (max-width: 1240px) {
  .men-layout { grid-template-columns: 1fr; }
  .men-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); align-items: start; }
}
@media (max-width: 1024px) {
  .men-grid { grid-template-columns: 1fr; }
  .men-mentor { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-7); text-align: left; align-items: center; }
  .men-mentor .men-label { grid-column: 1 / -1; }
  .men-portrait { grid-row: 2 / span 5; margin: var(--s-5) var(--s-3); }
  .men-frase { border-bottom: 0; padding-bottom: 0; margin-top: var(--s-3); }
  .men-mentor-foot { grid-column: 2; padding-top: var(--s-4); }
  .men-count { justify-content: flex-start; }
  .men-lower { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .men-welcome { padding-left: var(--s-5); }
  .men-aside { grid-template-columns: 1fr; }
  .men-mentor { display: flex; text-align: center; }
  .men-portrait { margin: var(--s-6) 0 var(--s-5); }
  .men-count { justify-content: center; }
  .men-session-body { grid-template-columns: 1fr; gap: var(--s-4); }
  .men-date { flex-direction: row; gap: 10px; aspect-ratio: auto; padding: 10px 14px; justify-content: flex-start; }
  .men-date b { font-size: 2rem; }
  .men-goals .card-head { flex-wrap: wrap; }
  .men-body .card-title { font-size: 1.22rem; }
  .men-goals-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .men-goal { padding: 0; border-left: 0; }
  .men-goal + .men-goal { padding-top: var(--s-5); border-top: 1px solid var(--line); }
  .men-res .res-thumb { width: 76px; height: 56px; }
  .men-timeline li { grid-template-columns: 52px minmax(0, 1fr); gap: var(--s-3); }
  .men-timeline li::before { left: 58px; }
  .men-timeline li::after { left: 63px; }
  .men-timeline li > div { padding-left: var(--s-5); }
  .men-hist .card-head, .men-reqs-card .card-head { flex-wrap: wrap; }
  .men-radios--3, .men-radios--2 { grid-template-columns: 1fr; }
  .men-radios .radio-card > span { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
  .men-radios .radio-card svg { grid-row: span 2; margin: 0; }
}

/* ═════════════════════ ESPIRITUAL (más contemplativa: luz de vela, oro y piedra) ═════════════════════ */
.esp-hero::before { background: linear-gradient(90deg, rgba(28, 12, 6, .9) 0%, rgba(34, 14, 6, .72) 40%, rgba(34, 14, 6, .2) 72%, rgba(34, 14, 6, .1) 100%), linear-gradient(0deg, rgba(28, 12, 6, .35), transparent 40%); }
.esp-hero .wrap { padding-top: var(--s-10); padding-bottom: calc(var(--s-10) + var(--s-6)); }
.esp-hero .kicker { color: var(--gold-soft); border-color: rgba(217, 196, 160, .45); }
.esp-hero h1 { font-weight: 500; max-width: 18ch; }
.esp-hero .hero-quote { border-color: rgba(217, 196, 160, .45); }
.esp-body { position: relative; z-index: 2; }
.esp-eyebrow { color: var(--gold); letter-spacing: .24em; }
.esp-h3 { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; color: var(--ink); font-weight: 600; }
.esp-h3 svg { width: 20px; height: 20px; color: var(--gold); }

/* Momento de hoy */
.esp-today { margin-top: calc(var(--s-9) * -1); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); box-shadow: var(--e3); overflow: hidden; border-color: transparent; }
.esp-prayer { position: relative; padding: var(--s-8) var(--s-8) var(--s-7); background: radial-gradient(120% 90% at 0% 0%, #FFF8EC 0%, #FBF3E6 45%, #F6EDDF 100%); }
.esp-prayer::after { content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 140, .45), transparent 70%); pointer-events: none; }
.esp-prayer-text { margin: var(--s-4) 0 0; font-family: var(--font-display); font-style: italic; font-size: clamp(1.3rem, 1.05rem + .7vw, 1.62rem); line-height: 1.45; color: var(--burgundy-700); max-width: 46ch; position: relative; z-index: 1; }
.esp-prayer-text::first-letter { font-size: 2.6em; float: left; line-height: .9; margin: 6px 10px 0 0; color: var(--gold); font-style: normal; }
.esp-exam { padding: var(--s-7) var(--s-7) var(--s-6); border-left: 1px solid var(--line); background: var(--surface); }
.esp-exam .mute svg { width: 14px; height: 14px; display: inline; vertical-align: -2px; }
.esp-exam-list { list-style: none; margin-top: var(--s-4); }
.esp-exam-item { display: flex; gap: 14px; align-items: flex-start; padding: 10px 8px; margin: 0 -8px; border-radius: var(--r-md); cursor: pointer; transition: background var(--d-fast) var(--ease-out); }
.esp-exam-item:hover { background: var(--canvas); }
.esp-exam-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.esp-exam-box { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; margin-top: 1px; transition: background var(--d-ui) var(--ease-out), border-color var(--d-ui), color var(--d-ui), transform var(--d-ui) var(--ease-out); }
.esp-exam-box svg { width: 14px; height: 14px; stroke-width: 2.4; }
.esp-exam-item input:focus-visible + .esp-exam-box { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.esp-exam-item.is-done .esp-exam-box { background: var(--gold); border-color: var(--gold); color: #fff; transform: scale(1.04); }
.esp-exam-item strong { display: block; font-size: 0.95rem; }
.esp-exam-item small { display: block; color: var(--ink-soft); font-size: 0.86rem; line-height: 1.35; }
.esp-exam-item.is-done strong { color: var(--ink-mute); }
.esp-exam-foot { display: flex; align-items: center; gap: 12px; margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.esp-exam-dots { display: flex; gap: 5px; }
.esp-exam-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--sand); transition: background var(--d-ui); }
.esp-exam-dots i.is-on { background: var(--gold); }
.esp-reset { margin-left: auto; font-size: 0.85rem; }
.esp-reset svg { width: 14px; height: 14px; }
.esp-reset:disabled { opacity: .4; pointer-events: none; }

/* Dirección espiritual */
.esp-dir { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: var(--s-9); align-items: start; }
.esp-dir-intro h2 { font-size: var(--t-2xl); margin-top: 10px; color: var(--burgundy); font-weight: 500; }
.esp-points { list-style: none; margin-top: var(--s-6); display: flex; flex-direction: column; gap: 12px; }
.esp-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.esp-points svg { width: 19px; height: 19px; color: var(--gold); flex: none; margin-top: 3px; }
.esp-dir-card { box-shadow: var(--e2); }
.esp-form { display: flex; flex-direction: column; gap: var(--s-5); }
.esp-priests { display: flex; flex-direction: column; gap: 8px; }
.esp-priest { align-items: center; padding: 10px 14px; }
.esp-priest input { margin-top: 0; }
.esp-priest > span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.esp-priest strong { font-size: 0.97rem; }
.esp-priest small { color: var(--ink-mute); font-size: 0.82rem; }
.esp-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--stone); border-radius: var(--r-md); min-height: 46px; }
.esp-seg label { position: relative; cursor: pointer; }
.esp-seg input { position: absolute; opacity: 0; inset: 0; }
.esp-seg span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 100%; min-height: 38px; border-radius: 7px; font-weight: 600; font-size: 0.88rem; color: var(--ink-soft); transition: background var(--d-fast), color var(--d-fast); }
.esp-seg span svg { width: 16px; height: 16px; }
.esp-seg input:checked + span { background: var(--surface); color: var(--burgundy); box-shadow: var(--e1); }
.esp-seg input:focus-visible + span { outline: 2px solid var(--burgundy); outline-offset: 1px; }
.esp-confirm { text-align: center; padding: var(--s-4) 0; outline: none; }
.esp-confirm-ico { width: 64px; height: 64px; margin: 0 auto var(--s-4); border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.esp-confirm-ico svg { width: 30px; height: 30px; }
.esp-confirm h3 { font-size: 1.8rem; color: var(--ink); }
.esp-confirm > p { margin-top: 8px; }
.esp-confirm .row { justify-content: center; }
.esp-dl { margin: var(--s-5) 0 0; text-align: left; border: 1px solid var(--line); border-radius: var(--r-md); }
.esp-dl div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.esp-dl div:last-child { border-bottom: 0; }
.esp-dl dt { color: var(--ink-mute); }
.esp-dl dd { margin: 0; font-weight: 600; }
.esp-dir-quote { margin: var(--s-7) 0 0; padding: var(--s-5) 0 0 var(--s-5); border-left: 2px solid var(--gold-soft); }
.esp-dir-quote p { font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1.3; color: var(--ink-soft); }
.esp-dir-quote cite { display: block; margin-top: 8px; font-style: normal; text-transform: uppercase; letter-spacing: .2em; font-size: 0.7rem; color: var(--ink-mute); }
.esp-mysol { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.esp-mysol h4 { color: var(--ink-mute); font-family: var(--font-text); }
.esp-mysol ul { list-style: none; margin-top: 10px; }
.esp-mysol li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.esp-mysol li > svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.esp-mysol li span:not(.badge) { flex: 1; min-width: 0; }
.esp-mysol small { color: var(--ink-mute); }

/* Peticiones */
.esp-pet-layout { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.esp-pet-form { position: sticky; top: calc(var(--header-h) + 20px); background: linear-gradient(180deg, #FFFDF9, var(--surface)); }
.esp-pet-form .textarea { min-height: 120px; }
.esp-pet-form [hidden] { display: none; }
.esp-vis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.esp-vis .radio-card { padding: 12px; }
.esp-vis .radio-card > span { display: flex; flex-direction: column; gap: 2px; }
.esp-vis .radio-card svg { width: 18px; height: 18px; color: var(--burgundy); margin-bottom: 2px; }
.esp-vis strong { font-size: 0.95rem; }
.esp-vis small { font-size: 0.78rem; color: var(--ink-mute); line-height: 1.3; }
.esp-wall { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.esp-pet { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) var(--s-5) var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); position: relative; }
.esp-pet::before { content: "“"; position: absolute; top: 2px; left: 16px; font-family: var(--font-display); font-size: 3.4rem; line-height: 1; color: var(--gold-soft); }
.esp-pet.is-mine { background: #FFFBF3; border-color: var(--gold-soft); }
.esp-pet-text { font-family: var(--font-display); font-size: 1.24rem; line-height: 1.38; color: var(--ink); padding-top: 18px; overflow-wrap: anywhere; }
.esp-pet-foot { display: flex; flex-direction: column; gap: 10px; }
.esp-pet-meta { font-size: 0.82rem; color: var(--ink-mute); }
.esp-pet-meta strong { color: var(--ink-soft); }
.esp-pet-meta .badge { height: 20px; font-size: 0.62rem; }
.esp-pray { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); font-size: 0.86rem; font-weight: 600; text-align: left; transition: background var(--d-fast), border-color var(--d-fast), color var(--d-fast); }
.esp-pray svg { width: 17px; height: 17px; color: var(--gold); }
.esp-pray span { flex: 1; }
.esp-pray b { font-weight: 700; color: var(--ink); }
.esp-pray:hover { border-color: var(--gold); color: var(--ink); }
.esp-pray[aria-pressed="true"] { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.esp-pray[aria-pressed="true"] svg { color: var(--gold-soft); fill: var(--gold-soft); }
.esp-pray[aria-pressed="true"] b { color: #fff; }
.esp-wall-wrap .tab-panel { padding-top: var(--s-5); }
.esp-mine { list-style: none; }
.esp-mine li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.esp-mine-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--burgundy-50); color: var(--burgundy); }
.esp-mine-ico.is-lock { background: var(--stone); color: var(--ink-soft); }
.esp-mine-ico svg { width: 17px; height: 17px; }
.esp-mine-body p { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.35; overflow-wrap: anywhere; }
.esp-mine-body small { color: var(--ink-mute); font-size: 0.82rem; }

/* Recursos */
.esp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.esp-chips .chip { height: 34px; }
.esp-res { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: var(--s-6); align-items: stretch; }
.esp-res.no-feature { grid-template-columns: 1fr; }
.esp-gospel { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: var(--s-7); border: 0; border-radius: var(--r-lg); color: var(--on-dark); overflow: hidden; isolation: isolate; background: radial-gradient(90% 70% at 85% 10%, rgba(217, 160, 90, .35), transparent 60%), linear-gradient(160deg, #4C1206 0%, #2E0B04 100%); box-shadow: var(--e2); transition: transform var(--d-ui) var(--ease-out), box-shadow var(--d-ui); min-height: 300px; }
.esp-gospel::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(217, 196, 160, .25); border-radius: 8px; pointer-events: none; }
.esp-gospel:hover { transform: translateY(-3px); box-shadow: var(--e3); }
.esp-gospel .caps { color: var(--gold-soft); font-size: 0.7rem; }
.esp-gospel strong { font-family: var(--font-display); font-size: 2.2rem; line-height: 1.05; font-weight: 600; color: #fff; margin-top: var(--s-3); }
.esp-gospel-ref { color: var(--on-dark-soft); font-size: 0.95rem; }
.esp-gospel-quote { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--gold-soft); margin-top: auto; padding-top: var(--s-5); }
.esp-gospel .link { color: #fff; margin-top: 4px; }
.esp-res-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-6); align-content: start; }
.esp-res-list li { border-bottom: 1px solid var(--line); }
.esp-res-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 6px; background: none; border: 0; text-align: left; border-radius: var(--r-md); transition: background var(--d-fast); }
.esp-res-item:hover { background: var(--surface); }
.esp-res-item:hover .men-chev { transform: translateX(3px); }
.esp-res-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #F6EDDB; color: #8A6430; }
.esp-res-ico svg { width: 20px; height: 20px; }
.esp-res-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.esp-res-body small { color: var(--gold); font-size: 0.66rem; letter-spacing: .16em; }
.esp-res-body strong { font-weight: 600; font-size: 0.98rem; line-height: 1.3; }
.esp-res-body > span { font-size: 0.84rem; color: var(--ink-mute); }
.esp-saved svg { width: 18px; height: 18px; color: var(--ok); }
.esp-modal-prayer { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; line-height: 1.45; color: var(--burgundy-700); }

/* Vida espiritual */
.esp-vida { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.esp-vida-list { list-style: none; margin-top: var(--s-4); }
.esp-vida-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.esp-vida-row:last-child { border-bottom: 0; padding-bottom: 0; }
.esp-vida-ico { width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; background: var(--stone); color: var(--burgundy); }
.esp-vida-ico svg { width: 21px; height: 21px; }
.esp-vida-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.esp-vida-body strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.esp-vida-body > span { font-size: 0.92rem; color: var(--ink-soft); }
.esp-vida-body small { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--ink-mute); margin-top: 2px; }
.esp-vida-body small svg { width: 13px; height: 13px; }
.esp-vida-row .btn { flex: none; }
.esp-pilgrim { margin-top: var(--s-6); display: grid; grid-template-columns: 1.2fr 1fr; border-radius: var(--r-lg); overflow: hidden; background: #2A1308; color: var(--on-dark); box-shadow: var(--e2); }
.esp-pilgrim-media { position: relative; min-height: 320px; }
.esp-pilgrim-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.esp-pilgrim-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, #2A1308); }
.esp-pilgrim-copy { padding: var(--s-8) var(--s-8) var(--s-8) var(--s-6); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.esp-pilgrim-copy .caps { display: flex; align-items: center; gap: 8px; color: var(--gold-soft); }
.esp-pilgrim-copy .caps svg { width: 16px; height: 16px; }
.esp-pilgrim-copy h3 { color: #fff; font-size: var(--t-xl); margin-top: 12px; font-weight: 500; }
.esp-pilgrim-copy p:not(.caps) { margin-top: 12px; color: var(--on-dark-soft); max-width: 48ch; }

@media (max-width: 1100px) {
  .esp-today { grid-template-columns: 1fr; }
  .esp-exam { border-left: 0; border-top: 1px solid var(--line); }
  .esp-dir { grid-template-columns: 1fr; gap: var(--s-7); }
  .esp-pet-layout { grid-template-columns: 1fr; }
  .esp-pet-form { position: static; }
  .esp-res { grid-template-columns: 1fr; }
  .esp-gospel { min-height: 0; }
}
@media (max-width: 760px) {
  .esp-hero .wrap { padding-top: var(--s-8); padding-bottom: var(--s-10); }
  .esp-today { margin-top: calc(var(--s-8) * -1); }
  .esp-prayer { padding: var(--s-6) var(--s-5); }
  .esp-exam { padding: var(--s-6) var(--s-5); }
  .esp-exam .row-between { flex-wrap: wrap; gap: 4px; }
  .esp-wall, .esp-res-list, .esp-vida { grid-template-columns: 1fr; }
  .esp-vida-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 14px; row-gap: 10px; }
  .esp-vida-row .btn { grid-column: 2; justify-self: start; }
  .esp-pilgrim { grid-template-columns: 1fr; }
  .esp-pilgrim-media { min-height: 200px; }
  .esp-pilgrim-media::after { background: linear-gradient(180deg, transparent 50%, #2A1308); }
  .esp-pilgrim-copy { padding: var(--s-6) var(--s-5) var(--s-7); }
  .esp-dl div { grid-template-columns: 90px 1fr; }
  .esp-gospel { padding: var(--s-6); }
  .esp-gospel strong { font-size: 1.8rem; }
  .esp-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .esp-chips::-webkit-scrollbar { display: none; }
  .esp-chips .chip { flex: none; }
}

/* ═════════════════════ CALENDARIO ═════════════════════ */
.cal-hero .wrap { padding-top: var(--s-8); padding-bottom: calc(var(--s-9) + var(--s-6)); }
.cal-hero h1 { font-size: clamp(2.3rem, 1.6rem + 2.4vw, 3.6rem); max-width: 20ch; }
.cal-body { position: relative; z-index: 2; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-6); align-items: start; }
.cal-main { padding: var(--s-5) var(--s-6) var(--s-6); box-shadow: var(--e2); min-width: 0; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding-bottom: var(--s-4); margin-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-nav h2 { font-size: 1.85rem; color: var(--burgundy); min-width: 9ch; text-align: center; padding: 0 6px; }
.cal-nav .btn { margin-left: 10px; }
.cal-h3 { font-size: 1.35rem; color: var(--burgundy); }
.cal-aside { display: flex; flex-direction: column; gap: var(--s-5); position: sticky; top: calc(var(--header-h) + 20px); }
.cal-aside .row-between .link { font-size: 0.82rem; }

/* Mes */
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow span { padding: 6px 8px 10px; font-size: 0.74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-mute); font-weight: 700; }
.cal-dow i { display: none; font-style: normal; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(118px, auto); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.cal-cell { position: relative; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 6px 8px; min-width: 0; display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: background var(--d-fast); background: var(--surface); }
.cal-cell:hover { background: #FDFAF5; }
.cal-cell.is-out { background: var(--canvas); }
.cal-cell.is-out .cal-num { color: var(--line-strong); }
.cal-cell.is-sel { background: var(--burgundy-50); box-shadow: inset 0 0 0 2px var(--burgundy-200); }
.cal-num { align-self: flex-start; width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); display: grid; place-items: center; font-variant-numeric: tabular-nums; transition: background var(--d-fast); }
.cal-num:hover { background: var(--stone); }
.cal-cell.is-past:not(.is-out) .cal-num { color: var(--ink-mute); }
.cal-cell.is-today .cal-num { background: var(--burgundy); color: #fff; }
.cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-ev { --c: var(--burgundy); display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 3px 6px; border: 0; border-radius: 5px; text-align: left; font-size: 0.76rem; line-height: 1.25; color: var(--ink); background: color-mix(in srgb, var(--c) 10%, white); box-shadow: inset 3px 0 0 var(--c); transition: background var(--d-fast), transform var(--d-fast) var(--ease-out); }
.cal-ev:hover { background: color-mix(in srgb, var(--c) 18%, white); }
.cal-ev-time { font-weight: 700; color: var(--c); flex: none; font-size: 0.7rem; }
.cal-ev-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.cal-cell.is-past .cal-ev { opacity: .62; }
.cal-more { align-self: flex-start; border: 0; background: none; font-size: 0.74rem; font-weight: 700; color: var(--burgundy); padding: 2px 6px; border-radius: 4px; }
.cal-more:hover { background: var(--burgundy-50); }
.cal-dots { display: none; }
.cal-bell { display: inline-grid; place-items: center; flex: none; color: var(--gold); }
.cal-bell svg { width: 13px; height: 13px; }

.cal-daypanel { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.cal-daypanel h3 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; color: var(--ink); }
.cal-none { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--ink-mute); font-size: 0.93rem; }
.cal-none svg { width: 18px; height: 18px; }

/* Filas (agenda, panel de día) */
.cal-rows { list-style: none; margin-top: 10px; }
.cal-rows li + li { margin-top: 6px; }
.cal-row { --c: var(--burgundy); width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; transition: border-color var(--d-fast), box-shadow var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out); }
.cal-row:hover { border-color: color-mix(in srgb, var(--c) 40%, white); box-shadow: var(--e1); }
.cal-row-time { width: 68px; flex: none; display: flex; flex-direction: column; line-height: 1.2; }
.cal-row-time b { font-size: 0.9rem; color: var(--ink); }
.cal-row-time small { font-size: 0.76rem; color: var(--ink-mute); }
.cal-row-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); flex: none; }
.cal-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cal-row-cat { font-size: 0.66rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--c); }
.cal-row-body strong { font-weight: 600; font-size: 0.98rem; line-height: 1.3; }
.cal-row-body > span { display: flex; align-items: center; gap: 5px; font-size: 0.83rem; color: var(--ink-mute); }
.cal-row-body > span svg { width: 14px; height: 14px; }
.cal-row-chev { width: 18px; height: 18px; color: var(--ink-mute); flex: none; }
.cal-row .cal-bell svg { width: 16px; height: 16px; }

/* Semana */
.cal-week-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.cal-week { --hh: 56px; --tc: 58px; min-width: 760px; }
.cal-wk-head, .cal-wk-allday, .cal-wk-body { display: grid; grid-template-columns: var(--tc) repeat(7, minmax(0, 1fr)); }
.cal-wk-day { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 0 10px; border: 0; background: none; border-radius: var(--r-md); color: var(--ink-soft); }
.cal-wk-day small { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--ink-mute); }
.cal-wk-day b { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; line-height: 1.1; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.cal-wk-day:hover b { background: var(--stone); }
.cal-wk-day.is-sel b { box-shadow: inset 0 0 0 2px var(--burgundy-200); }
.cal-wk-day.is-today b { background: var(--burgundy); color: #fff; }
.cal-wk-allday { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); background: var(--canvas); }
.cal-wk-allday > span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-mute); padding: 8px 6px; }
.cal-wk-allday > div { padding: 5px 3px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 34px; }
.cal-wk-body { position: relative; }
.cal-wk-hours span { display: block; height: var(--hh); font-size: 0.72rem; color: var(--ink-mute); text-align: right; padding-right: 10px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.cal-wk-hours span:first-child { visibility: hidden; }
.cal-wk-col { position: relative; height: calc(var(--hours) * var(--hh)); border-left: 1px solid var(--line); background-image: repeating-linear-gradient(180deg, transparent 0, transparent calc(var(--hh) - 1px), var(--line) calc(var(--hh) - 1px), var(--line) var(--hh)); }
.cal-wk-col.is-today { background-color: #FDF8F1; }
.cal-block { --c: var(--burgundy); position: absolute; top: calc(var(--top) * var(--hh) + 1px); height: calc(var(--h) * var(--hh) - 3px); left: calc(3px + (100% - 6px) / var(--n) * var(--l)); width: calc((100% - 6px) / var(--n) - 2px); display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 7px; border: 0; border-radius: 6px; text-align: left; overflow: hidden; color: #fff; background: var(--c); box-shadow: 0 2px 6px rgba(40, 15, 8, .14); font-size: 0.75rem; line-height: 1.2; transition: transform var(--d-fast) var(--ease-out), box-shadow var(--d-fast); }
.cal-block:hover { transform: translateY(-1px); box-shadow: var(--e2); z-index: 2; }
.cal-block-time { opacity: .85; font-size: 0.68rem; font-weight: 600; }
.cal-block strong { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-block .cal-bell { position: absolute; right: 5px; top: 5px; color: #fff; }

/* Agenda */
.cal-agenda { display: flex; flex-direction: column; }
.cal-ag-day { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-5); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.cal-ag-day:last-child { border-bottom: 0; }
.cal-ag-day.is-past { opacity: .6; }
.cal-ag-date { display: flex; flex-direction: column; align-items: flex-start; padding-top: 8px; }
.cal-ag-date b { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; font-weight: 600; color: var(--burgundy); }
.cal-ag-date span { font-size: 0.86rem; color: var(--ink-soft); }
.cal-ag-date em { font-style: normal; margin-top: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #fff; background: var(--burgundy); padding: 2px 8px; border-radius: 4px; }
.cal-ag-day .cal-rows { margin-top: 0; }

/* Leyenda y próximas */
.cal-legend { list-style: none; margin-top: var(--s-3); display: flex; flex-direction: column; gap: 2px; }
.cal-cat { --c: var(--burgundy); width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 8px; margin: 0 -8px; width: calc(100% + 16px); border: 0; border-radius: var(--r-md); background: none; text-align: left; transition: background var(--d-fast), opacity var(--d-fast); }
.cal-cat:hover { background: var(--canvas); }
.cal-cat-sw { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center; background: var(--c); color: #fff; border: 2px solid var(--c); transition: background var(--d-fast); }
.cal-cat-sw svg { width: 13px; height: 13px; stroke-width: 3; }
.cal-cat > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cal-cat strong { font-size: 0.93rem; font-weight: 600; }
.cal-cat small { font-size: 0.78rem; color: var(--ink-mute); }
.cal-cat b { font-size: 0.8rem; color: var(--ink-mute); font-weight: 600; }
.cal-cat[aria-pressed="false"] .cal-cat-sw { background: transparent; color: transparent; }
.cal-cat[aria-pressed="false"] strong { color: var(--ink-mute); }
.cal-up { list-style: none; margin-top: var(--s-3); }
.cal-up li + li { border-top: 1px solid var(--line); }
.cal-up-item { --c: var(--burgundy); width: calc(100% + 12px); margin: 0 -6px; display: flex; align-items: center; gap: 12px; padding: 10px 6px; border: 0; background: none; text-align: left; border-radius: var(--r-md); }
.cal-up-item:hover { background: var(--canvas); }
.cal-up-date { width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: var(--r-sm); background: color-mix(in srgb, var(--c) 10%, white); color: var(--c); text-transform: uppercase; line-height: 1.05; }
.cal-up-date small { font-size: 0.64rem; font-weight: 700; letter-spacing: .08em; }
.cal-up-date b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.cal-up-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-up-body strong { font-size: 0.88rem; font-weight: 600; line-height: 1.3; }
.cal-up-body small { font-size: 0.78rem; color: var(--ink-mute); }
.cal-rec-count { display: flex; align-items: center; gap: 8px; margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--ink-soft); }
.cal-rec-count svg { width: 16px; height: 16px; color: var(--gold); }

/* Modal de evento */
.cal-m-cat { --c: var(--burgundy); display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--c); }
.cal-m-cat i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.cal-m-cat .mute { text-transform: none; letter-spacing: 0; font-weight: 400; }
.cal-m-dl { margin: var(--s-4) 0 0; border: 1px solid var(--line); border-radius: var(--r-md); }
.cal-m-dl div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.cal-m-dl div:last-child { border-bottom: 0; }
.cal-m-dl dt { display: flex; align-items: center; gap: 8px; color: var(--ink-mute); }
.cal-m-dl dt svg { width: 16px; height: 16px; }
.cal-m-dl dd { margin: 0; font-weight: 600; }
.cal-m-dl dd .mute { font-weight: 400; font-size: 0.84rem; }
.cal-m-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s-5); }
.cal-m-rem { margin: var(--s-5) 0 0; padding: var(--s-4) var(--s-4) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--canvas); display: flex; flex-direction: column; gap: 10px; }
.cal-m-rem legend { display: flex; align-items: center; gap: 6px; padding: 0 6px; font-weight: 700; font-size: 0.9rem; }
.cal-m-rem legend svg { width: 16px; height: 16px; color: var(--gold); }
.cal-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 0.95rem; }
.cal-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cal-switch-ui { width: 42px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; transition: background var(--d-ui) var(--ease-out); }
.cal-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform var(--d-ui) var(--ease-out); }
.cal-switch input:checked + .cal-switch-ui { background: var(--burgundy); }
.cal-switch input:checked + .cal-switch-ui::after { transform: translateX(18px); }
.cal-switch input:focus-visible + .cal-switch-ui { outline: 2px solid var(--burgundy); outline-offset: 2px; }

@media (max-width: 1180px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 760px) {
  .cal-hero .wrap { padding-top: var(--s-7); padding-bottom: var(--s-9); }
  .cal-main { padding: var(--s-4) 12px var(--s-5); margin-inline: calc(var(--gutter) * -1 + 8px); border-radius: var(--r-md); }
  .cal-toolbar { gap: 10px; }
  .cal-nav { width: 100%; }
  .cal-nav h2 { font-size: 1.5rem; flex: 1; min-width: 0; }
  .cal-toolbar .seg { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .cal-dow span { padding: 4px 0 8px; text-align: center; letter-spacing: 0; }
  .cal-dow b { display: none; }
  .cal-dow i { display: inline; }
  .cal-grid { grid-auto-rows: 52px; }
  .cal-cell { padding: 4px 0; align-items: center; gap: 2px; }
  .cal-num { align-self: center; width: 32px; height: 32px; }
  .cal-chips { display: none; }
  .cal-dots { display: flex; gap: 3px; justify-content: center; }
  .cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
  .cal-cell.is-sel { box-shadow: inset 0 0 0 2px var(--burgundy); }
  .cal-daypanel { margin-top: var(--s-5); }
  .cal-row { padding: 10px 12px; gap: 10px; }
  .cal-row-time { width: 58px; }
  .cal-row-chev { display: none; }
  .cal-week { min-width: 640px; --tc: 48px; }
  .cal-ag-day { grid-template-columns: 1fr; gap: 8px; }
  .cal-ag-date { flex-direction: row; align-items: baseline; gap: 8px; padding-top: 0; }
  .cal-ag-date b { font-size: 1.8rem; }
  .cal-aside { grid-template-columns: 1fr; }
  .cal-m-dl div { grid-template-columns: 1fr; gap: 2px; }
  .cal-m-actions .btn { width: 100%; }
}

/* ═════════════════════ PROYECTO INTEGRADOR ═════════════════════ */
.pi-body { position: relative; z-index: 2; }
.pi-main { display: grid; grid-template-columns: 300px minmax(0, 1fr) 280px; gap: var(--s-6); padding: var(--s-5); box-shadow: var(--e3); border-color: transparent; }
.pi-media { position: relative; border-radius: var(--r-md); overflow: hidden; min-height: 240px; background: var(--stone); }
.pi-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.pi-media .badge { position: absolute; top: 14px; right: 14px; height: 30px; padding: 0 14px; box-shadow: 0 4px 12px rgba(40, 10, 4, .3); }
.pi-info { padding: var(--s-3) 0; min-width: 0; }
.pi-kicker { color: var(--ink-soft); font-size: 0.74rem; letter-spacing: .14em; }
.pi-info h2 { color: var(--burgundy); font-size: clamp(1.8rem, 1.3rem + 1.2vw, 2.4rem); margin-top: 6px; }
.pi-desc { margin-top: 12px; color: var(--ink-soft); font-size: 1.04rem; line-height: 1.55; max-width: 62ch; }
.pi-facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--s-6); }
.pi-facts li { display: flex; gap: 10px; align-items: flex-start; padding: 0 14px; border-left: 1px solid var(--line); min-width: 0; }
.pi-facts li:first-child { padding-left: 0; border-left: 0; }
.pi-fact-ico { width: 38px; height: 38px; border-radius: 50%; background: var(--burgundy-50); color: var(--burgundy); display: grid; place-items: center; flex: none; }
.pi-fact-ico svg { width: 18px; height: 18px; }
.pi-facts .avatar { --size: 38px !important; width: 38px; height: 38px; }
.pi-facts li > span:last-child { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.pi-facts small { font-size: 0.8rem; color: var(--ink-mute); }
.pi-facts strong { font-size: 0.93rem; font-weight: 600; color: var(--ink); }
.pi-facts em { font-style: normal; font-size: 0.8rem; color: var(--ink-mute); }
.pi-progress { padding: var(--s-4) 0 var(--s-3) var(--s-6); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.pi-progress .caps { color: var(--ink-soft); font-size: 0.72rem; letter-spacing: .12em; }
.pi-pct { display: flex; align-items: baseline; gap: 10px; }
.pi-pct b { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; color: var(--burgundy); font-weight: 600; }
.pi-pct span { font-size: 0.86rem; color: var(--ink-mute); }
.pi-progress .progress { height: 10px; }
.pi-stage { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--ink-soft); margin-bottom: 6px; }
.pi-stage svg { width: 15px; height: 15px; color: var(--gold); }
.pi-btn { justify-content: flex-start; min-height: 50px; }
.pi-btn span { flex: 1; text-align: left; }
.pi-btn + .pi-btn { margin-top: 2px; }

.pi-hitos { margin-top: var(--s-6); display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: var(--s-7); padding: var(--s-6) var(--s-7); }
.pi-hitos .card-title { font-size: 1.45rem; }
.pi-ms { list-style: none; margin-top: var(--s-5); }
.pi-ms .milestone { padding-right: 16px; }
.pi-ms .milestone.is-current::before { background: linear-gradient(90deg, var(--burgundy) 0 50%, var(--sand) 50%); }
.pi-ms-ok { color: var(--ok); font-weight: 700; font-size: 0.82rem; }
.pi-ms-pend { color: var(--ink-mute); font-weight: 600; font-size: 0.82rem; }
.pi-hitos-quote { margin: 0; padding-left: var(--s-6); border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; text-align: center; }
.pi-hitos-quote p { font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1.3; color: var(--ink-soft); }
.pi-hitos-quote cite { margin-top: 10px; font-style: normal; font-size: 0.7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); }

.pi-cols { margin-top: var(--s-6); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); align-items: start; }
.pi-col { padding: var(--s-5) var(--s-5) var(--s-4); min-width: 0; }
.pi-col .card-head { margin-bottom: var(--s-3); }
.pi-col .card-title { font-size: 1.3rem; }
.pi-col .card-head .link { font-size: 0.84rem; white-space: nowrap; flex: none; }
.pi-col .card-head .link svg { width: 15px; height: 15px; }
.pi-docs { list-style: none; }
.pi-doc { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pi-doc:last-child { border-bottom: 0; }
.pi-doc .res-ico { position: relative; width: 42px; height: 48px; border-radius: 8px; }
.pi-doc .res-ico svg { width: 28px; height: 28px; stroke-width: 1.3; }
.pi-doc .res-ico small { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 0.5rem; font-weight: 800; letter-spacing: .04em; }
.pi-doc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pi-doc-body strong { font-weight: 600; font-size: 0.94rem; line-height: 1.3; overflow-wrap: anywhere; }
.pi-doc-body strong .badge { height: 18px; font-size: 0.6rem; padding: 0 6px; vertical-align: 2px; }
.pi-doc-body > span { font-size: 0.8rem; color: var(--ink-mute); }
.pi-doc.is-pending .res-ico { background: var(--stone); color: var(--ink-mute); }
.pi-doc.is-pending strong { color: var(--ink-soft); }
.pi-dl { color: var(--burgundy); flex: none; }

.pi-fbs { display: flex; flex-direction: column; gap: 12px; }
.pi-fb { padding: var(--s-4); background: var(--canvas); border-radius: var(--r-md); border: 1px solid var(--line); }
.pi-fb.is-pending { background: var(--warn-bg); border-color: transparent; }
.pi-fb-head { display: flex; align-items: center; gap: 12px; }
.pi-fb-head > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pi-fb-head strong { font-size: 0.94rem; overflow-wrap: anywhere; }
.pi-fb-head small { font-size: 0.78rem; color: var(--ink-mute); }
.pi-fb-text { margin-top: 10px; font-family: var(--font-display); font-style: italic; font-size: 1.12rem; line-height: 1.4; color: var(--ink-soft); }
.pi-fb-wait { display: flex; gap: 8px; font-family: var(--font-text); font-style: normal; font-size: 0.86rem; color: var(--warn); }
.pi-fb-wait svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.pi-more { align-self: flex-end; font-size: 0.86rem; }
.pi-acts { list-style: none; }
.pi-acts li + li { border-top: 1px solid var(--line); }
.pi-act { width: calc(100% + 12px); margin: 0 -6px; display: flex; align-items: center; gap: 14px; padding: 12px 6px; border: 0; background: none; text-align: left; text-decoration: none; color: inherit; border-radius: var(--r-md); transition: background var(--d-fast); }
.pi-act:hover { background: var(--canvas); color: inherit; }
.pi-act:hover .men-chev { transform: translateX(3px); }
.pi-act-date { width: 50px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: var(--r-sm); background: var(--burgundy-50); color: var(--burgundy); text-transform: uppercase; line-height: 1.05; }
.pi-act-date small { font-size: 0.66rem; font-weight: 700; letter-spacing: .08em; }
.pi-act-date b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.pi-act-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pi-act-body strong { font-size: 0.94rem; font-weight: 600; }
.pi-act-body span { font-size: 0.82rem; color: var(--ink-mute); }

.pi-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pi-drop strong { font-weight: 600; overflow-wrap: anywhere; }
.pi-drop.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.pi-drop.has-file svg { color: var(--ok); }
.pi-drop:focus-within { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.pi-modal-xl { width: min(1120px, 100%); }
.pi-rub-wrap { max-height: 58vh; overflow: auto; }
.pi-rub { min-width: 820px; font-size: 0.86rem; }
.pi-rub th small { display: block; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink-mute); }
.pi-rub tbody th, .pi-rub tfoot th { text-align: left; font-family: var(--font-display); font-size: 1.05rem; color: var(--burgundy); font-weight: 600; padding: 14px 16px; vertical-align: top; text-transform: none; letter-spacing: 0; background: none; white-space: normal; }
.pi-rub td { line-height: 1.45; color: var(--ink-soft); }
.pi-rub tfoot td, .pi-rub tfoot th { border-top: 1px solid var(--line-strong); background: var(--canvas); }

@media (max-width: 1240px) {
  .pi-main { grid-template-columns: 280px minmax(0, 1fr); }
  .pi-progress { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: var(--s-5) 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px var(--s-5); }
  .pi-progress .caps { grid-column: 1 / -1; }
  .pi-progress .pi-stage { grid-column: 1 / -1; order: 5; margin: 0; }
  .pi-btn + .pi-btn { margin-top: 0; }
  .pi-facts { grid-template-columns: 1fr; gap: 12px; }
  .pi-facts li { padding: 0; border-left: 0; }
  .pi-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pi-cols > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .pi-hitos { grid-template-columns: 1fr; padding: var(--s-6); }
  .pi-hitos-quote { border-left: 0; border-top: 1px solid var(--line); padding: var(--s-5) 0 0; }
}
@media (max-width: 760px) {
  .pi-main { grid-template-columns: 1fr; gap: var(--s-5); padding: 12px 12px var(--s-5); }
  .pi-media { min-height: 200px; }
  .pi-info { padding: 0 var(--s-2); }
  .pi-progress { display: flex; align-items: stretch; padding: var(--s-5) var(--s-2) 0; }
  .pi-ms .milestone.is-current::before { background: linear-gradient(180deg, var(--burgundy) 0 50%, var(--sand) 50%); }
  .pi-cols { grid-template-columns: 1fr; }
  .pi-col .card-head { flex-wrap: wrap; }
  .pi-hitos { padding: var(--s-5); }
}
