:root { --paper:#f7eddc; --card:#fffaf0; --ink:#2b3170; --soft:#6b6f9c; --pink:#ee8f96; --peach:#f9c9a0; --teal:#5fb7b9; --gold:#e9b93a; --shadow:43,49,112; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Fraunces', Georgia, serif; font-size: 18px; line-height: 1.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E"); }
main { max-width: 1040px; margin: 0 auto; padding: 34px 18px 100px; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
h1 { font-style: italic; font-weight: 400; font-size: clamp(48px, 10vw, 100px); line-height: .95; margin: 0; letter-spacing: -.02em; }
h1 span { color: var(--pink); }
.sub, .hand { font-family: 'Caveat', cursive; color: var(--soft); }
.sub { font-size: 30px; margin: 6px 0 24px; }
h2 { font-style: italic; font-weight: 400; font-size: 36px; margin: 70px 0 2px; }
.hand { font-size: 24px; margin: 0 0 22px; }
.sheet { background: var(--card); padding: 12px; box-shadow: 0 1px 2px rgba(var(--shadow),.18), 0 14px 30px -12px rgba(var(--shadow),.35); }

.hero { position: relative; overflow: hidden; }
.hero img { width: 100%; }
.petal { position: absolute; top: -4%; width: 10px; height: 7px; border-radius: 80% 10% 80% 10%; opacity: .9; animation: fall linear infinite; pointer-events: none; }
@keyframes fall { to { transform: translate(-34vw, 700px) rotate(540deg); } }

/* map and the day beside it */
.atlas { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 34px; align-items: center; }
.map { position: relative; }
.map img { width: 100%; }
.pin { position: absolute; transform: translate(-15px, -92%); background: none; border: 0; padding: 0; cursor: pointer; font-family: 'Caveat', cursive; font-weight: 700; font-size: 23px; color: var(--ink); display: flex; align-items: center; gap: 2px; white-space: nowrap; text-shadow: 0 0 6px var(--card), 0 0 3px var(--card), 0 0 2px var(--card); }
.pin svg { width: 30px; height: 38px; flex: none; transition: transform .3s cubic-bezier(.3,1.6,.5,1); transform-origin: 50% 92%; filter: drop-shadow(0 3px 2px rgba(var(--shadow),.35)); }
.pin.left { flex-direction: row-reverse; transform: translate(calc(-100% + 15px), -92%); }
.pin:hover svg, .pin:focus-visible svg { transform: scale(1.2) rotate(-6deg); }
.pin.on svg { transform: scale(1.45) rotate(-6deg); }
.pin.on svg path:first-child { fill: var(--gold); }
.pin.on { z-index: 2; }

.preview { min-height: 200px; }
.polaroid { position: relative; margin: 0; padding: 14px 14px 12px; background: var(--card); box-shadow: 0 1px 2px rgba(var(--shadow),.18), 0 16px 30px -14px rgba(var(--shadow),.4); cursor: pointer; transition: transform .3s; }
.polaroid::before { content: ''; position: absolute; top: -13px; left: 50%; width: 96px; height: 26px; margin-left: -48px; background: rgba(238,143,150,.55); transform: rotate(-2deg); }
.polaroid img { width: 100%; background: #e9dcc6; }
.polaroid figcaption { font-family: 'Caveat', cursive; font-size: 27px; line-height: 1.15; padding-top: 10px; }
.polaroid small { display: block; font-family: 'Fraunces', serif; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); margin-top: 4px; }
.polaroid em { display: block; font-family: 'Caveat', cursive; font-style: normal; font-size: 19px; color: var(--pink); margin-top: 2px; }
.preview .polaroid { transform: rotate(1.6deg); animation: settle .5s cubic-bezier(.3,1.4,.5,1); }
.preview .polaroid img { max-height: 380px; object-fit: cover; }
@keyframes settle { from { opacity: 0; transform: rotate(-3deg) translateY(14px); } }
img.unpainted { filter: saturate(1.25) contrast(.95) sepia(.18); }

/* gallery */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 46px 40px; align-items: start; }
.cards .polaroid:nth-child(odd) { transform: rotate(-1.4deg); } .cards .polaroid:nth-child(even) { transform: rotate(1.1deg); }
.cards .polaroid:hover { transform: rotate(0) scale(1.015); }
.count { position: absolute; right: 22px; top: 22px; background: var(--card); font-size: 12px; letter-spacing: .08em; padding: 2px 8px; border-radius: 20px; }

.notes { display: flex; flex-wrap: wrap; gap: 22px; }
.note { font-family: 'Caveat', cursive; font-size: 26px; line-height: 1.2; padding: 18px 20px 22px; max-width: 300px; background: var(--card); box-shadow: 0 10px 20px -12px rgba(var(--shadow),.45); transform: rotate(-1.5deg); }
.note.you { background: #e4f1ee; transform: rotate(1.8deg); margin-top: 26px; }
.note b { display: block; font-family: 'Fraunces', serif; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); margin-bottom: 6px; }
.note.you b { color: var(--teal); }
.notes:has(.exchange) { gap: 40px 48px; align-items: flex-start; }
.exchange { margin: 0; display: flex; flex-direction: column; gap: 10px; width: min(100%, 300px); }
.exchange figcaption { font-family: 'Fraunces', serif; font-style: italic; font-size: 19px; line-height: 1.2; }
.exchange figcaption small { display: block; font-style: normal; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); margin-top: 2px; }
.exchange .note { margin-top: 0; max-width: 88%; font-size: 23px; padding: 12px 16px 15px; }
.exchange .note.her { align-self: flex-start; }
.exchange .note.you { align-self: flex-end; }

