:root {
  --paper: #efe5cf; --paper2: #e7dbc0; --paper3: #f6efdf;
  --ink: #2f2418; --ink2: #6b5a44; --ink3: #9a8669;
  --rule: #c9b48e; --accent: #7a1f2b;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: var(--sans); }
body { display: flex; overflow: hidden; }
a { color: var(--accent); }
code { font-family: "IBM Plex Mono", monospace; font-size: .86em; background: var(--paper2); padding: 0 .25em; border-radius: 2px; }

#panel {
  width: 390px; flex: 0 0 390px; height: 100%; overflow-y: auto; padding: 26px 26px 18px;
  background: var(--paper3);
  background-image: radial-gradient(ellipse at 30% 0%, rgba(255,255,255,.55), transparent 60%);
  border-right: 1px solid var(--rule); box-shadow: inset -8px 0 18px -14px rgba(60,40,10,.45); z-index: 2;
}
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
h1 { font-family: var(--serif); font-weight: 700; font-size: 44px; line-height: .98; margin: 10px 0 10px; letter-spacing: -.01em; }
.sub { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.25; color: var(--ink2); margin: 0; }
.ornament { text-align: center; color: var(--rule); font-size: 20px; margin: 12px 0 6px; }
.lead { font-size: 13.5px; line-height: 1.5; color: var(--ink); margin: 0 0 14px; }
.lead b { font-family: var(--serif); font-size: 17px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
     color: var(--ink2); border-bottom: 1px solid var(--rule); padding-bottom: 5px; margin: 20px 0 10px; }
.tour-btn { font-family: var(--serif); font-size: 18px; font-weight: 600; background: var(--accent); color: var(--paper3);
  border: 0; padding: 9px 16px; border-radius: 2px; cursor: pointer; box-shadow: 0 1px 0 #4d121a; }
.tour-btn:hover { background: #8f2734; }

#legend { list-style: none; margin: 0; padding: 0; }
#legend li { display: flex; align-items: center; gap: 9px; padding: 4px 2px; cursor: pointer; font-size: 13.5px; user-select: none; }
#legend li .sw { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--paper3); box-shadow: 0 0 0 1px currentColor; flex: none; }
#legend li .n { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink3); font-size: 12px; }
#legend li.off { opacity: .38; }
#legend li.off .sw { background: transparent !important; }

#q { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; background: var(--paper);
     border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); }
#q:focus { outline: 2px solid rgba(122,31,43,.35); }
#list { list-style: none; margin: 8px 0 0; padding: 0; }
#list li { padding: 7px 4px 7px 12px; border-bottom: 1px dotted var(--rule); cursor: pointer; position: relative; }
#list li::before { content: ""; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
#list li:hover { background: rgba(201,180,142,.18); }
#list .t { font-size: 13.5px; font-weight: 500; }
#list .o { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ink2); line-height: 1.15; }
#list .o::before { content: "once "; font-style: normal; font-family: var(--sans); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
#list .more { color: var(--ink3); font-size: 12px; padding: 8px 4px; cursor: default; }
#list .more::before { display: none; }

footer { margin-top: 22px; font-size: 11.5px; line-height: 1.5; color: var(--ink2); border-top: 1px solid var(--rule); padding-top: 10px; }
footer .by { font-family: var(--serif); font-style: italic; font-size: 14px; }

#mapwrap { position: relative; flex: 1; height: 100%; }
#map { position: absolute; inset: 0; }
.paper { position: absolute; inset: 0; pointer-events: none; z-index: 1; mix-blend-mode: multiply;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(110,80,35,.28) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .35  0 0 0 0 .2  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.neatline { position: absolute; inset: 12px; border: 1.5px solid rgba(47,36,24,.55); outline: 1px solid rgba(47,36,24,.35);
  outline-offset: 4px; pointer-events: none; z-index: 1; }
.cartouche { position: absolute; left: 34px; bottom: 36px; z-index: 1; pointer-events: none; text-align: left;
  background: rgba(246,239,223,.82); border: 1px solid rgba(47,36,24,.5); padding: 8px 14px 7px; }
.cartouche .c1 { font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: .32em; }
.cartouche .c2 { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink2); }
.rose { position: absolute; right: 34px; top: 30px; width: 74px; height: 74px; color: rgba(47,36,24,.7); z-index: 1; pointer-events: none; }

