:root {
  --purple: #6B2D8F;
  --rose: #E58FB0;
  --gold: #D9A116;
  --cream: #FFF8E4;
  --ink: #1E1030;
  --ink-soft: #2A1A3A;
  --on-colour: #FFFFFF;
  --on-gold: #1A0A2E;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #fff;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}
.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 18px 56px;
}
img.cover {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
  margin: 2rem 0 0.8rem;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 2rem 0 0.8rem;
}
.section-head h2 { margin: 0; }
.btn-print {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
}
.btn-print:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.prose {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 12px;
}
.site-brand {
  margin: 4px 0 8px;
  text-align: center;
}
.site-brand img {
  width: min(100%, 480px);
  height: auto;
}
.site-foot {
  margin: 2.5rem 0 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
}
.note {
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.steps {
  list-style: none;
  margin: 8px 0 16px;
  padding: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  margin: 0 0 14px;
  padding-left: 2.4rem;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--purple);
  color: var(--on-colour);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
}
.steps span {
  display: block;
  font-size: 16px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.callout {
  background: #FBF4E4;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 8px 0 4px;
}
.callout-lead {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 6px;
}
.callout p {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.45;
}
.wreath { display: block; max-width: 640px; margin: 8px auto; }
.table-wrap { width: 100%; overflow-x: auto; margin: 8px 0 4px; }
table.weeks {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  color: var(--ink);
}
table.weeks th, table.weeks td {
  text-align: left;
  padding: 8px 10px 8px 0;
  vertical-align: top;
}
table.weeks th {
  font-weight: 700;
  color: var(--ink);
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  overflow: visible;
}
.dow {
  text-align: center;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  padding: 8px 0 4px;
}
.door-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 64px;
  margin: 0;
  padding: 0;
  position: relative;
  perspective: 900px;
  border: 2px solid var(--gold);
  border-radius: 10px;
  background: var(--cream);
  cursor: pointer;
  overflow: visible;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}
.door-btn.emphasis { border-width: 3px; }
.door-btn.selected { box-shadow: 0 0 0 2px var(--gold); }
.door-btn.open, .door-btn.selected { z-index: 4; }
.door-btn:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.door-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 7px;
  background: var(--cream);
}
.door-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.door-face {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 228, 0.28);
}
.door-btn.open .door-face {
  transform: rotateY(-115deg);
  box-shadow: none;
}
.door-cross-v, .door-cross-h {
  position: absolute;
  background: var(--gold);
  opacity: 0.65;
}
.door-cross-v {
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 2px;
  margin-left: -1px;
}
.door-cross-h {
  top: 50%;
  left: 8px;
  right: 8px;
  height: 2px;
  margin-top: -1px;
}
.door-hinge-t, .door-hinge-b {
  position: absolute;
  left: 3px;
  width: 5px;
  height: 12px;
  border-radius: 1px;
  background: var(--gold);
}
.door-hinge-t { top: 12px; }
.door-hinge-b { bottom: 12px; }
.door-knob {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-radius: 7px;
  background: var(--gold);
}
.door-num {
  position: relative;
  font-size: 20px;
  font-weight: 700;
}
.door-num.special { font-weight: 800; }
.door-meta {
  position: relative;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}
.opened-scene {
  width: 100%;
  max-width: 440px;
  margin: 16px auto 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.opened-frame {
  width: 100%;
  border: 3px solid var(--gold);
  border-radius: 12px;
  overflow: hidden;
  background: var(--cream);
}
.opened-frame img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.opened-caption {
  margin-top: 10px;
  font-style: italic;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  text-align: center;
}
.challenge {
  width: 100%;
  background: var(--purple);
  color: var(--on-colour);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 8px 0 4px;
}
.challenge-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-colour);
  margin-bottom: 6px;
}
.challenge-text {
  font-size: 18px;
  line-height: 1.4;
  color: var(--on-colour);
}
.liturgy {
  width: 100%;
  padding: 8px 0 4px;
}
.liturgy-text {
  font-style: italic;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
}
.liturgy-note {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-soft);
}
.kept-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 8px;
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  color: var(--ink);
  text-align: left;
}
.kept-row:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.switch {
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: #C8C2CE;
  position: relative;
}
.switch.on { background: var(--purple); }
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  display: block;
}
.switch.on i { transform: translateX(18px); }
.week-panel {
  width: 100%;
  border: 2px solid var(--purple);
  border-radius: 14px;
  padding: 16px 18px 10px;
  margin: 20px 0 12px;
}
.week-panel h2 { margin-top: 0; }
.week-day { width: 100%; padding: 10px 0 16px; }
.week-day-lead {
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.3;
}
.week-day-sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.week-day-reflection {
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  margin: 8px 0;
}
.week-day-liturgy {
  font-style: italic;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-soft);
  margin-top: 8px;
}
.quote { margin: 8px 0 12px; padding: 0; }
.quote-text {
  font-style: italic;
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
}
.quote-cite {
  margin: 8px 0 0;
  font-size: 16px;
  font-style: normal;
  color: var(--ink-soft);
}
@media (max-width: 640px) {
  .wrap { padding: 12px 12px 48px; }
  .calendar-grid { gap: 6px; }
  .dow { font-size: 12px; padding: 4px 0; }
  .door-num { font-size: 16px; }
  .door-meta { font-size: 9px; }
  .prose, .challenge-text { font-size: 17px; }
  h2 { font-size: 1.35rem; }
}
@media print {
  .btn-print { display: none; }
  .door-btn { break-inside: avoid; }
  .week-panel { break-inside: avoid; }
  body { background: #fff; }
}
