.memory-page { background: #f5eee8; }
.memory-topbar { position: absolute; z-index: 800; }
.memory-topbar .desktop-nav .is-active { opacity: 1; }
.map-stage { position: relative; min-height: max(680px, 78svh); overflow: hidden; color: white; background: #3c3432; }
.memory-map { position: absolute; inset: 0; z-index: 0; background: #d8d1c8; }
.map-stage .leaflet-container { font-family: var(--sans); }
.map-stage .leaflet-tile-pane { filter: sepia(.18) saturate(.55) contrast(.92); }
.map-stage .leaflet-control-zoom { margin-top: 110px; margin-left: 22px; border: 0; box-shadow: 0 12px 35px rgba(46,32,33,.18); }
.map-stage .leaflet-control-zoom a { color: #5b3b43; background: rgba(255,250,246,.92); }
.map-stage .leaflet-control-attribution { color: rgba(51,39,42,.58); background: rgba(255,250,246,.76); font-size: 8px; }
.map-shade { position: absolute; inset: 0; z-index: 400; pointer-events: none; background: linear-gradient(90deg, rgba(33,24,26,.87) 0%, rgba(42,31,34,.6) 34%, transparent 63%), linear-gradient(0deg, rgba(26,19,20,.5), transparent 35%); }
.map-intro { position: absolute; top: 50%; left: max(38px, calc((100vw - 1420px) / 2)); z-index: 500; width: min(590px, 46vw); transform: translateY(-39%); pointer-events: none; }
.map-intro h1 { margin: 0; font-family: var(--serif); font-size: clamp(58px, 6.7vw, 105px); font-weight: 400; letter-spacing: -.06em; line-height: .79; }
.map-intro h1 em { color: #efc7ce; font-size: .73em; font-weight: 400; }
.map-intro > p:last-child { max-width: 430px; margin: 26px 0 0; color: rgba(255,255,255,.66); font-family: var(--serif); font-size: 19px; line-height: 1.5; }
.map-summary { position: absolute; right: max(30px, calc((100vw - 1420px) / 2)); bottom: 38px; z-index: 600; display: flex; align-items: stretch; border: 1px solid rgba(255,255,255,.38); background: rgba(45,34,36,.72); box-shadow: 0 18px 50px rgba(20,12,14,.2); backdrop-filter: blur(16px); }
.map-summary > div { display: grid; min-width: 105px; align-content: center; padding: 18px 20px; border-right: 1px solid rgba(255,255,255,.15); }
.map-summary b { font-family: var(--serif); font-size: 27px; font-weight: 500; line-height: 1; }
.map-summary span { margin-top: 5px; font-size: 8px; letter-spacing: .08em; opacity: .55; text-transform: uppercase; }
.map-summary button { display: inline-flex; cursor: pointer; align-items: center; gap: 10px; border: 0; padding: 0 21px; color: #4e2f38; background: #f0d6dc; font-size: 10px; font-weight: 700; }
.map-summary button span { margin: 0; color: #ad5870; font-size: 18px; }
.map-note { position: absolute; right: max(30px, calc((100vw - 1420px) / 2)); bottom: 115px; z-index: 500; display: flex; max-width: 350px; align-items: center; gap: 9px; color: rgba(255,255,255,.66); font-size: 9px; line-height: 1.4; }
.map-note span { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; font-family: var(--serif); font-size: 12px; }
.map-load-notice { position: absolute; top: 105px; right: max(30px, calc((100vw - 1420px) / 2)); z-index: 700; display: flex; align-items: center; gap: 11px; border: 1px solid rgba(255,255,255,.28); padding: 9px 10px 9px 14px; color: #fff8f3; background: rgba(57,40,44,.86); box-shadow: 0 15px 38px rgba(25,14,17,.2); font-size: 9px; backdrop-filter: blur(12px); }
.map-load-notice[hidden] { display: none; }
.map-load-notice button { cursor: pointer; border: 1px solid rgba(255,255,255,.25); padding: 6px 9px; color: white; background: rgba(255,255,255,.08); font-size: 9px; font-weight: 700; }

.memory-pin { position: relative; width: 68px; height: 74px; border: 5px solid #fff8f3; border-radius: 4px; background: #fff8f3; box-shadow: 0 14px 32px rgba(61,38,43,.38); transform: translate(-25px,-45px) rotate(-3deg); transition: transform .2s ease; }
.memory-pin::after { position: absolute; bottom: -16px; left: 50%; border: 8px solid transparent; border-top-color: #fff8f3; content: ""; transform: translateX(-50%); }
.memory-pin img { width: 100%; height: 58px; object-fit: cover; }
.memory-pin span { position: absolute; right: -9px; top: -9px; display: grid; min-width: 23px; height: 23px; place-items: center; border: 2px solid #fff8f3; border-radius: 99px; color: white; background: #9b4d62; font-family: var(--sans); font-size: 8px; font-weight: 700; }
.leaflet-marker-icon:hover .memory-pin { transform: translate(-25px,-49px) rotate(0) scale(1.06); }
.memory-editor-icon { border: 0; background: transparent; }
.memory-editor-icon > span { display: grid; width: 40px; height: 40px; place-items: center; border: 4px solid #fff8f3; border-radius: 50% 50% 50% 8px; color: #fff3f5; background: #783648; box-shadow: 0 9px 22px rgba(56,27,34,.28); transform: rotate(-45deg); }
.memory-editor-icon b { font-size: 15px; font-weight: 400; transform: rotate(45deg); }

.album-section { width: min(1320px, calc(100% - 54px)); margin: auto; padding: 118px 0 135px; }
.album-heading { display: grid; grid-template-columns: 1fr 390px; align-items: end; gap: 80px; }
.album-heading .eyebrow { color: #8f4b5e; }
.album-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(54px, 6.8vw, 94px); font-weight: 400; letter-spacing: -.058em; line-height: .8; }
.album-heading h2 em { color: var(--rose); font-weight: 400; }
.album-heading-copy p { margin: 0; color: var(--muted); font-family: var(--serif); font-size: 17px; line-height: 1.55; }
.text-button { display: inline-flex; cursor: pointer; align-items: center; gap: 12px; margin-top: 18px; border: 0; border-bottom: 1px solid rgba(120,54,72,.24); padding: 0 0 5px; color: var(--wine); background: none; font-size: 10px; font-weight: 700; }
.album-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 65px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.filter-group { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-group button { cursor: pointer; border: 1px solid transparent; border-radius: 999px; padding: 9px 14px; color: #77666a; background: transparent; font-size: 9px; font-weight: 700; }
.filter-group button.is-active { border-color: rgba(120,54,72,.16); color: var(--wine); background: #ead9d7; }
.album-toolbar > p { margin: 0; color: var(--muted); font-family: var(--serif); font-size: 14px; font-style: italic; }
.album-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin-top: 38px; }
.album-card { --card-bg: #e7d6cf; position: relative; display: flex; min-height: 470px; grid-column: span 4; cursor: pointer; flex-direction: column; overflow: hidden; border: 0; padding: 0; color: var(--ink); background: var(--card-bg); box-shadow: inset 0 0 0 1px rgba(68,45,51,.08); text-align: left; transition: transform .25s ease, box-shadow .25s ease; }
.album-card:nth-child(5n+1) { grid-column: span 5; }
.album-card:nth-child(5n+2) { grid-column: span 3; }
.album-card:nth-child(5n+3) { grid-column: span 4; }
.album-card[data-accent="sea"] { --card-bg: #cbd9d6; }
.album-card[data-accent="navy"] { --card-bg: #cfd1d9; }
.album-card[data-accent="terracotta"], .album-card[data-accent="brick"] { --card-bg: #ddc5ba; }
.album-card[data-accent="night"], .album-card[data-accent="charcoal"] { --card-bg: #4a3e41; color: #fff7f1; }
.album-card[data-accent="gold"], .album-card[data-accent="amber"] { --card-bg: #e0ceb1; }
.album-card[data-accent="plum"] { --card-bg: #dbc7d0; }
.album-card:hover { z-index: 2; box-shadow: 0 28px 65px rgba(57,39,43,.18); transform: translateY(-6px) rotate(-.25deg); }
.album-card-photo { position: relative; height: 310px; margin: 13px 13px 0; overflow: hidden; background: rgba(255,255,255,.18); }
.album-card-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.76) contrast(.98); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.album-card:hover .album-card-photo img { transform: scale(1.045); }
.album-card-photo::before { position: absolute; top: -15px; left: 50%; z-index: 2; width: 74px; height: 30px; content: ""; opacity: .72; background: #efe1bd; box-shadow: 0 3px 5px rgba(60,42,43,.07); transform: translateX(-50%) rotate(-2deg); }
.album-card-count { position: absolute; right: 10px; bottom: 10px; z-index: 2; border-radius: 999px; padding: 6px 9px; color: #4b3038; background: rgba(255,249,244,.86); font-size: 8px; font-weight: 700; backdrop-filter: blur(8px); }
.album-card-copy { position: relative; flex: 1; padding: 21px 24px 25px; }
.album-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 8px; font-weight: 700; letter-spacing: .1em; opacity: .58; text-transform: uppercase; }
.album-card-meta .has-location { color: #824053; opacity: 1; }
.album-card h3 { margin: 11px 0 0; font-family: var(--serif); font-size: 32px; font-weight: 500; letter-spacing: -.035em; line-height: .95; }
.album-card p { display: -webkit-box; overflow: hidden; margin: 11px 0 0; font-family: var(--serif); font-size: 14px; line-height: 1.35; opacity: .67; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.album-loading { display: grid; min-height: 300px; grid-column: 1/-1; place-items: center; align-content: center; color: var(--rose); }
.album-loading span { font-size: 36px; animation: memoryPulse 1.4s ease-in-out infinite; }
.album-loading p { color: var(--muted); font-family: var(--serif); font-size: 17px; }
.memory-quote { padding: 110px 24px; color: white; background: #6d3444; text-align: center; }
.memory-quote p { margin: 0; color: #f0ced6; font-family: var(--serif); font-size: clamp(52px,8vw,105px); font-style: italic; letter-spacing: -.05em; }
.memory-quote span { display: block; margin-top: 18px; font-family: var(--serif); font-size: 17px; opacity: .65; }

.album-dialog { width: min(1120px, calc(100% - 30px)); max-height: calc(100svh - 30px); overflow: auto; border: 0; padding: 0; color: var(--ink); background: #f8f1eb; box-shadow: 0 40px 110px rgba(29,18,21,.38); }
.album-dialog::backdrop, .location-dialog::backdrop { background: rgba(32,23,25,.68); backdrop-filter: blur(8px); }
.dialog-close { position: sticky; top: 14px; left: calc(100% - 57px); z-index: 4; display: grid; width: 42px; height: 42px; cursor: pointer; place-items: center; border: 1px solid rgba(74,46,54,.15); border-radius: 50%; color: #5a3640; background: rgba(255,249,244,.88); font-family: var(--serif); font-size: 29px; backdrop-filter: blur(9px); }
.album-dialog-head { display: grid; grid-template-columns: minmax(280px, .8fr) 1.2fr; gap: 55px; margin-top: -42px; padding: 54px 55px 42px; }
.album-dialog-cover { position: relative; min-height: 480px; padding: 10px 10px 34px; background: white; box-shadow: 0 24px 55px rgba(59,37,43,.14); transform: rotate(-2deg); }
.album-dialog-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-dialog-copy { align-self: center; }
.album-dialog-copy .eyebrow { margin-bottom: 17px; color: var(--wine); }
.album-dialog-copy h2 { margin: 0; font-family: var(--serif); font-size: clamp(50px,6vw,82px); font-weight: 400; letter-spacing: -.055em; line-height: .83; }
.album-dialog-copy > p { margin: 23px 0 0; color: var(--muted); font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.album-location-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 24px; border-bottom: 1px solid rgba(120,54,72,.24); padding-bottom: 4px; color: var(--wine); font-size: 10px; font-weight: 700; }
.album-photo-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; padding: 0 20px 20px; }
.album-photo-button { position: relative; min-height: 245px; cursor: zoom-in; overflow: hidden; border: 0; padding: 0; background: #e1d7d1; }
.album-photo-button:nth-child(7n+1) { grid-column: span 2; grid-row: span 2; }
.album-photo-button img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82); transition: transform .45s ease, filter .3s ease; }
.album-photo-button:hover img { filter: saturate(1); transform: scale(1.04); }

.lightbox { position: fixed; inset: 0; z-index: 1200; display: grid; grid-template-columns: 70px 1fr 70px; place-items: center; padding: 25px; color: white; background: rgba(23,17,18,.96); }
.lightbox[hidden] { display: none; }
.lightbox figure { display: grid; max-width: min(930px, 75vw); max-height: calc(100svh - 50px); margin: 0; justify-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100svh - 105px); object-fit: contain; box-shadow: 0 30px 100px rgba(0,0,0,.4); }
.lightbox figcaption { display: flex; width: 100%; justify-content: space-between; gap: 20px; margin-top: 13px; font-family: var(--serif); font-size: 15px; }
.lightbox figcaption small { font-family: var(--sans); font-size: 9px; opacity: .55; }
.lightbox-close { position: absolute; top: 20px; right: 24px; z-index: 2; width: 44px; height: 44px; cursor: pointer; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: white; background: rgba(255,255,255,.06); font-family: var(--serif); font-size: 30px; }
.lightbox-nav { width: 48px; height: 48px; cursor: pointer; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: white; background: rgba(255,255,255,.05); }

.location-dialog { width: min(880px, calc(100% - 24px)); max-height: calc(100svh - 24px); overflow: auto; border: 0; padding: 0; color: var(--ink); background: #f8f1eb; box-shadow: 0 35px 100px rgba(31,19,22,.4); }
.location-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 30px 32px 20px; border-bottom: 1px solid var(--line); }
.location-header .eyebrow { margin-bottom: 8px; color: var(--wine); }
.location-header h2 { margin: 0; font-family: var(--serif); font-size: 44px; font-weight: 400; letter-spacing: -.04em; }
.location-header button { width: 40px; height: 40px; cursor: pointer; border: 1px solid var(--line); border-radius: 50%; color: #68434d; background: transparent; font-family: var(--serif); font-size: 28px; }
.location-body { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; padding: 25px 32px 32px; }
.location-body label { display: grid; gap: 7px; color: #745f64; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.location-body select, .location-body input { width: 100%; min-height: 46px; border: 1px solid rgba(91,57,67,.16); border-radius: 0; padding: 0 13px; color: var(--ink); background: #fffaf6; outline: none; }
.location-body select:focus, .location-body input:focus { border-color: #a85d71; box-shadow: 0 0 0 3px rgba(168,93,113,.1); }
.location-tip { grid-column: 1/-1; margin: 0; color: var(--muted); font-family: var(--serif); font-size: 14px; }
.location-map { height: 360px; grid-column: 1/-1; border: 1px solid var(--line); background: #d9d1c8; }
.location-map .leaflet-tile-pane { filter: sepia(.15) saturate(.6); }
.location-coordinates { display: flex; grid-column: 1/-1; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 9px; }
.location-coordinates button { cursor: pointer; border: 0; border-bottom: 1px solid var(--line); padding: 2px 0; color: var(--wine); background: transparent; font-size: 9px; }
.location-actions { display: flex; grid-column: 1/-1; align-items: center; justify-content: space-between; gap: 20px; }
.location-actions p { margin: 0; color: var(--muted); font-size: 9px; }
.save-location { display: inline-flex; min-height: 46px; cursor: pointer; align-items: center; gap: 10px; border: 0; padding: 0 20px; color: white; background: var(--wine); font-size: 10px; font-weight: 700; }
.save-location:disabled { cursor: not-allowed; opacity: .5; }
.toast { position: fixed; right: 18px; bottom: 20px; z-index: 1500; max-width: 360px; border: 1px solid rgba(255,255,255,.22); padding: 13px 17px; opacity: 0; color: white; background: rgba(48,38,41,.93); box-shadow: 0 16px 45px rgba(31,20,23,.25); font-size: 10px; transform: translateY(16px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: none; }

@keyframes memoryPulse { 50% { transform: scale(1.14); } }

@media (max-width: 920px) {
  .album-heading { grid-template-columns: 1fr; gap: 28px; }
  .album-heading-copy { max-width: 570px; }
  .album-card, .album-card:nth-child(n) { grid-column: span 6; }
  .album-dialog-head { grid-template-columns: 1fr 1fr; gap: 30px; padding: 50px 30px 35px; }
  .album-photo-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 760px) {
  .memory-topbar { width: calc(100% - 34px); }
  .map-stage { min-height: 760px; }
  .map-stage .leaflet-control-zoom { display: none; }
  .map-shade { background: linear-gradient(180deg, rgba(34,25,27,.86) 0%, rgba(42,31,34,.6) 38%, transparent 70%), linear-gradient(0deg, rgba(29,21,23,.58), transparent 32%); }
  .map-intro { top: 110px; left: 22px; width: calc(100% - 44px); transform: none; }
  .map-intro h1 { font-size: clamp(57px,16vw,78px); }
  .map-intro > p:last-child { max-width: 340px; margin-top: 18px; font-size: 17px; }
  .map-summary { right: 14px; bottom: 44px; left: 14px; display: grid; grid-template-columns: 1fr 1fr; }
  .map-summary > div { min-width: 0; padding: 12px 15px; }
  .map-summary button { min-height: 45px; grid-column: 1/-1; justify-content: center; }
  .map-note { display: none; }
  .map-load-notice { top: auto; right: 14px; bottom: 205px; left: 14px; justify-content: space-between; }
  .album-section { width: calc(100% - 28px); padding: 82px 0 90px; }
  .album-heading h2 { font-size: 59px; }
  .album-toolbar { align-items: flex-start; flex-direction: column; }
  .album-card, .album-card:nth-child(n) { min-height: 450px; grid-column: 1/-1; }
  .album-card-photo { height: 292px; }
  .album-dialog { max-height: 100svh; width: 100%; }
  .album-dialog-head { grid-template-columns: 1fr; margin-top: -28px; padding: 30px 18px; }
  .album-dialog-cover { min-height: 400px; }
  .album-dialog-copy h2 { font-size: 55px; }
  .album-photo-grid { grid-template-columns: repeat(2,1fr); padding: 0 8px 8px; }
  .album-photo-button { min-height: 200px; }
  .album-photo-button:nth-child(7n+1) { grid-column: span 2; min-height: 350px; }
  .lightbox { grid-template-columns: 1fr; padding: 12px; }
  .lightbox figure { max-width: 100%; }
  .lightbox-nav { position: absolute; bottom: 21px; z-index: 2; }
  .lightbox-prev { left: 20px; }
  .lightbox-next { right: 20px; }
  .lightbox figcaption { padding: 0 65px; }
  .location-header { padding: 24px 20px 18px; }
  .location-header h2 { font-size: 37px; }
  .location-body { grid-template-columns: 1fr; padding: 20px; }
  .location-tip, .location-map, .location-coordinates, .location-actions { grid-column: 1; }
  .location-map { height: 320px; }
  .location-actions { align-items: stretch; flex-direction: column; }
  .save-location { justify-content: center; }
  .memory-footer { padding-bottom: 35px; }
  .toast { right: 12px; bottom: 82px; left: 12px; }
}
