/* Self-hosted fonts (latin + latin-ext), copied from the invite site so the page never depends on Google being reachable.
   EB Garamond is a variable font: one file serves the 400-700 range. */
@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/eb-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/eb-garamond-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/eb-garamond-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/eb-garamond-italic-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-600-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/playfair-display-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/playfair-display-700-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Playfair Display"; font-style: italic; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/playfair-display-700-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display"; font-style: italic; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/playfair-display-700-italic-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --surface: #fbf9f4;
  --ink: #3a3a34;
  --muted: #8a8478;
  --line: #d8d1c2;
  --accent: #2f5d3a;       /* the green of the mandarin-collar shirt, in place of the invite's plum */
  --accent-soft: #e6ede4;
  --warn: #a14d1c;
  --g: #2e9e4a;            /* Gerhard: the dots only, brighter than the accent so the two read apart at a glance */
  --j: #c8409a;            /* Joy: a lit-up plum for the same reason */
  --shadow: rgba(0, 0, 0, .12);
  --backdrop: rgba(58, 58, 52, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1b1c19; --surface: #24261f; --ink: #e6e3da; --muted: #9a968b; --line: #3a3c34;
    --accent: #8fc79c; --accent-soft: #24352a; --warn: #e79a6a; --g: #5fe07f; --j: #ff7fd4;
    --shadow: rgba(0, 0, 0, .5); --backdrop: rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1b1c19; --surface: #24261f; --ink: #e6e3da; --muted: #9a968b; --line: #3a3c34;
  --accent: #8fc79c; --accent-soft: #24352a; --warn: #e79a6a; --g: #5fe07f; --j: #ff7fd4;
  --shadow: rgba(0, 0, 0, .5); --backdrop: rgba(0, 0, 0, .55);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: "EB Garamond", Georgia, serif; font-size: 17px; line-height: 1.55; }
.wrap { max-width: 60rem; margin: 0 auto; padding: 2.5rem 1rem 4rem; }

.wrap { position: relative; }
.theme-toggle { position: absolute; top: 1rem; right: 1rem; background: none; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .8rem; color: var(--muted); cursor: pointer; font-size: .85rem; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.masthead { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem; align-items: center; margin-bottom: 1.6rem; }
@media (max-width: 48rem) { .masthead { grid-template-columns: 1fr; text-align: center; } .masthead .lede { margin-left: auto; margin-right: auto; } .hero { justify-content: center; } }
.hero { display: flex; align-items: center; gap: 1.2rem; color: var(--ink); text-decoration: none; }
.hero:hover .hero-desc { text-decoration: underline; }
.hero[hidden] { display: none; }
.hero-emblem { width: 7rem; height: 7rem; color: var(--accent); flex: 0 0 auto; }
.hero-emblem svg { width: 100%; height: 100%; stroke-width: 2.2; }
.hero-text { display: flex; flex-direction: column; line-height: 1.25; }
.hero-temp { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 3.4rem; line-height: 1; }
.hero-desc { font-size: 1rem; }
.hero-range { font-size: .9rem; color: var(--muted); }
.kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .24em; color: var(--muted); margin: 0 0 .6rem; }
h1 { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.1; margin: 0; }
h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 1.6rem; margin: 0; line-height: 1.2; }
.lede { color: var(--muted); font-size: 1.05rem; line-height: 1.6; max-width: 34rem; margin: .8rem 0 0; }

/* Forecast line above the strip */
.weather-bar { display: flex; align-items: center; gap: .8rem; font-size: .9rem; color: var(--muted); margin-top: .9rem; }
@media (max-width: 48rem) { .weather-bar { justify-content: center; } }
button { font: inherit; }
.weather-bar button { background: none; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .8rem; color: var(--accent); cursor: pointer; font-size: .85rem; }
.weather-bar button:hover { border-color: var(--accent); }

