/* NYC, before I go — editorial / risograph styling. Self-hosted fonts (OFL, see /fonts). */
@font-face { font-family: "Bricolage"; src: url(/fonts/bricolage.woff2) format("woff2-variations"), url(/fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: italic; src: url(/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(/fonts/space-mono-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Space Mono"; font-weight: 700; src: url(/fonts/space-mono-latin-700-normal.woff2) format("woff2"); font-display: swap; }

:root, [data-theme="riso"] {
  --paper: #f3eee3; --paper-2: #e9e2d3; --card: #fbf8f2; --ink: #1b1b1f; --muted: #6b665d; --line: #d8cfbe;
  --accent: #ff4f8b; --accent-2: #2f5bff; --accent-3: #ffcf33; --land: #ebe3d2; --water: #cfe0f2; --pop-ink: #1b1b1f;
  --grain: .28; --shadow: 6px 6px 0 var(--ink);
}
[data-theme="subway"] { --paper: #f6f6f3; --paper-2: #e9e9e4; --card: #ffffff; --ink: #111; --muted: #5d5d5d; --line: #d4d4cf;
  --accent: #ee352e; --accent-2: #0039a6; --accent-3: #fccc0a; --land: #ececea; --water: #d7e1ee; --grain: .12; }
[data-theme="night"] { --paper: #0f1016; --paper-2: #171925; --card: #181a24; --ink: #f2efe8; --muted: #a29fae; --line: #2f3241;
  --accent: #ff3ea5; --accent-2: #2de1c2; --accent-3: #ffd23f; --land: #1d2030; --water: #12141d; --grain: .18; --shadow: 6px 6px 0 var(--accent-2); }
[data-theme="bodega"] { --paper: #fff4cc; --paper-2: #ffe99a; --card: #fffaf0; --ink: #1a1a1a; --muted: #6a5f3d; --line: #e6d390;
  --accent: #d7262e; --accent-2: #1a7f3c; --accent-3: #1a1a1a; --land: #ffeaa3; --water: #bfe0d0; --grain: .22; }
[data-theme="paper"] { --paper: #fbfaf7; --paper-2: #f1efe9; --card: #ffffff; --ink: #222; --muted: #6f6c66; --line: #e3e0d8;
  --accent: #c2410c; --accent-2: #475569; --accent-3: #e7c26a; --land: #f0ede6; --water: #e3e9ee; --grain: .06; --shadow: 0 10px 30px rgba(0,0,0,.08); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.5 "Bricolage", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "wdth" 100; overflow-x: hidden; transition: background .3s, color .3s; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: var(--grain); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
[data-theme="night"] body::before { mix-blend-mode: screen; filter: invert(1); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.wrap, main > section, .top, .foot { padding-left: max(16px, env(safe-area-inset-left), 4vw); padding-right: max(16px, env(safe-area-inset-right), 4vw); }
main > section { max-width: 1760px; margin: 0 auto; }

/* ticker */
.ticker { background: var(--ink); color: var(--paper); overflow: hidden; white-space: nowrap; font: 700 12px/1 "Space Mono", monospace; letter-spacing: .08em; text-transform: uppercase; height: 30px; display: flex; align-items: center; }
.ticker-track { display: inline-flex; gap: 2.5em; padding-left: 100%; animation: tick 60s linear infinite; }
.ticker-track span b { color: var(--accent-3); font-weight: 700; }
.ticker-track span::before { content: "●"; color: var(--accent); margin-right: .8em; }
@keyframes tick { to { transform: translateX(-100%); } }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; max-width: 1760px; margin: 0 auto; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font: 800 20px/1 "Bricolage"; font-stretch: 75%; letter-spacing: -.02em; }
.mark svg { width: 34px; height: 12px; color: var(--accent); }
.topnav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.topnav a { text-decoration: none; font: 700 13px/1 "Space Mono"; text-transform: uppercase; letter-spacing: .06em; padding: 9px 10px; border-radius: 99px; }
.topnav a:hover { background: var(--paper-2); }
.who { font: 400 12px/1 "Space Mono"; color: var(--muted); padding: 0 6px; }
body:not(.editing) .edit-only { display: none !important; }
body.editing .pub-only { display: none !important; }

/* buttons */
.btn { appearance: none; border: 2px solid var(--ink); background: transparent; border-radius: 99px; padding: 8px 16px; font-weight: 650; cursor: pointer; line-height: 1.2; transition: transform .12s, background .12s; }
.btn:hover { transform: translate(-1px, -1px); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.danger { border-color: #c62828; color: #c62828; }
[data-theme="night"] .btn.danger { border-color: #ff6b6b; color: #ff6b6b; }
.btn.ghost { border-color: var(--line); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 72px); align-items: end; padding-top: clamp(16px, 4vw, 56px); padding-bottom: clamp(24px, 4vw, 56px); position: relative; }
.kicker { font: 700 12px/1.3 "Space Mono"; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 14px; }
.title { margin: 0; font-weight: 800; font-stretch: 75%; letter-spacing: -.035em; line-height: .86; font-size: clamp(3.4rem, 11.5vw, 12rem); text-wrap: balance; overflow-wrap: anywhere; }
.title .it { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--accent); font-stretch: 100%; }
.title .rg { position: relative; display: inline-block; }
.title .rg::after { content: attr(data-t); white-space: nowrap; overflow-wrap: normal; word-break: keep-all; position: absolute; left: .045em; top: .03em; width: 100%; height: 100%; overflow: visible; color: var(--accent-2); mix-blend-mode: multiply; z-index: -1; }
[data-theme="night"] .title .rg::after { mix-blend-mode: screen; opacity: .7; }
.tagline { font: italic 400 clamp(1.25rem, 2.2vw, 2rem)/1.2 "Instrument Serif", serif; max-width: 34ch; margin: 18px 0 0; color: var(--ink); }
.hero-stats { display: grid; grid-template-columns: auto auto; gap: 18px 28px; align-items: center; justify-content: start; }
.countdown { display: flex; align-items: flex-end; gap: 12px; grid-column: 1 / -1; }
.days { font: 800 clamp(5rem, 13vw, 11rem)/.8 "Bricolage"; font-stretch: 75%; letter-spacing: -.05em; color: var(--accent); font-variant-numeric: tabular-nums;
  text-shadow: 4px 4px 0 var(--accent-2); }
[data-theme="paper"] .days { text-shadow: none; }
.days-label { font: 700 clamp(1.1rem, 1.7vw, 1.5rem)/1.05 "Bricolage"; padding-bottom: 6px; }
.days-label em { font: italic 400 1.1em/1 "Instrument Serif"; color: var(--muted); }
.ring-wrap { position: relative; width: 132px; height: 132px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: var(--paper-2); }
.ring-fg { stroke: var(--accent-2); stroke-linecap: round; transition: stroke-dasharray 1.2s cubic-bezier(.2,.8,.2,1); }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring-text b { font: 800 2.4rem/1 "Bricolage"; font-stretch: 75%; }
.ring-text span { font: 400 11px/1.3 "Space Mono"; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mini-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font: 400 13px/1.3 "Space Mono"; }
.mini-stats b { font-family: "Bricolage"; font-size: 1.35em; margin-right: 6px; }
.catbar { grid-column: 1 / -1; display: flex; height: 14px; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; }
.catbar span { display: block; height: 100%; position: relative; }
.catbar span i { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 3px, transparent 3px 7px); }
.catbar span.done-part i { display: none; }

/* section heads */
.section-h { margin: 0; font: 800 clamp(2.2rem, 5.2vw, 4.6rem)/.9 "Bricolage"; font-stretch: 75%; letter-spacing: -.03em; }
.section-h em { font: italic 400 1.05em/1 "Instrument Serif"; color: var(--accent); letter-spacing: -.01em; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; border-top: 2px solid var(--ink); padding-top: 16px; }
.count { font: 400 13px/1 "Space Mono"; color: var(--muted); margin: 0; }

/* happening soon */
.soon { padding-bottom: 30px; }
.soon .section-h { border-top: 2px solid var(--ink); padding-top: 16px; margin-bottom: 16px; }
.soon-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 300px); gap: 14px; overflow-x: auto; padding: 4px 4px 14px; scroll-snap-type: x mandatory; }
.soon-card { scroll-snap-align: start; background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; text-align: left; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s; }
.soon-card:hover { transform: translate(-2px, -2px); }
.soon-card .date { width: 58px; height: 64px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-content: center; text-align: center; line-height: 1; }
.soon-card .date b { font: 800 1.7rem/1 "Bricolage"; font-stretch: 75%; }
.soon-card .date small { font: 700 10px/1.2 "Space Mono"; text-transform: uppercase; letter-spacing: .1em; }
.soon-card .date.now { background: var(--accent-2); }
.soon-card h3 { margin: 0; font-size: 1.02rem; line-height: 1.15; }
.soon-card p { margin: 4px 0 0; font: 400 11px/1.3 "Space Mono"; color: var(--muted); }

/* map */
.map-sec { padding-bottom: 40px; }
.legend { font: 400 12px/1 "Space Mono"; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--accent); background: var(--card); }
.lg.done { background: var(--ink); border-color: var(--ink); margin-left: 10px; }
.map-box { position: relative; border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--water); height: clamp(420px, 72vh, 860px); touch-action: none; }
.map-svg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; -webkit-user-select: none; }
.map-svg.dragging { cursor: grabbing; }
.map-svg .boro, .pick-svg .boro { fill: var(--land); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.map-svg .boro-shadow, .pick-svg .boro-shadow { fill: var(--accent-2); opacity: .22; }
.map-svg .park, .pick-svg .park { fill: var(--accent-2); opacity: .16; }
[data-theme="night"] .map-svg .boro-shadow, .pick-svg .boro-shadow { opacity: .35; }
.map-svg .lbl { font: 800 22px/1 "Bricolage"; font-stretch: 75%; letter-spacing: .14em; text-transform: uppercase; fill: var(--ink); opacity: .32; pointer-events: none; }
.map-svg .pin { cursor: pointer; }
.map-svg .pin circle { stroke-width: 3; vector-effect: non-scaling-stroke; transition: r .15s; }
.map-svg .pin.todo circle { fill: var(--card); }
.map-svg .pin.done circle { stroke: var(--ink); }
.map-svg .pin path { fill: none; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-svg .pin.sel circle { stroke: var(--ink); stroke-width: 4; }
.map-svg .pin.dim { opacity: .14; }
.map-ctrl { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; }
.mc { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--ink); background: var(--card); font: 700 20px/1 "Bricolage"; cursor: pointer; }
.map-pop { position: absolute; left: 12px; bottom: 12px; max-width: min(360px, calc(100% - 24px)); background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.map-pop h3 { margin: 4px 0; font-size: 1.15rem; line-height: 1.15; }
.map-pop p { margin: 4px 0 0; font-size: .92rem; }
.map-pop .x { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 22px; cursor: pointer; }
.map-pop .go { display: inline-block; margin-top: 8px; font: 700 12px/1 "Space Mono"; text-transform: uppercase; letter-spacing: .06em; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.search { flex: 1 1 240px; }
.search input, .sel select { width: 100%; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); padding: 9px 16px; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: none; padding: 8px 14px; cursor: pointer; font-weight: 650; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.chip { border: 2px solid var(--c, var(--ink)); background: transparent; border-radius: 99px; padding: 5px 12px; cursor: pointer; font-weight: 600; font-size: .92rem; display: inline-flex; gap: 6px; align-items: center; }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ink)); }
.chip[aria-pressed="true"] { background: var(--c, var(--ink)); color: #fff; }
.chip[aria-pressed="true"]::before { background: #fff; }
.chip small { font: 400 11px/1 "Space Mono"; opacity: .75; }
.tags .chip { border-width: 1px; border-color: var(--line); font: 400 12px/1 "Space Mono"; padding: 6px 10px; }
.tags .chip::before { content: "#"; width: auto; height: auto; background: none; }
.tags .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* cards */
.cards { list-style: none; margin: 0; padding: 0; }
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.layout-list { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.layout-poster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 22px; }
.card { --c: var(--ink); position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: 20px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .18s, box-shadow .18s; min-width: 0; }
.card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); }
.card.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 6px var(--accent); } 100% { box-shadow: none; } }
.card .num { font: 700 12px/1 "Space Mono"; color: var(--muted); letter-spacing: .06em; }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cat { display: inline-flex; align-items: center; gap: 6px; font: 700 11px/1 "Space Mono"; text-transform: uppercase; letter-spacing: .08em; color: var(--c); }
.cat::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); transform: rotate(45deg); }
.card h3 { margin: 0; font: 750 1.45rem/1.05 "Bricolage"; font-stretch: 85%; letter-spacing: -.015em; overflow-wrap: anywhere; }
.card .where { font: 400 12px/1.3 "Space Mono"; color: var(--muted); }
.card .where a { text-decoration: none; }
.card .blurb { margin: 0; font-size: .97rem; }
.card .when { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; font: 700 12px/1.25 "Space Mono"; padding: 5px 10px; border-radius: 8px; background: var(--paper-2); }
.card .when.soon { background: var(--accent-3); color: #1a1a1a; }
.card .when.now { background: var(--accent-2); color: #fff; }
.card .when.past { text-decoration: line-through; opacity: .6; }
.card .tagline-s { display: flex; flex-wrap: wrap; gap: 4px 8px; font: 400 11px/1.3 "Space Mono"; color: var(--muted); }
.card .ctl { display: flex; gap: 6px; align-items: center; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.icon-btn { border: 2px solid var(--line); background: var(--card); border-radius: 10px; min-width: 36px; height: 36px; cursor: pointer; font-size: 15px; display: inline-grid; place-items: center; padding: 0 8px; }
.icon-btn:hover { border-color: var(--ink); }
.check-btn { border: 2.5px solid var(--ink); background: var(--card); border-radius: 50%; width: 38px; height: 38px; cursor: pointer; display: grid; place-items: center; flex: none; }
.check-btn svg { width: 20px; height: 20px; opacity: 0; transition: opacity .15s; }
.check-btn:hover svg { opacity: .35; }
.card.is-done .check-btn { background: var(--ink); }
.card.is-done .check-btn svg { opacity: 1; stroke: var(--paper); }
.drag { cursor: grab; }
.card.dragging { opacity: .4; }
.card.drop-before { box-shadow: -6px 0 0 var(--accent); }
.layout-list .card.drop-before { box-shadow: 0 -4px 0 var(--accent); }

/* done stamp + memory */
.stamp { position: absolute; right: 14px; top: 34px; transform: rotate(-12deg); border: 3px solid var(--accent); color: var(--accent); border-radius: 10px; padding: 3px 9px 2px; font: 800 1.2rem/1 "Bricolage"; font-stretch: 75%; letter-spacing: .08em; text-transform: uppercase; opacity: .9; pointer-events: none; mix-blend-mode: multiply; text-align: center; }
[data-theme="night"] .stamp { mix-blend-mode: normal; }
.stamp small { display: block; font: 700 9px/1.2 "Space Mono"; letter-spacing: .04em; }
.card.is-done h3 { text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.memory { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin-top: 4px; }
.memory.no-photo { grid-template-columns: 1fr; }
.polaroid { background: #fff; padding: 6px 6px 18px; box-shadow: 0 6px 14px rgba(0,0,0,.18); transform: rotate(-3deg); width: 108px; border: 0; cursor: zoom-in; }
.polaroid img { width: 96px; height: 96px; object-fit: cover; }
.memory blockquote { margin: 0; font: italic 400 1.12rem/1.25 "Instrument Serif"; }
.memory .private { font: 700 10px/1 "Space Mono"; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; }

/* list layout */
.layout-list .card { border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; background: transparent; display: grid; grid-template-columns: 54px minmax(0, 1.4fr) minmax(0, 1.6fr) auto; gap: 6px 18px; align-items: center; padding: 14px 4px; }
.layout-list .card:hover { transform: none; box-shadow: none; background: var(--paper-2); }
.layout-list .card .row { display: contents; }
.layout-list .card .num { grid-column: 1; grid-row: 1 / span 2; font-size: 1.1rem; color: var(--c); }
.layout-list .card .cat { display: none; }
.layout-list .card h3 { grid-column: 2; font-size: 1.2rem; }
.layout-list .card .where { grid-column: 2; }
.layout-list .card .blurb { grid-column: 3; grid-row: 1 / span 2; font-size: .9rem; color: var(--muted); }
.layout-list .card .when, .layout-list .card .tagline-s, .layout-list .card .memory { grid-column: 2 / 4; }
.layout-list .card .ctl { grid-column: 4; grid-row: 1 / span 2; margin: 0; padding: 0; }
.layout-list .stamp { position: static; transform: rotate(-6deg); grid-column: 4; grid-row: 1; justify-self: end; font-size: .85rem; }

/* poster layout */
.layout-poster .card { background: var(--c); color: #fff; border-color: var(--ink); padding: 24px 24px 20px; min-height: 340px; }
.layout-poster .card:nth-child(3n+2) { background: var(--card); color: var(--ink); }
.layout-poster .card .num { color: inherit; opacity: .8; font-size: 14px; }
.layout-poster .card h3 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: .95; font-stretch: 75%; }
.layout-poster .card .cat { color: inherit; }
.layout-poster .card .cat::before { background: currentColor; }
.layout-poster .card .where { color: inherit; opacity: .85; }
.layout-poster .card .blurb { font: italic 400 1.25rem/1.25 "Instrument Serif"; }
.layout-poster .card .when { background: rgba(0,0,0,.25); color: inherit; }
.layout-poster .card:nth-child(3n+2) .when { background: var(--paper-2); }
.layout-poster .card .tagline-s { color: inherit; opacity: .8; }
.layout-poster .card .stamp { border-color: currentColor; color: inherit; mix-blend-mode: normal; }
.layout-poster .icon-btn, .layout-poster .check-btn { color: var(--ink); }
.layout-poster .card.is-done h3 { text-decoration-color: currentColor; }

.empty { font: italic 400 1.6rem/1.2 "Instrument Serif"; color: var(--muted); padding: 40px 0; }
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }

/* footer */
.foot { border-top: 2px solid var(--ink); margin: 60px auto 0; padding-top: 28px; padding-bottom: 40px; max-width: 1760px; }
.foot-big { font: italic 400 clamp(2.4rem, 7vw, 6rem)/1 "Instrument Serif"; color: var(--accent); }
.foot-small { font: 400 12px/1.6 "Space Mono"; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }

/* dialogs */
.dlg { border: 2px solid var(--ink); border-radius: 22px; padding: 0; background: var(--card); color: var(--ink); width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: var(--shadow); }
.dlg::backdrop { background: rgba(20, 18, 30, .45); backdrop-filter: blur(3px); }
.dlg-body { padding: 22px; display: grid; gap: 12px; }
.dlg h3 { margin: 0 0 4px; font: 800 1.8rem/1 "Bricolage"; font-stretch: 75%; }
.dlg label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; min-width: 0; }
.dlg small { font-weight: 400; color: var(--muted); }
.dlg input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), .dlg select, .dlg textarea { width: 100%; min-width: 0; border: 2px solid var(--line); border-radius: 12px; padding: 9px 12px; background: var(--paper); }
.dlg input:focus, .dlg select:focus, .dlg textarea:focus { border-color: var(--ink); outline: none; }
.dlg fieldset { border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px 12px; margin: 0; min-width: 0; }
.dlg legend { font-weight: 700; padding: 0 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.dlg .check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.dlg-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: sticky; bottom: -22px; background: var(--card); padding: 10px 0 2px; }
.spacer { flex: 1; }
.err { color: #c62828; margin: 0; min-height: 1em; font-size: .9rem; }
[data-theme="night"] .err { color: #ff8a8a; }
.pick-svg { width: 100%; height: 280px; border-radius: 12px; background: var(--water); display: block; cursor: crosshair; margin-bottom: 8px; touch-action: none; }
.photo-in { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.file { position: relative; overflow: hidden; display: inline-block !important; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-info { font: 400 12px/1.2 "Space Mono"; color: var(--muted); }
.photo-preview { max-height: 240px; width: auto; border-radius: 10px; border: 2px solid var(--line); }
.stamp-sm { display: inline-block; transform: rotate(-6deg); border: 3px solid var(--accent); color: var(--accent); border-radius: 8px; padding: 2px 8px; font-size: 1rem; vertical-align: middle; }
.drawer { margin-right: 0; margin-left: auto; height: 100dvh; max-height: 100dvh; border-radius: 22px 0 0 22px; width: min(520px, 100vw); }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.theme-sw { border: 2px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; background: var(--sw-paper); color: var(--sw-ink); font: 700 12px/1 "Space Mono"; text-align: left; display: grid; gap: 6px; }
.theme-sw i { display: flex; gap: 3px; }
.theme-sw i b { width: 14px; height: 14px; border-radius: 50%; }
.theme-sw[aria-pressed="true"] { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.radios { display: flex; gap: 14px; flex-wrap: wrap; }
.radios label { display: flex !important; gap: 6px; align-items: center; font-weight: 500 !important; }
.cat-edit { display: grid; gap: 8px; margin-bottom: 8px; }
.cat-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; }
.cat-row input[type=color] { width: 44px; height: 38px; border: 2px solid var(--line); border-radius: 10px; padding: 2px; background: var(--paper); }
.lightbox { width: auto; max-width: calc(100vw - 24px); background: #111; color: #fff; border: 0; }
.lightbox img { max-width: calc(100vw - 48px); max-height: calc(100dvh - 120px); width: auto; margin: 12px auto 0; }
.lightbox p { font: italic 400 1.2rem/1.3 "Instrument Serif"; padding: 8px 16px 14px; margin: 0; max-width: 60ch; }
.lb-close { position: absolute; right: 8px; top: 4px; background: none; border: 0; color: #fff; font-size: 30px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 200%); opacity: 0; visibility: hidden; background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 99px; font-weight: 600; transition: transform .25s, opacity .25s, visibility .25s; z-index: 300; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-stats { grid-template-columns: auto 1fr; gap: 14px 18px; }
  .ring-wrap { width: 112px; height: 112px; }
  .layout-list .card { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .layout-list .card .blurb { grid-column: 2 / 4; grid-row: auto; }
  .layout-list .card .when, .layout-list .card .tagline-s, .layout-list .card .memory { grid-column: 2 / 4; }
  .layout-list .card .ctl { grid-column: 3; grid-row: 1; }
  .layout-list .stamp { grid-column: 3; grid-row: 2; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .map-box { height: 68vh; border-radius: 16px; }
  .layouts { display: none; }
  .filters .seg { flex: 1 1 auto; }
  .filters .seg button { flex: 1; }
  .sel { flex: 1 1 140px; }
  .drawer { border-radius: 0; }
  .topnav a { padding: 8px 6px; }
}
@media (min-width: 1700px) {
  body { font-size: 18px; }
  .layout-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