/* one event, opened */
dialog { border: 0; padding: 22px 22px 14px; width: min(96vw, 920px); max-height: 94vh; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(var(--shadow),.7); overflow: auto; }
dialog::backdrop { background: rgba(43,49,112,.55); backdrop-filter: blur(3px); }
dialog[open] { animation: settle .35s ease; }
/* the close button has a row to itself above the picture, and stays in the corner while the event scrolls under it */
.close { position: sticky; display: block; top: 0; z-index: 3; margin: -8px -8px 22px auto; border: 0; background: var(--paper); width: 38px; height: 38px; border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px -2px rgba(var(--shadow),.45); }
.ev-head { text-align: center; margin-bottom: 8px; }
.ev-head img { width: 100%; margin-bottom: 12px; }
/* The opened event is a page of the album rather than a white box: its painting runs to the top and side edges and melts into
   the page, the page is washed in its season's colour (fading to paper further down, and scrolling with it), the title sits on
   the foot of the painting, and the close button is a small one in the corner, over the painting, that stays put while scrolling. */
#event { padding: 0 26px 18px; --wash: 247,237,220; background: linear-gradient(rgba(var(--wash),.95), rgba(var(--wash),.6) 520px, rgba(var(--wash),0) 1100px) local, var(--card); }
#event[data-kind="winter"] { --wash: 222,229,247; } #event[data-kind="spring"] { --wash: 250,224,230; } #event[data-kind="summer"] { --wash: 204,230,208; } #event[data-kind="fall"] { --wash: 247,225,180; }
#event .close { top: 10px; margin: 10px -14px -42px auto; width: 32px; height: 32px; font-size: 20px; background: rgba(255,250,240,.92); color: var(--ink); }
#event .close:hover, #event .close:focus-visible { background: #fff; outline: 0; transform: scale(1.08); }
#event .ev-head { padding-top: 46px; }
#event .ev-head:has(> img.art) { padding-top: 0; }
#event .ev-head > img.art { display: block; width: calc(100% + 52px); max-width: none; margin: 0 -26px -30px;
  -webkit-mask-image: linear-gradient(#000 72%, transparent 99%); mask-image: linear-gradient(#000 72%, transparent 99%); }
#event .ev-head h3 { position: relative; text-shadow: 0 0 14px rgba(var(--wash),1), 0 0 4px rgba(var(--wash),1); }
/* handmade touches: a stitched line down the left edge of the page, each day's name on a paper label, washi tape across the top of
   the main stop's photos, and a few of the season's bits (snow, petals, fireflies, leaves) lying still round the title */
#event { --tape: #f1dcb4; --bit: #e9c98a; }
#event[data-kind="winter"] { --tape: #c9d4f2; --bit: #ffffff; } #event[data-kind="spring"] { --tape: #f6c3cf; --bit: #f29bb0; } #event[data-kind="summer"] { --tape: #bfe0c4; --bit: #f0cf5a; } #event[data-kind="fall"] { --tape: #f3cf8d; --bit: #e08a3c; }
#eventBody { position: relative; }
#eventBody::before { content: ''; position: absolute; left: -13px; top: 0; bottom: 0; border-left: 2px dashed rgba(var(--shadow),.22); pointer-events: none; }
#event .ev-head > img.art { position: relative; z-index: 1; }
#event .ev-head { background:
  radial-gradient(ellipse 7px 4px at 9% calc(100% - 74px), var(--bit) 96%, transparent), radial-gradient(ellipse 5px 3px at 17% calc(100% - 30px), var(--bit) 96%, transparent),
  radial-gradient(ellipse 4px 6px at 26% calc(100% - 92px), var(--bit) 96%, transparent), radial-gradient(ellipse 6px 3.500px at 78% calc(100% - 84px), var(--bit) 96%, transparent),
  radial-gradient(ellipse 4px 5px at 86% calc(100% - 34px), var(--bit) 96%, transparent), radial-gradient(ellipse 7px 4px at 93% calc(100% - 66px), var(--bit) 96%, transparent); }