/* The strip: six tiles, scrolls sideways on a phone, all visible on a laptop */
.cal-scroll { overflow-x: auto; margin: 0 -1rem; padding: 0 1rem .6rem; scroll-padding: 0 1rem; }
.cal-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 62rem) { .cal-grid { min-width: 0; grid-template-columns: repeat(6, 11rem); } }
.cal-day { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: .6rem .6rem .7rem; min-height: 12rem; display: flex; flex-direction: column; gap: .3rem; cursor: pointer; transition: border-color .15s; }
.cal-day:hover, .cal-day:focus-visible { border-color: var(--accent); outline: none; }
.cal-day .dow { font-size: .7rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.cal-day .num { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 1.5rem; line-height: 1; margin-top: -.1rem; }
.cal-day.weekend { background: transparent; }
.cal-day.past { opacity: .55; }
.cal-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day.today .num::after { content: " today"; font-family: "EB Garamond", Georgia, serif; font-size: .65rem; color: var(--accent); letter-spacing: .12em; text-transform: uppercase; font-weight: 400; }
.cal-day.wedding { background: var(--accent-soft); border-color: var(--accent); }
.cal-day.has-notes .num::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: .35rem; vertical-align: .3em; }
.wx { display: flex; flex-direction: column; font-size: .78rem; color: var(--muted); line-height: 1.3; min-height: 1.2rem; margin-bottom: .2rem; }
.wx:empty { display: none; }
.wx .wx-desc { color: var(--ink); }
.wx .wx-icon { width: 1.9rem; height: 1.9rem; color: var(--accent); margin-bottom: .1rem; }
.wx .wx-icon svg { width: 100%; height: 100%; }
.ev-wx { display: inline-flex; align-items: center; gap: .3rem; margin-left: .5rem; font-size: .85rem; color: var(--muted); white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; }
.ev-wx svg { width: 1.3rem; height: 1.3rem; color: var(--accent); }
.ev-wx .ev-rain { font-size: .78rem; }
.ev { font-size: .82rem; line-height: 1.3; padding: .15rem 0 .15rem .5rem; border-left: 2px solid var(--muted); color: var(--muted); }
.ev.fixed { border-color: var(--ink); color: var(--ink); }
.ev.todo { border-color: var(--accent); }
.ev.hard { border-color: var(--warn); color: var(--warn); }
.ev.tbc { border-left-style: dashed; }
.ev .t { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; margin-right: .25rem; }
.ev .who { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .3rem; vertical-align: .05em; }
.ev .who.g { background: var(--g); } .ev .who.j { background: var(--j); }
.earlier { font-size: .9rem; color: var(--muted); margin: .6rem 0 0; }
.earlier a, .pane a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }

/* Notes box */
.scratch { margin-top: 2.6rem; border-top: 1px solid var(--line); padding-top: 1.6rem; max-width: 40rem; }
.scratch .hint { color: var(--muted); font-size: .95rem; margin: .3rem 0 .8rem; }
.scratch textarea { width: 100%; font: inherit; font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: .7rem .8rem; resize: vertical; }
.scratch textarea:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.save-row { display: flex; align-items: center; gap: .9rem; margin-top: .6rem; }
.save-btn { background: var(--accent); color: var(--paper); border: 1px solid var(--accent); border-radius: 999px; padding: .35rem 1.3rem; cursor: pointer; font-size: .95rem; }
.save-btn:hover { filter: brightness(1.1); }
.save-status { font-size: .85rem; color: var(--muted); }

/* Day pane */
.backdrop { position: fixed; inset: 0; background: var(--backdrop); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 10; }
.pane { position: fixed; top: 0; right: 0; bottom: 0; width: min(34rem, 100%); background: var(--paper); border-left: 1px solid var(--line); box-shadow: -12px 0 40px var(--shadow); transform: translateX(100%); transition: transform .25s ease; z-index: 11; overflow-y: auto; padding: 1.4rem 1.5rem 2.5rem; }
body.pane-open .backdrop { opacity: 1; pointer-events: auto; }
body.pane-open .pane { transform: none; }
@media (prefers-reduced-motion: reduce) { .pane, .backdrop { transition: none; } }
.pane-close { position: absolute; top: 1rem; right: 1.2rem; background: none; border: 1px solid var(--line); border-radius: 999px; width: 2.2rem; height: 2.2rem; color: var(--muted); cursor: pointer; line-height: 1; font-size: 1.2rem; }
.pane-close:hover { border-color: var(--ink); color: var(--ink); }
.pane h2 { font-size: 1.9rem; margin-bottom: .8rem; }
.pane-items { display: grid; gap: .35rem; margin-bottom: 1.2rem; }
.pane-items .ev { font-size: .95rem; padding: .3rem 0 .3rem .6rem; }
.pane-notes h4 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 1.2rem; margin: 1rem 0 .3rem; }
.pane-notes h4:first-child { margin-top: 0; }
.pane-notes ul, .pane-notes ol { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.pane-notes li { margin: .35rem 0; }
.pane-notes p { color: var(--muted); margin: .3rem 0; }
.empty { color: var(--muted); font-style: italic; }
