:root {
  --ink: #3a2a1c;
  --ink-soft: #6d5340;
  --paper: #f6f1e6;
  --paper-deep: #f3e6c8;
  --stitch: #7d5b3c;
  --stitch-light: #c6a36e;
  --tile: #f7f1e4;
  --tile-line: #d7c4a2;
  --accent: #9a3f24;
  --frame: #16110d;
  --wood: #5c4636;
  --cream: #f6efe4;
  --link: #7a3418;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, "Times New Roman", serif;
  color: var(--cream);
  background-color: var(--wood);
  background-image:
    radial-gradient(1100px 420px at 50% -8%, rgba(255, 236, 214, 0.16), transparent 60%),
    repeating-linear-gradient(90deg, rgba(40, 24, 12, 0.09) 0 1px, transparent 1px 13px);
}

a { color: inherit; }

img { max-width: 100%; }

.skip {
  position: absolute;
  left: 0.6rem;
  top: -3.2rem;
  background: #fff;
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  z-index: 2;
}

.skip:focus { top: 0.6rem; }

.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;
}

.site-header {
  text-align: center;
  padding: 1.15rem 1rem 0.35rem;
}

.wordmark {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-indent: 0.32em;
}

.wordmark a {
  color: var(--cream);
  text-decoration: none;
}

.wordmark a:hover,
.wordmark a:focus-visible { text-decoration: underline; }

.tagline {
  margin: 0.35rem 0 0;
  color: rgba(246, 239, 228, 0.82);
  font-size: 0.98rem;
}

.wrap {
  width: min(100%, 72rem);
  margin-inline: auto;
  padding: 0.55rem 0.7rem 1.4rem;
}

.frame {
  background: var(--frame);
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(90, 64, 42, 0.7),
    0 18px 40px rgba(20, 10, 4, 0.38);
}

.linen {
  container-type: inline-size;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(125, 91, 60, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 91, 60, 0.04) 1px, transparent 1px);
  background-size: 7px 7px;
  color: var(--ink);
}

.stitch {
  margin: 6px;
  padding: 0.7rem 0.4rem 0.55rem;
  border: 2px solid var(--stitch);
  box-shadow:
    0 0 0 4px var(--paper),
    0 0 0 5px var(--stitch-light);
}

.keepsake {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "spring year summer"
    "left center right"
    "autumn foot winter";
  gap: 0.35rem 0.3rem;
  align-items: stretch;
}

.corner[data-season="Spring"] { grid-area: spring; }
.year { grid-area: year; }
.corner[data-season="Summer"] { grid-area: summer; }
.side-left { grid-area: left; }
.center { grid-area: center; }
.side-right { grid-area: right; }
.corner[data-season="Autumn"] { grid-area: autumn; }
.bottom-months { grid-area: foot; }
.corner[data-season="Winter"] { grid-area: winter; }

.year {
  margin: 0;
  align-self: center;
  text-align: center;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  font-size: clamp(0.68rem, 2.4cqi, 0.95rem);
  color: var(--ink-soft);
}

.corner {
  align-self: center;
  text-align: center;
  justify-self: center;
}

.corner img {
  width: clamp(42px, 11cqi, 108px);
  height: clamp(42px, 11cqi, 108px);
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border: 2px solid var(--stitch-light);
  background: #fffdf8;
  opacity: 0.78;
}

.corner.is-current img {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent);
}