.card { position: absolute; z-index: 3; right: 34px; top: 118px; width: 340px; max-height: calc(100% - 200px); overflow-y: auto;
  background: #fbf6ea; color: var(--ink); border: 1px solid #b9a37b; border-radius: 2px;
  box-shadow: 0 10px 28px -8px rgba(60,40,10,.45), 0 1px 0 rgba(255,255,255,.7) inset;
  background-image: repeating-linear-gradient(#fbf6ea 0 25px, rgba(122,31,43,.08) 25px 26px);
  padding: 14px 18px 14px; font-size: 13.5px; }
.card.hidden { display: none; }
.card .x { position: absolute; right: 8px; top: 4px; border: 0; background: none; font-size: 22px; color: var(--ink3); cursor: pointer; }
.card .kind { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--c); border-bottom: 2px solid var(--c); display: inline-block; padding-bottom: 1px; }
.card .no { float: right; margin-right: 22px; font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink3); }
.card .lbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); margin-top: 12px; }
.card .today { font-size: 18px; font-weight: 600; line-height: 1.2; }
.card .once { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.02; color: var(--accent); margin-top: 1px; }
.card .alts { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink2); }
.card .chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.card .chips span { font-size: 12px; background: var(--paper2); padding: 1px 6px; border-radius: 2px; }
.card .chips span i { color: var(--ink3); font-style: normal; font-size: 10px; margin-right: 3px; text-transform: uppercase; }
.card .story { margin-top: 12px; padding: 10px 12px; background: rgba(239,229,207,.85); border-left: 3px solid var(--accent); line-height: 1.45; }
.card .story b { font-family: var(--serif); font-size: 17px; display: block; margin-bottom: 2px; }
.card .wd { margin-top: 10px; color: var(--ink2); line-height: 1.4; }
.card .meta { margin-top: 12px; font-size: 11.5px; color: var(--ink3); display: flex; gap: 10px; flex-wrap: wrap; }
.card .meta a { color: var(--ink2); }

.tourbar { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: 34px; display: flex; align-items: center; gap: 10px;
  background: #fbf6ea; border: 1px solid #b9a37b; padding: 6px 10px; border-radius: 2px; box-shadow: 0 6px 18px -6px rgba(60,40,10,.4); font-family: var(--serif); font-size: 17px; }
.tourbar.hidden { display: none; }
.tourbar span { white-space: nowrap; }
.tourbar button { font: inherit; background: none; border: 1px solid var(--rule); width: 34px; height: 30px; cursor: pointer; color: var(--ink); }
.tourbar .end { width: auto; padding: 0 10px; font-size: 14px; color: var(--accent); }
.ptog { display: none; }

.maplibregl-ctrl-group { background: #fbf6ea !important; border: 1px solid #b9a37b; box-shadow: none !important; border-radius: 2px !important; }
.maplibregl-ctrl-top-left { top: 22px; left: 22px; }
.maplibregl-ctrl-bottom-right { bottom: 16px; right: 18px; }
.maplibregl-ctrl-attrib { background: rgba(246,239,223,.85) !important; font-size: 10.5px; }
.maplibregl-ctrl-scale { background: rgba(246,239,223,.8); border-color: var(--ink2); color: var(--ink2); font-family: var(--serif); }
.maplibregl-popup-content { background: #fbf6ea; font-family: var(--sans); font-size: 12.5px; padding: 6px 10px; border: 1px solid #b9a37b; border-radius: 2px; box-shadow: 0 4px 12px -4px rgba(60,40,10,.35); }
.maplibregl-popup-tip { border-top-color: #b9a37b !important; border-bottom-color: #b9a37b !important; }
.hov .o { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--accent); }

@media (max-width: 760px) {
  body { flex-direction: column-reverse; }
  #panel { width: 100%; flex: 0 0 46%; height: 46%; border-right: 0; border-top: 1px solid var(--rule); padding: 16px; }
  h1 { font-size: 32px; }
  #mapwrap { flex: 1; }
  .card { left: 12px; right: 12px; width: auto; top: auto; bottom: 62px; max-height: 52%; padding: 10px 14px; }
  .card .once { font-size: 24px; }
  .card .lbl { margin-top: 7px; }
  .rose, .cartouche { display: none; }
  .neatline { inset: 6px; }
  .tourbar { bottom: 14px; }
}
