/* Matisse's Montparnasse v2 — the map is the cover, each station is a page. */
:root {
  --paper: #FAF6EE; --paper-2: #EFE8D6; --ink: #141414; --ink-soft: #4A463F;
  --cobalt: #1F3A93; --vermilion: #E63312; --lemon: #F5C518; --leaf: #2E7D4F; --mat: #FFFFFF;
  --accent: #1F3A93; --accent-ink: #FAF6EE;
  --display: "Fraunces", Georgia, serif; --body: "Karla", "Segoe UI", Helvetica, Arial, sans-serif; --hand: "Patrick Hand", "Segoe Print", cursive;
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  --top-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper: #111a3d; --paper-2: #1b2a63; --ink: #FAF6EE; --ink-soft: #D9D2C2; color-scheme: dark; } }
:root[data-theme="dark"] { --paper: #111a3d; --paper-2: #1b2a63; --ink: #FAF6EE; --ink-soft: #D9D2C2; color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.05rem; line-height: 1.45; overflow: hidden; font-variant-numeric: tabular-nums; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 900; line-height: 1; margin: 0; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--lemon); outline-offset: 2px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--ink-soft); }
.btn { display: inline-block; padding: 12px 18px; border: 3px solid #141414; background: var(--lemon); color: #141414; font-weight: 700; text-decoration: none; border-radius: 0; cursor: pointer; }
.btn.alt { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.pill { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 0; padding: 6px 12px; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* top bar */
.top { position: fixed; inset: env(safe-area-inset-top, 0px) 0 auto 0; height: var(--top-h); z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding-inline: var(--gl) var(--gr); background: var(--paper); border-bottom: 3px solid var(--ink); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--paper); }
.brand { font-family: var(--display); font-weight: 900; font-size: .95rem; line-height: .95; text-decoration: none; }
.album { display: flex; gap: 4px; justify-content: center; }
.album .slot { width: 30px; height: 30px; border: 2px dashed var(--ink-soft); border-radius: 0; display: grid; place-items: center; opacity: .6; }
.album .slot.got { border-style: solid; opacity: 1; background: var(--paper-2); }
.album .slot svg { width: 24px; height: 24px; }
.album .slot.pop { animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.menu { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 0; padding: 6px 10px; font-weight: 700; cursor: pointer; }
.menupanel { position: fixed; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); right: var(--gr); z-index: 25; background: var(--paper); border: 3px solid var(--ink); display: grid; min-width: 240px; }
.menupanel a { padding: 12px 14px; text-decoration: none; font-weight: 700; border-bottom: 1px solid var(--paper-2); }
.menupanel a:last-child { border-bottom: 0; }

/* map */
#map { position: fixed; inset: calc(var(--top-h) + env(safe-area-inset-top, 0px)) 0 0 0; }
.maplibregl-ctrl-attrib { font-family: var(--body); }
/* the marker element itself is positioned by MapLibre (absolute + transform): never set position on it */
.sticker { width: 52px; height: 52px; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; }
.sticker .ico { position: relative; display: block; width: 52px; height: 52px; filter: drop-shadow(2px 3px 0 rgba(20,20,20,.35)); }
.sticker svg { width: 52px; height: 52px; display: block; }
.sticker .n { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--cobalt); color: #FAF6EE; font-family: var(--display); font-weight: 900; font-size: .85rem; display: grid; place-items: center; border: 2px solid #FAF6EE; }
.sticker.bonus .n { background: #4A463F; }
.sticker.near .ico::after { content: ""; position: absolute; inset: -10px; border: 3px solid var(--vermilion); border-radius: 50%; animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.9); opacity: .5; } 50% { transform: scale(1.08); opacity: 1; } }
.sticker.got .ico::before { content: "✓"; position: absolute; left: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--leaf); color: #FAF6EE; font-size: .8rem; display: grid; place-items: center; border: 2px solid #FAF6EE; z-index: 1; }
.maplibregl-marker { cursor: pointer; }
/* cafés */
.poi { width: 30px; height: 30px; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; }
.poi .ico { display: block; width: 30px; height: 30px; filter: drop-shadow(1px 2px 0 rgba(20,20,20,.35)); }
.poi svg { width: 30px; height: 30px; display: block; }
.poi.place, .poi.place .ico, .poi.place svg { width: 26px; height: 26px; }
.maplibregl-popup-content { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 0; padding: 10px 12px; font-family: var(--body); box-shadow: 4px 5px 0 rgba(20,20,20,.25); }
.maplibregl-popup-tip { border-top-color: var(--ink) !important; border-bottom-color: var(--ink) !important; }
.maplibregl-popup-close-button { font-size: 1.3rem; padding: 2px 8px; color: var(--ink); }
.poicard { display: grid; gap: 6px; max-height: 58vh; overflow: auto; }
.poicard h3 { font-family: var(--display); font-weight: 900; font-size: 1.2rem; margin: 0; padding-right: 20px; }
.poicard .sub { font-size: .8rem; color: var(--ink-soft); }
.poicard img { width: 100%; border: 2px solid #141414; }
.poicard .cr { font-size: .72rem; color: var(--ink-soft); }
.poicard p { font-size: .9rem; line-height: 1.35; }

/* cover */
.cover { position: fixed; inset: 0; z-index: 30; background: var(--paper); overflow: auto; display: grid; align-content: center; padding-inline: var(--gl) var(--gr); padding-block: 32px; transition: opacity .5s ease, transform .5s ease; }
.cover.hide { opacity: 0; transform: translateY(-4%); pointer-events: none; }
.cover-in { max-width: 640px; margin: 0 auto; display: grid; gap: 18px; }
.cutout { width: min(72vw, 340px); height: auto; }
.cover h1 { font-size: clamp(2.6rem, 11vw, 4.6rem); }
.lede { font-size: 1.15rem; max-width: 38ch; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.drift { animation: drift 7s ease-in-out infinite alternate; transform-origin: center; }
.drift.b { animation-duration: 9s; } .drift.c { animation-duration: 11s; }
@keyframes drift { from { transform: translate(0, 0) rotate(0); } to { transform: translate(3px, -4px) rotate(2deg); } }

/* station sheet */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); z-index: 22; transform: translateY(104%); transition: transform .45s cubic-bezier(.2,.8,.2,1); perspective: 1600px; pointer-events: none; }
.sheet.open { transform: translateY(0); pointer-events: auto; }
.card { height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-top: 3px solid var(--ink); border-radius: 0; box-shadow: 0 -8px 30px rgba(0,0,0,.25); transform-origin: left center; }
.card.turn { animation: turn .5s ease; }
@keyframes turn { 0% { transform: rotateY(0); } 50% { transform: rotateY(-70deg); opacity: .4; } 100% { transform: rotateY(0); } }
.grip { display: grid; place-items: center; padding: 8px 0 2px; cursor: grab; }
.grip span { width: 48px; height: 5px; border-radius: 0; background: var(--ink-soft); opacity: .5; }
.band { background: var(--accent); color: var(--accent-ink); }
.band .in { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding-inline: var(--gl) var(--gr); padding-block: 12px 14px; }
.band .num { font-family: var(--display); font-weight: 900; font-size: 2.4rem; line-height: .9; }
.band h2 { font-size: clamp(1.35rem, 5.5vw, 1.8rem); }
.band .meta { margin: 2px 0 0; font-size: .85rem; opacity: .92; }
.close { border: 2px solid currentColor; background: transparent; color: inherit; width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; }

/* the camera over the strip, and its flip side */
.flip { position: relative; margin: 12px var(--gr) 0 var(--gl); }
.face.back { display: none; align-content: start; gap: 8px; }
.flip.flipped .face.front { display: none; }
.flip.flipped .face.back { display: grid; animation: turnin .45s ease; transform-origin: center; }
@keyframes turnin { from { transform: rotateY(-90deg); opacity: 0; } to { transform: rotateY(0); opacity: 1; } }
.cam { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 62vh; overflow: hidden; border: 3px solid #141414; background: #FAF6EE; }
.cam img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; transition: transform .6s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.caption { font-family: var(--hand); font-size: 1.25rem; line-height: 1.25; min-height: 3.1em; padding: 8px 2px 0; }
.camctl { display: flex; align-items: center; gap: 8px; padding: 6px 0 4px; }
.camctl .count { font-weight: 700; color: var(--ink-soft); min-width: 44px; text-align: center; }
.camctl .eye { margin-left: auto; background: var(--lemon); color: #141414; border-color: #141414; }
.camctl .eye[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.thennow { position: relative; border: 3px solid #141414; background: var(--mat); overflow: hidden; }
.thennow img { width: 100%; }
.nowwrap { position: absolute; inset: 0; width: 50%; overflow: hidden; border-right: 3px solid var(--lemon); }
.nowwrap img { width: 100vw; max-width: none; }
.thennow input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.credit { font-size: .82rem; color: var(--ink-soft); line-height: 1.35; }
.more { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 760px) { .more { grid-template-columns: 1fr 1fr; } .more figure:only-child { grid-column: 1 / -1; } }
.more figure { margin: 0; background: var(--mat); border: 2px solid #141414; padding: 4px; display: grid; gap: 3px; }
.more figcaption { font-size: .72rem; color: #4A463F; line-height: 1.25; }

/* player */
.player { position: sticky; bottom: 0; z-index: 3; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; background: var(--paper-2); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); margin-top: 12px; padding-inline: var(--gl) var(--gr); padding-block: 8px; }
.play { width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--ink); background: var(--lemon); color: #141414; font-size: 1.3rem; cursor: pointer; }
.pinfo { min-width: 0; }
.plabel { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptime { font-size: .85rem; color: var(--ink-soft); }

.text { display: grid; gap: 12px; padding-inline: var(--gl) var(--gr); padding-block: 14px 8px; max-width: 70ch; }
.stand { font-weight: 700; }
.fact { border-left: 8px solid var(--vermilion); background: var(--paper-2); padding: 10px 12px; display: grid; gap: 4px; }
.fact .eyebrow { color: var(--vermilion); }
details.quiz { border: 3px solid var(--ink); padding: 10px 14px; background: var(--lemon); color: #141414; }
details.quiz summary { cursor: pointer; font-weight: 700; }
.snav { display: flex; justify-content: space-between; gap: 12px; padding-inline: var(--gl) var(--gr); padding-block: 8px calc(24px + env(safe-area-inset-bottom, 0px)); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 0; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.flyer { position: fixed; z-index: 45; width: 64px; height: 64px; left: -80px; top: 30%; pointer-events: none; }
.flyer.fly { animation: fly 2.6s cubic-bezier(.3,.6,.4,1) forwards; }
@keyframes fly { 0% { transform: translate(0, 0) rotate(-10deg); } 60% { transform: translate(70vw, -22vh) rotate(8deg); } 100% { transform: translate(calc(100vw - 120px), -8vh) rotate(0); } }

@media (prefers-reduced-motion: reduce) {
  .cam img, .sheet, .flip, .cover { transition: none; }
  .card.turn, .drift, .sticker.near::after, .album .slot.pop, .flyer.fly { animation: none; }
}
@media (min-width: 760px) {
  .sheet { left: auto; right: 0; width: 520px; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); transform: translateX(104%); border-left: 3px solid var(--ink); }
  .sheet.open { transform: translateX(0); }
  .card { border-radius: 0; }
  .cam { max-height: 56vh; }
}

/* full-screen picture viewer */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(20,20,20,.94); display: grid; grid-template-rows: 1fr auto; align-items: center; justify-items: center; touch-action: pinch-zoom; }
.lightbox img { max-width: 100vw; max-height: calc(100vh - 56px - env(safe-area-inset-bottom, 0px)); width: auto; height: auto; object-fit: contain; touch-action: pinch-zoom; cursor: zoom-out; }
.lightbox .lb-credit { color: #FAF6EE; font-size: .85rem; padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); text-align: center; max-width: 70ch; margin: 0; }
.lightbox .lb-close { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); width: 40px; height: 40px; border: 2px solid #FAF6EE; background: #141414; color: #FAF6EE; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.lb-open { overflow: hidden; }
.hero img, .more img, .thennow img, .poicard img, .icons img, .pair img, .cam img { cursor: zoom-in; }