.season-name {
  display: block;
  margin-top: 0.2rem;
  font-size: clamp(0.52rem, 1.7cqi, 0.72rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.corner.is-current .season-name {
  color: var(--accent);
  font-weight: 700;
}

.side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0;
  min-height: 100%;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.hero { margin: 0.1rem 0 0.4rem; }

.hero img,
.badge {
  border-radius: 50%;
  object-fit: cover;
  background: #fffdf8;
  display: block;
}

.hero img {
  width: clamp(92px, 24cqi, 248px);
  height: clamp(92px, 24cqi, 248px);
  border: 4px solid #f7f1e6;
  box-shadow:
    0 0 0 2px var(--stitch),
    0 0 0 6px #f3eee3,
    0 0 0 7px var(--stitch-light);
}

.badge {
  width: clamp(40px, 11cqi, 124px);
  height: clamp(40px, 11cqi, 124px);
  border: 2px solid #eadcc4;
  box-shadow: 0 0 0 1px #a78455;
}

.bottom-months {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  align-self: center;
  gap: 0.3rem;
  width: 100%;
}

.month-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  table-layout: fixed;
  font-family: "Segoe UI", "Liberation Sans", "Nimbus Sans", sans-serif;
}

.month-table th,
.month-table td {
  text-align: center;
  vertical-align: middle;
}

.month-table th {
  padding: 0.12rem 0 0.2rem;
  font-size: clamp(0.62rem, 2.15cqi, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #6a5038;
}

.month-table td {
  height: clamp(1.35rem, 4.6cqi, 3.1rem);
  font-size: clamp(0.72rem, 2.3cqi, 1.2rem);
  background: var(--tile);
  border: 1px solid var(--tile-line);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 245, 0.75);
}

.month-table td.past { color: #6f5b48; }

.month-table td.empty {
  background: rgba(247, 241, 228, 0.55);
  border-color: #e6d6ba;
  box-shadow: none;
}

.month-table td.today {
  background: var(--accent);
  color: #fffaf4;
  font-weight: 800;
  border-color: #6e2c16;
  box-shadow: inset 0 0 0 2px #f3e0c4;
}

.day-card,
.sheet {
  width: 100%;
  margin: 1.15rem auto 0;
  background:
    linear-gradient(rgba(125, 91, 60, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 91, 60, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 8px 8px, 8px 8px, auto;
  color: var(--ink);
  border: 10px solid var(--frame);
  padding: 1.2rem 1.2rem 1.35rem;
  box-shadow: 0 14px 32px rgba(20, 10, 4, 0.28);
}

.kicker {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.day-card h2,
.sheet h1 {
  margin: 0.2rem 0 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.day-card h2 { font-size: clamp(1.7rem, 4vw, 2.25rem); }

.sheet {
  width: min(100%, 40rem);
}

.sheet h1 { font-size: clamp(1.7rem, 4vw, 2.1rem); }

.day-card p,
.sheet p,
.sheet li {
  font-size: 1.125rem;
  line-height: 1.55;
}

.day-card > p,
.daily-notes p { margin: 0 0 1rem; }

.notes,
.sheet .notes,
.day-index,
.sheet .day-index {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
}

.notes li + li,
.sheet .notes li + li {
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--tile-line);
}

.notes p { margin: 0; }

.day-index,
.sheet .day-index {
  margin-bottom: 0.4rem;
}

.day-index li,
.sheet .day-index li {
  margin: 0 0 0.9rem;
}

.day-index a { font-weight: 700; }

.teaser {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.45;
}

.shops h2,
.shops h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.shops ul {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
}

.shops li + li { margin-top: 0.28rem; }

.shops a,
.daily-notes a,
.sheet a,
.disclosure a {
  color: var(--link);
  text-underline-offset: 0.14em;
}

.shops a:hover,
.daily-notes a:hover,
.sheet a:hover,
.disclosure a:hover { color: #5c2410; }

.disclosure {
  margin: 0;
  padding: 0.75rem 0.85rem;
  background: var(--paper-deep);
  border: 1px solid var(--tile-line);
  font-size: 1rem;
  line-height: 1.45;
}

.sheet h2 {
  font-size: 1.25rem;
  margin: 1.4rem 0 0.4rem;
}

.sheet .shops h2 {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.sheet ul { padding-left: 1.2rem; }

.sheet li + li { margin-top: 0.35rem; }

.site-footer {
  text-align: center;
  padding: 0.3rem 1rem 2rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.1rem;
}

.site-footer a {
  color: var(--cream);
  font-size: 1rem;
}

.site-footer a:hover { text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 2px solid #f0d7a2;
  outline-offset: 3px;
}

.day-card a:focus-visible,
.sheet a:focus-visible {
  outline-color: var(--accent);
}

@media (min-width: 800px) {
  .site-header { padding-top: 1.6rem; }
  .wrap {
    width: min(100% - 3rem, 72rem);
    padding: 0.8rem 0 2rem;
  }
  .frame { padding: 16px; }
  .stitch { padding: 0.95rem 0.7rem 0.75rem; }
  .day-card,
  .sheet { padding: 1.45rem 1.7rem 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  body { background: #fff; color: #000; }
  .frame, .day-card, .sheet { box-shadow: none; }
  .site-footer a, .wordmark a { color: #000; }
}