#event .day { display: table; margin: 38px 0 0 -4px; padding: 5px 20px 7px 16px; border-top: 0; background: #fffdf8; rotate: -1deg; box-shadow: inset 5px 0 0 var(--tape), 0 5px 10px -6px rgba(var(--shadow),.5); }
#event .stop.main .shot { position: relative; }
#event .stop.main .shot::before { content: ''; position: absolute; left: 50%; top: -11px; width: 84px; height: 22px; margin-left: -42px; rotate: -3deg; background: var(--tape); opacity: .86;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3px, #000 calc(100% - 3px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 3px, #000 calc(100% - 3px), transparent 100%); box-shadow: 0 1px 2px rgba(var(--shadow),.2); }
#event .stop.main .shots > :nth-child(even)::before { rotate: 4deg; margin-left: -30px; }
@media (max-width: 760px) { #eventBody::before { left: -7px; } }
@media (max-width: 760px) { #event { padding: 0 14px 14px; } #event .ev-head > img.art { width: calc(100% + 28px); margin: 0 -14px -20px; } #event .close { margin-right: -6px; } }
.ev-head h3 { font-style: italic; font-weight: 400; font-size: clamp(30px, 5vw, 46px); line-height: 1.05; margin: 0; }
.ev-head small, .stop h5 i { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); font-style: normal; }
.margin { font-family: 'Caveat', cursive; font-size: 25px; line-height: 1.2; color: var(--ink); margin: 10px auto 0; max-width: 34em; }
.day i { font-family: 'Caveat', cursive; font-style: normal; font-weight: 700; font-size: 1.15em; color: var(--pink); margin-left: .4em; }
.day { font-style: italic; font-weight: 400; font-size: 26px; margin: 34px 0 0; padding-top: 14px; border-top: 2px dashed rgba(var(--shadow),.25); }
.stop { margin-top: 22px; }
.stop h5 { font-family: 'Caveat', cursive; font-size: 30px; font-weight: 700; margin: 0 0 8px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stop.main h5::before { content: '♥'; color: var(--pink); font-size: 20px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; align-items: start; }
.stop.main .shots { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.shot { margin: 0; padding: 7px 7px 9px; background: #fff; box-shadow: 0 6px 16px -8px rgba(var(--shadow),.55); cursor: zoom-in; transition: transform .25s; }
.shots > :nth-child(odd) { transform: rotate(-.8deg); } .shots > :nth-child(even) { transform: rotate(.7deg); }
.shots > :hover { transform: scale(1.02); }
.shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.shot figcaption { font-family: 'Caveat', cursive; font-size: 20px; line-height: 1.1; padding-top: 5px; text-align: center; }
.pair { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; background: none; }
.pair .shot { box-shadow: 0 6px 16px -8px rgba(var(--shadow),.55); } .pair .shot + .shot { margin-left: -6px; transform: rotate(1.5deg); }
.pager { display: flex; justify-content: space-between; margin-top: 22px; font-family: 'Caveat', cursive; font-size: 22px; }
.pager button { border: 0; background: none; cursor: pointer; padding: 4px 6px; } .pager button:disabled { opacity: .25; cursor: default; }
/* no focus ring round the enlarged photo (Firefox draws one on the dialog itself), and the photo sits in the middle of it */
#photo { padding: 0; width: auto; max-width: 96vw; background: none; box-shadow: none; overflow: visible; cursor: zoom-out; outline: none; }
#photo[open] { display: flex; justify-content: center; }
#photo figure { position: relative; margin: 0; padding: 8px; background: #fff; }
#photo img { display: block; max-width: calc(96vw - 16px); max-height: calc(92vh - 16px); }
#photo figcaption { display: none; }
/* a loose photo, enlarged: a print taken off the cork board, still on its pin and a little crooked, with what it was written underneath in
   the same hand as on the board, and the whole date */
#photo figure.told { padding: 18px 18px 16px; rotate: -1.3deg; border-radius: 2px; box-shadow: 0 1px 2px rgba(var(--shadow),.3), 0 34px 60px -26px rgba(20,23,58,.9); }
#photo figure.told::before { content: ''; position: absolute; left: 50%; top: -11px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--pink) 30%, #c45f6a 100%); box-shadow: 0 5px 7px -2px rgba(60,35,15,.55); }
#photo figure.told::after { content: ''; position: absolute; right: -16px; bottom: 54px; width: 74px; height: 24px; rotate: -38deg; background: rgba(126,163,216,.55); }
#photo figure.told img { max-width: min(88vw, 940px); max-height: 70vh; }
#photo figure.told figcaption { display: block; width: 0; min-width: 100%; padding: 14px 8px 0; text-align: center; font: 700 clamp(24px, 3.4vw, 36px)/1.1 'Caveat', cursive; color: var(--ink); }
#photo figure.told small { display: block; margin-top: 9px; padding-top: 8px; border-top: 2px dashed rgba(var(--shadow), .18); font: 400 12px/1 'Fraunces', serif; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }

/* seasons and the places panel */
.polaroid img { aspect-ratio: 4 / 3; object-fit: cover; } .polaroid img.art { aspect-ratio: 2 / 1; }
.pin b { font-family: 'Fraunces', serif; font-size: 12px; background: var(--ink); color: var(--card); border-radius: 20px; padding: 1px 7px; margin-left: 5px; text-shadow: none; vertical-align: middle; }
.visits h3 { font-style: italic; font-weight: 400; font-size: 32px; margin: 0; line-height: 1.1; }
.visit { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: var(--card); padding: 7px; margin-bottom: 10px; cursor: pointer; box-shadow: 0 6px 14px -9px rgba(var(--shadow),.6); font-family: 'Caveat', cursive; font-size: 23px; line-height: 1.05; color: var(--ink); transition: transform .25s; }
.visit:hover { transform: translateX(4px) rotate(-.5deg); }
.visit img { width: 84px; height: 62px; object-fit: cover; flex: none; }
.visit small { display: block; font-family: 'Fraunces', serif; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); margin-top: 3px; }
.atlas { align-items: start; }

@media (max-width: 760px) {
  .atlas { grid-template-columns: 1fr; gap: 26px; }
  .pin { font-size: 18px; } .pin svg { width: 24px; height: 30px; }
  .pair { grid-column: span 1; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* the two-level map */
.map img.turn { animation: turn .6s ease; }
@keyframes turn { from { opacity: 0; transform: scale(1.03); } }
.mapbar { display: flex; align-items: center; gap: 14px; min-height: 40px; padding-top: 10px; font-family: 'Caveat', cursive; font-size: 24px; }
.mapbar button { border: 0; background: none; cursor: pointer; color: var(--pink); padding: 0; font-weight: 700; }
.mapbar [hidden] { display: none; }
.maplabel { position: absolute; transform: translate(-50%, -50%) rotate(-4deg); font-family: 'Caveat', cursive; font-size: 19px; color: rgba(43,49,112,.5); white-space: nowrap; pointer-events: none; }
.pin.city { font-size: 27px; line-height: .9; } .pin.city svg { width: 38px; height: 48px; }
.pin.city small { display: block; font-family: 'Fraunces', serif; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); font-weight: 400; }
.pin.city.left { text-align: right; transform: translate(calc(-100% + 19px), -92%); } .pin.city { transform: translate(-19px, -92%); }
.postcard { position: absolute; left: 4%; top: 5%; width: 27%; padding: 6px 6px 4px; border: 0; background: var(--card); cursor: pointer; transform: rotate(-4deg); box-shadow: 0 8px 18px -8px rgba(var(--shadow),.6); font-family: 'Caveat', cursive; font-weight: 700; font-size: 22px; line-height: 1; color: var(--ink); text-align: left; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.postcard:hover { transform: rotate(-1deg) scale(1.06); }
.postcard span { display: block; padding-top: 5px; } .postcard small { display: block; font-family: 'Fraunces', serif; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); font-weight: 400; margin-top: 2px; }
header { position: relative; }
.more a { color: var(--pink); text-decoration: none; }
.more a:hover { text-decoration: underline; }
.more { text-align: center; margin: 60px 0 0; font-size: 28px; font-weight: 700; }
@media (max-width: 760px) { .maplabel { font-size: 14px; } .pin.city { font-size: 20px; } .pin.city svg { width: 28px; height: 36px; } .postcard { font-size: 16px; } }

/* milestones, in among the events */
.milestone { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; text-align: center; }
.milestone::before, .milestone::after { content: ''; flex: 1; border-top: 2px dashed rgba(var(--shadow),.3); }
.milestone b { display: block; font-family: 'Caveat', cursive; font-size: 34px; line-height: 1.1; }
.milestone b::before { content: '♥ '; color: var(--pink); }
.milestone small { display: block; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); margin-top: 2px; }
.milestone em { display: block; font-family: 'Caveat', cursive; font-style: normal; font-size: 21px; color: var(--soft); max-width: 420px; }
.milestone a { font-family: 'Caveat', cursive; font-size: 21px; color: var(--pink); }
.leg { font-family: 'Caveat', cursive; font-size: 40px; font-weight: 700; color: var(--pink); margin: 44px 0 -14px; text-align: center; }
.leg::before, .leg::after { content: ' ~ '; color: var(--gold); }


/* a text or two from around the day, inside an event */
.ev-said { display: flex; justify-content: center; margin: 22px 0 4px; }
.ev-said .exchange { width: min(100%, 360px); }
.ev-said .exchange figcaption { text-align: center; font-size: 13px; font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }

/* index.html?label: where an event photo belongs (js/app.js) */
.sorter { display: flex; gap: 3px; justify-content: center; margin-top: 6px; font: 12px/1 system-ui, sans-serif; }
.sorter button { padding: 4px 8px; border: 1px solid rgba(var(--shadow),.3); border-radius: 99px; background: #fffdf8; color: var(--ink); cursor: pointer; }
.sorter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sorter.busy { opacity: .4; pointer-events: none; }
.shot.eaten img { filter: grayscale(.7) opacity(.45); }
.shot.eaten::after { content: 'on the food page'; display: block; font: 12px system-ui, sans-serif; color: var(--soft); text-align: center; margin-top: 4px; }

/* the bar on the editing pages (js/edit.js) */
.editbar { position: fixed; z-index: 60; top: 10px; right: 10px; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 99px;
  background: rgba(255,250,240,.94); box-shadow: 0 2px 10px -3px rgba(var(--shadow),.45); font: 13px/1 system-ui, sans-serif; }
.editbar b { padding: 0 8px; font-weight: 600; color: var(--soft); }
.editbar a { padding: 6px 10px; border-radius: 99px; color: var(--ink); text-decoration: none; }
.editbar a:hover { background: #f1e6d6; }
.editbar a[aria-current="page"] { background: var(--ink); color: #fff; }
.editbar a.plain { color: var(--soft); border-left: 1px solid rgba(var(--shadow),.2); border-radius: 0 99px 99px 0; }
@media (max-width: 600px) { .editbar { top: auto; bottom: 10px; right: 50%; transform: translateX(50%); } .editbar b { display: none; } }
/* a meal inside an event, on index.html?label: open it in the meals editor */
.meal .relabel { display: block; margin-top: 3px; font: 12px system-ui, sans-serif; color: var(--soft); }
