@font-face {
  font-family: 'Noto Serif';
  src: url('/assets/noto-serif.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #48252a;
  --wine: #762f39;
  --paper: #f5ede1;
  --card: #fffaf1;
  --line: #cbb8a4;
  --muted: #674e47;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font-family: 'Noto Serif', Georgia, serif;
  background: var(--paper);
}
a { color: inherit; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #9c562b;
  outline-offset: 4px;
}
.page { max-width: 1280px; margin: auto; padding: 0 clamp(20px, 5vw, 72px); }
.masthead {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 1rem; text-decoration: none; }
.brand-mark { color: var(--wine); margin-right: .25rem; }
.year, .eyebrow, .tile-bottom, .back-link, button, .access-card p {
  font-family: Arial, Helvetica, sans-serif;
}
.year { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.intro { padding: clamp(32px, 5vw, 62px) 0 16px; }
.intro h1, .door-content h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4.25rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.intro-copy > p { margin: 12px 0 0; color: var(--muted); line-height: 1.6; }
.calendar-section { padding: 20px 0 80px; }
.section-heading h2 { margin: 0 0 20px; font-size: 1rem; font-weight: 400; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.calendar-grid li { min-width: 0; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 145px;
  height: 100%;
  padding: 17px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: var(--card);
  border: 1px solid #dac9b8;
  border-radius: 2px 2px 8px 2px;
  box-shadow: 0 3px 8px #69433512;
}
.tile::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(225deg, var(--paper) 49%, #dac9b8 50%, #f5e9d8 54%);
  border-bottom-left-radius: 4px;
}
.calendar-grid li:nth-child(3n + 2) .tile { border-radius: 8px 2px 2px 2px; background-color: #f0dfce; }
.calendar-grid li:nth-child(4n) .tile { border-radius: 2px 8px 2px 2px; background-color: #ead4c4; }
.tile-number { font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1; }
.tile-bottom { font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere; }
.calendar-grid .tile-open { color: #fffaf1; background: var(--wine); border-color: var(--wine); }
.tile-open::before { background: linear-gradient(225deg, var(--paper) 49%, #b47872 50%, #944a50 54%); }
.tile-open:hover { background: #5e202c; }
.tile-today { outline: 3px solid #af7747; outline-offset: 2px; }
.tile-empty { color: #62473c; }
.tile-locked { color: #624c43; }
.detail-page main { min-height: 70vh; }
.back-link { display: inline-flex; align-items: center; min-height: 48px; margin: 20px 0 12px; font-size: .875rem; text-underline-offset: .25em; }
.door-card {
  max-width: 1000px;
  margin: 0 auto 80px;
  padding: clamp(25px, 5vw, 64px);
  background: var(--card);
  border: 1px solid #dac9b8;
  border-radius: 2px 2px 12px 2px;
  box-shadow: 0 5px 16px #69433512;
}
.door-content { max-width: 65ch; }
.eyebrow { margin: 0 0 20px; color: var(--muted); font-size: .875rem; }
.eyebrow span { padding: 0 6px; color: var(--wine); }
.door-content h1 { font-size: clamp(2.1rem, 5vw, 3.75rem); overflow-wrap: anywhere; }
.door-text { white-space: pre-line; font-size: 1.1rem; line-height: 1.8; margin-top: 24px; }
.spotify-player { margin-top: 28px; }
.spotify-player iframe { display: block; width: 100%; max-width: 500px; border: 0; border-radius: 12px; background: #ead4c4; }
.spotify-player a { display: inline-flex; align-items: center; min-height: 44px; font-family: Arial, Helvetica, sans-serif; font-size: .875rem; text-underline-offset: .25em; }
.door-photo { margin: 32px 0 0; }
.door-photo img { display: block; max-width: 100%; width: auto; height: auto; margin: auto; }
.quiz { margin-top: 32px; }
.quiz h2 { font-size: 1.35rem; line-height: 1.45; font-weight: 400; }
.quiz fieldset { display: grid; gap: 9px; padding: 0; margin: 0; border: 0; }
.option { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 12px 15px; border: 1px solid var(--line); cursor: pointer; font-family: Arial, Helvetica, sans-serif; line-height: 1.4; }
.option:has(input:checked) { border-color: var(--wine); background: #f4e3d8; }
.quiz fieldset:disabled .option { cursor: default; }
.option input { flex: none; width: 18px; height: 18px; accent-color: var(--wine); }
.quiz button { min-height: 48px; margin-top: 20px; padding: 0 20px; border: 0; border-radius: 3px; background: var(--wine); color: white; cursor: pointer; font-size: 1rem; }
.quiz button:hover { background: #5e202c; }
.feedback, .explanation { font-size: 1rem; line-height: 1.6; }
.feedback { padding: 12px 15px; border-left: 3px solid #a34a3d; background: #f9eae1; }
.feedback.correct { border-color: #52714d; background: #edf2e8; }
.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; }
.access-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.access-card { width: min(100%, 440px); padding: clamp(24px, 6vw, 45px); text-align: center; background: var(--card); border: 1px solid var(--line); }
.access-card h1 { font-size: 2rem; font-weight: 400; }
.access-card p { color: var(--muted); line-height: 1.6; font-size: 1rem; }
.access-card p:empty { display: none; }
@media (max-width: 930px) {
  .calendar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .masthead { min-height: 62px; }
  .intro { padding: 26px 0 4px; }
  .intro h1 { font-size: clamp(2rem, 8vw, 2.75rem); }
  .intro-copy > p { margin-top: 8px; }
  .calendar-section { padding-top: 24px; }
  .calendar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .tile { min-height: 118px; padding: 12px; }
  .tile::before { width: 23px; height: 23px; }
  .door-card { margin-bottom: 48px; }
}
@media (max-width: 360px) {
  .calendar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 108px; }
}
