@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: #FBF3EA;
  font-family: 'Inter', sans-serif;
  color: #2E2420;
}
.app-root {
  min-height: 100vh;
  padding: 24px 16px 28px;
}
.header {
  max-width: 720px; margin: 0 auto 20px;
}
.header-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.title {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 28px; color: #6B1F1A;
  letter-spacing: 0.3px; margin: 0;
}
.view-toggle {
  display: flex; background: #F1DFCF; border-radius: 999px; padding: 3px; gap: 2px;
}
.view-toggle button {
  border: none; background: transparent; padding: 6px 14px; border-radius: 999px;
  font-family: 'Inter'; font-size: 13px; font-weight: 500; color: #8A6A57; cursor: pointer;
}
.view-toggle button.active { background: #A83232; color: #FBF3EA; }

.header-controls { display: flex; align-items: center; gap: 10px; }
.notif-btn {
  border: 1px solid #E3C6AE; background: #fff; width: 36px; height: 36px;
  border-radius: 50%; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-btn.active {
  background: #FBEFE4; border-color: #A83232;
  box-shadow: 0 0 0 1px #A83232;
}

.today-card {
  max-width: 720px; margin: 0 auto 18px;
  background: linear-gradient(135deg, #A83232 0%, #7A241F 100%);
  border-radius: 18px; padding: 18px 20px;
  display: flex; align-items: center; gap: 16px; color: #FBEFE4;
  cursor: pointer;
}
.today-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.75; }
.today-name { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; margin-top: 2px; }
.today-hint { font-size: 12px; opacity: 0.7; margin-top: 4px; }

.nav-row {
  max-width: 720px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-btn {
  border: 1px solid #E3C6AE; background: #fff; width: 32px; height: 32px; border-radius: 50%;
  font-size: 16px; color: #A83232; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.nav-label { font-family: 'Fraunces', serif; font-size: 17px; text-transform: capitalize; }
.today-btn {
  font-size: 12px; color: #A83232; background: none; border: 1px solid #E3C6AE;
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
}

.calendar { max-width: 720px; margin: 0 auto; }
.full-bleed {
  width: 100vw; position: relative; left: 50%; margin-left: -50vw;
  padding: 0 10px;
}
.weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.weekday-row span { text-align: center; font-size: 11px; color: #B08D77; font-weight: 600; }

.month-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 0;
  border-top: 1px solid #EFDFD0; border-bottom: 1px solid #EFDFD0;
  border-left: 1px solid #EFDFD0; border-right: 1px solid #EFDFD0;
}
.day-cell {
  background: #fff; padding: 5px 4px 6px; height: 84px; box-sizing: border-box;
  border-right: 1px solid #EFDFD0; border-bottom: 1px solid #EFDFD0;
  cursor: pointer; display: flex; flex-direction: column; gap: 3px; overflow: hidden;
  transition: background 0.15s;
}
.day-cell:nth-child(7n) { border-right: none; }
.day-cell:hover { background: #FCF4EC; }
.day-cell.muted { opacity: 0.35; }
.day-cell.today { background: #FBEFE4; box-shadow: 0 0 0 1px #A83232 inset; }
.day-num { font-size: 12px; font-weight: 600; color: #6B1F1A; }
.day-saint {
  font-size: 9.5px; color: #8A6A57; line-height: 1.25; word-break: break-word; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.week-list { display: flex; flex-direction: column; gap: 8px; }
.week-row {
  background: #fff; border: 1px solid #EFDFD0; border-radius: 14px;
  padding: 10px 14px; display: flex; align-items: center; gap: 14px; cursor: pointer;
}
.week-row.today { border-color: #A83232; }
.week-day-num { font-family: 'Fraunces', serif; font-size: 20px; color: #6B1F1A; width: 28px; text-align: center; }
.week-day-label { font-size: 10px; color: #B08D77; text-transform: uppercase; width: 28px; text-align: center; }
.week-name { font-size: 14px; font-weight: 500; color: #3A2C25; }
.week-empty { font-size: 13px; color: #C2AA9A; font-style: italic; }

.overlay {
  position: fixed; inset: 0; background: rgba(46, 30, 24, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.detail-card {
  background: #FFFCF9; border-radius: 20px; padding: 24px; max-width: 420px; width: 100%;
  max-height: 85vh; overflow-y: auto; position: relative;
}
.close-btn {
  position: absolute; top: 14px; right: 16px; border: none; background: none;
  font-size: 22px; color: #B08D77; cursor: pointer; line-height: 1;
}
.detail-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.detail-date { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #B08D77; }
.detail-name { font-family: 'Fraunces', serif; font-size: 21px; color: #6B1F1A; margin: 2px 0 0; }
.detail-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #F1E2D4; font-size: 13px; }
.detail-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: #B08D77; font-weight: 600; }
.hitos { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #3A2C25; }
.empty-msg { font-size: 13px; color: #8A6A57; }
.img-credit { margin-top: 12px; font-size: 10.5px; color: #C2AA9A; text-align: right; }

.legend {
  max-width: 720px; margin: 14px auto 0; display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: #A5876F; justify-content: center;
}
.legend-swatch {
  width: 14px; height: 14px; border-radius: 4px; background: #FBEFE4;
  box-shadow: 0 0 0 1px #A83232 inset; flex-shrink: 0;
}
