/* The living island (living.html): a full-width stage, the map, the canvas of cats on top,
   and glassy controls over it. */
.lw-page{padding-bottom:clamp(32px,5vw,56px);}
.lw-stage{
  position:relative; width:100%; height:clamp(480px,86vh,940px); overflow:hidden; isolation:isolate;
  /* Space around the globe: deep blue with a scatter of stars. */
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 74%, rgba(255,255,255,.75) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 64%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 88%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 36%, rgba(255,255,255,.65) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 52%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 30%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(ellipse at 50% 120%, #1E2D55 0%, #0B1229 55%, #060914 100%);
}
.lw-map{position:absolute; inset:0;}
.lw-grade{position:absolute; inset:0; pointer-events:none; mix-blend-mode:soft-light; z-index:1; transition:background 2s linear;}
.lw-fx{position:absolute; inset:0; pointer-events:none; z-index:2;}
.lw-vignette{position:absolute; inset:0; pointer-events:none; z-index:2; background:radial-gradient(ellipse 75% 70% at 50% 48%, transparent 55%, rgba(10,14,30,.32) 100%);}

.lw-chip, .lw-btn, .lw-caption, .lw-card{
  background:rgba(255,253,248,.84); color:#2B2622;
  -webkit-backdrop-filter:blur(14px) saturate(1.4); backdrop-filter:blur(14px) saturate(1.4);
  box-shadow:0 6px 22px rgba(15,20,40,.18), inset 0 0 0 1px rgba(255,255,255,.5);
}
.lw-night .lw-chip, .lw-night .lw-btn, .lw-night .lw-caption{background:rgba(22,28,50,.72); color:#EEF0FA; box-shadow:0 6px 22px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08);}

.lw-hud{position:absolute; top:14px; left:14px; right:14px; z-index:4; display:flex; justify-content:space-between; gap:8px; pointer-events:none; flex-wrap:wrap;}
.lw-chip{margin:0; display:inline-flex; align-items:center; gap:7px; padding:8px 14px; border-radius:99px; font-size:14px; font-weight:600; white-space:nowrap;}
.lw-chip svg{width:18px; height:18px; flex:none;}
.lw-brand strong{font-weight:800; letter-spacing:.06em; text-transform:uppercase; font-size:12.5px; color:#D9443F;}
.lw-night .lw-brand strong{color:#FF7A73;}
.lw-sep{opacity:.45;}
.lw-live-dot{width:9px; height:9px; border-radius:50%; background:#E5483F; box-shadow:0 0 0 0 rgba(229,72,63,.6); animation:lw-pulse 1.8s ease-out infinite;}
@keyframes lw-pulse{0%{box-shadow:0 0 0 0 rgba(229,72,63,.55);} 80%,100%{box-shadow:0 0 0 9px rgba(229,72,63,0);}}

.lw-caption{
  position:absolute; left:50%; bottom:74px; transform:translateX(-50%); z-index:4;
  display:flex; align-items:center; gap:10px; max-width:min(640px,calc(100% - 28px));
  padding:9px 18px 9px 10px; border-radius:99px; font-family:'Fraunces',Georgia,serif; font-size:17px; font-weight:600; line-height:1.25;
  pointer-events:none;
}
.lw-caption:empty, .lw-caption:has(#lwCapText:empty){opacity:0;}
.lw-caption img{width:36px; height:36px; border-radius:50%; object-fit:cover; flex:none; box-shadow:0 0 0 2px #fff;}
.lw-caption img[hidden]{display:none;}
.lw-caption:not(:has(img:not([hidden]))){padding-left:18px;}
.lw-cap-in{animation:lw-cap .55s cubic-bezier(.2,.9,.3,1.2);}
@keyframes lw-cap{from{opacity:0; transform:translate(-50%,10px) scale(.96);} to{opacity:1; transform:translate(-50%,0) scale(1);}}

.lw-controls{position:absolute; right:14px; bottom:16px; z-index:4; display:flex; gap:8px;}
.lw-btn{display:inline-flex; align-items:center; gap:6px; border:0; border-radius:99px; padding:9px 14px; font:inherit; font-size:14px; font-weight:700; cursor:pointer; transition:transform .15s ease;}
.lw-btn:hover{transform:translateY(-1px);}
.lw-btn svg{width:17px; height:17px;}
.lw-btn[aria-pressed="true"]{background:#2F6B4F; color:#F4F0E6;}
.lw-btn-icon{padding:9px 11px;}
.lw-stage .maplibregl-ctrl-bottom-left{z-index:4;}
.lw-stage .maplibregl-ctrl-attrib{font-size:11px;}

.lw-card{position:absolute; left:14px; top:66px; z-index:5; width:min(270px,calc(100% - 28px)); padding:16px 18px 15px; border-radius:20px; max-height:calc(100% - 80px); display:flex; flex-direction:column;}
/* On a short map, only the middle scrolls, so the cat's cutout can still sit out over the top. */
.lw-card[hidden]{display:none;}
.lw-card > *{flex:none;}
.lw-card > .lw-latest{flex:0 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;}
.lw-card h3{margin:2px 0 4px; font-family:'Fraunces',Georgia,serif; font-size:23px; line-height:1.15; padding-right:28px;}
.lw-card-has-img{padding-top:100px;}
.lw-card-img{position:absolute; left:50%; top:-14px; transform:translateX(-50%); width:120px; height:120px; object-fit:contain; object-position:bottom; filter:drop-shadow(0 8px 12px rgba(0,0,0,.25));}
.lw-card-no{margin:0; font-size:12px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#8A8174;}
.lw-card-facts{margin:0 0 6px; font-size:14px; color:#5A5248;}
.lw-card-link{font-weight:700; color:#A87B2E; white-space:nowrap;}
.lw-x{position:absolute; top:8px; right:10px; border:0; background:none; color:#8A8174; font-size:24px; line-height:1; cursor:pointer; padding:4px; z-index:1;}

.lw-polaroid{
  position:absolute; left:max(24px,7%); top:72px; z-index:5; width:min(240px,44vw); padding:12px 12px 14px; background:#FFFEFA; color:#2B2622;
  border-radius:4px; box-shadow:0 18px 40px rgba(10,15,35,.35); transform:rotate(-3deg);
  animation:lw-pol-in .9s cubic-bezier(.2,.9,.25,1.25) both; text-align:center;
}
.lw-pol-out{animation:lw-pol-out .5s ease-in both;}
@keyframes lw-pol-in{from{opacity:0; transform:translateY(-60px) rotate(8deg) scale(.8);} to{opacity:1; transform:rotate(-3deg);}}
@keyframes lw-pol-out{to{opacity:0; transform:translateY(-30px) rotate(-8deg) scale(.9);}}
.lw-pol-kicker{margin:0 0 8px; font-size:11.5px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:#D9443F;}
.lw-pol-photo{aspect-ratio:1; background:radial-gradient(circle at 50% 60%, #FCEFD8, #F1DDBE); display:flex; align-items:flex-end; justify-content:center; overflow:hidden;}
.lw-pol-photo img{width:100%; height:100%; object-fit:contain; object-position:bottom;}
.lw-pol-name{margin:10px 0 0; font-family:'Caveat',cursive; font-size:34px; line-height:1;}
.lw-pol-facts{margin:4px 0 0; font-size:13px; color:#6E665C;}
/* Back and Next through a run of new cats; the bar runs down to the next one by itself. */
.lw-pol-nav{display:flex; gap:6px; margin:10px 0 0;}
.lw-pol-step{flex:1; border:0; border-radius:99px; padding:7px 8px; background:#F1E6D3; color:#2B2622; font:inherit; font-size:13px; font-weight:700; cursor:pointer;}
.lw-pol-step:not(:disabled):hover{background:#E8D8BD;}
.lw-pol-step:disabled{opacity:.4; cursor:default;}
.lw-pol-timer{position:absolute; left:12px; right:12px; bottom:5px; height:3px; border-radius:2px; background:#D9443F; transform-origin:left; animation:lw-pol-timer 8.4s linear both;}
@keyframes lw-pol-timer{from{transform:scaleX(1);} to{transform:scaleX(0);}}

.lw-title{margin:18px 0 0; font-family:'Fraunces',Georgia,serif; font-size:clamp(20px,2.4vw,26px); font-weight:600; color:var(--ink);}
.lw-title .eyebrow{display:block; margin-bottom:4px; font-family:inherit;}
.ct-legend{margin:10px 0 0; font-size:13px; color:var(--ink3);}

/* Clean (for filming) and full screen. */
.lw-clean .lw-controls, .lw-clean .maplibregl-ctrl-bottom-left{display:none;}
.lw-full{position:fixed; inset:0; height:100%; z-index:1000;}
.lw-is-full{height:100%;}

@media (max-width:640px){
  .lw-stage{height:clamp(460px,80svh,820px);}
  .lw-hud{top:10px; left:10px; right:10px;}
  .lw-chip{font-size:12.5px; padding:7px 11px;}
  .lw-caption{bottom:66px; font-size:15px;}
  .lw-btn span{display:none;}
  .lw-btn{padding:10px 11px;}
  .lw-controls{right:10px; bottom:12px;}
  .lw-card{top:auto; bottom:118px; left:10px;}
  .lw-polaroid{left:10px; top:54px; width:140px; padding:8px 8px 10px;}
  .lw-pol-name{font-size:24px;}
  .lw-pol-facts{font-size:11px;}
  .lw-polaroid:has(.lw-pol-nav){width:170px;}
  .lw-pol-step{padding:7px 4px; font-size:12px;}
  .lw-pol-timer{left:8px; right:8px; bottom:3px;}
}
@media (prefers-reduced-motion: reduce){
  .lw-live-dot{animation:none;}
  .lw-cap-in, .lw-polaroid, .lw-pol-out{animation:none;}
  .lw-pol-timer{display:none;}
}
.lw-live{padding:0;}

/* Sound, find, share, the reel's titles. */
.lw-snd-on{display:none;}
#lwSound[aria-pressed="true"] .lw-snd-on{display:block;}
#lwSound[aria-pressed="true"] .lw-snd-off{display:none;}
#lwSound[aria-pressed="true"]{background:#2F6B4F; color:#F4F0E6;}

.lw-find{
  position:absolute; right:14px; bottom:66px; z-index:6; width:min(320px,calc(100% - 28px));
  padding:10px; border-radius:20px; background:rgba(255,253,248,.92); color:#2B2622;
  -webkit-backdrop-filter:blur(14px) saturate(1.4); backdrop-filter:blur(14px) saturate(1.4);
  box-shadow:0 10px 30px rgba(15,20,40,.25), inset 0 0 0 1px rgba(255,255,255,.5);
}
.lw-find input{width:100%; box-sizing:border-box; border:0; border-radius:12px; padding:11px 14px; font:inherit; font-size:16px; background:#F3ECDF; color:inherit; outline:none;}
.lw-find input:focus-visible{box-shadow:0 0 0 2px #A87B2E;}
.lw-find ul{list-style:none; margin:8px 0 0; padding:0; max-height:300px; overflow:auto;}
.lw-find li button{display:flex; align-items:center; gap:10px; width:100%; border:0; background:none; padding:7px 8px; border-radius:12px; font:inherit; color:inherit; text-align:left; cursor:pointer;}
.lw-find li button:hover, .lw-find li button:focus-visible{background:#F3ECDF; outline:none;}
.lw-find li img, .lw-find-dot{width:36px; height:36px; border-radius:50%; object-fit:cover; flex:none; background:#E7DCCB;}
.lw-find li strong{display:block; font-size:15px;}
.lw-find li small{display:block; font-size:12.5px; color:#7A7166;}
.lw-find-none{padding:10px; font-size:14px; color:#7A7166;}

.lw-card-acts{display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0 0;}
.lw-share{display:inline-flex; align-items:center; gap:5px; border:0; border-radius:99px; padding:6px 12px; background:#2F6B4F; color:#F4F0E6; font:inherit; font-size:13px; font-weight:700; cursor:pointer;}
.lw-share svg{width:15px; height:15px;}

.lw-reel-title{
  position:absolute; inset:0; z-index:6; display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:0 24px; text-align:center; pointer-events:none; color:#FFFDF6;
  background:radial-gradient(ellipse 70% 50% at 50% 50%, rgba(8,12,28,.42), transparent 75%);
  text-shadow:0 2px 18px rgba(0,0,0,.45);
}
.lw-reel-title p{margin:0;}
.lw-rt-k{font-size:13px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:#F1BA55;}
.lw-rt-t{margin-top:8px !important; font-family:'Fraunces',Georgia,serif; font-size:clamp(30px,5.5vw,60px); font-weight:600; line-height:1.08; max-width:14em;}
.lw-rt-s{margin-top:12px !important; font-size:clamp(16px,2vw,21px); font-weight:600; opacity:.92;}
.lw-rt-in{animation:lw-rt-in 1s cubic-bezier(.2,.8,.2,1) both;}
.lw-rt-out{animation:lw-rt-out .6s ease-in both;}
@keyframes lw-rt-in{from{opacity:0; transform:scale(.94); filter:blur(6px);} to{opacity:1; transform:none; filter:none;}}
@keyframes lw-rt-out{to{opacity:0; transform:scale(1.04);}}
.lw-cap-hide{opacity:0 !important; transition:opacity .4s;}
.lw-reeling .lw-card, .lw-reeling .lw-find{display:none;}

@media (max-width:640px){
  .lw-find{right:10px; bottom:60px; width:calc(100% - 20px);}
  .lw-controls{gap:6px;}
  .lw-btn{padding:10px 10px;}
}
@media (prefers-reduced-motion: reduce){
  .lw-rt-in, .lw-rt-out{animation:none;}
}
.lw-reel-title[hidden], .lw-find[hidden]{display:none;}
.lw-rt-end{background:rgba(10,14,32,.5); -webkit-backdrop-filter:blur(5px) saturate(1.2); backdrop-filter:blur(5px) saturate(1.2);}
.lw-rt-end .lw-rt-t{font-size:clamp(34px,6.5vw,72px);}
@media (max-width:640px){
  /* The card as a compact strip at the top, so the cat it follows stays in view. */
  .lw-card{top:56px; bottom:auto; left:10px; width:calc(100% - 20px); padding:12px 14px 12px; border-radius:18px;}
  .lw-card-has-img{padding-top:12px; padding-left:96px; min-height:84px;}
  .lw-card-img{left:8px; top:50%; transform:translateY(-50%); width:84px; height:84px;}
  .lw-card h3{font-size:19px; margin:0 0 2px;}
  .lw-card-facts{font-size:13px; margin:0 0 2px;}
  .lw-card-acts{margin-top:6px;}
  .lw-card-link{font-size:13.5px;}
  .lw-btn{padding:9px 9px;}
  .lw-btn svg{width:16px; height:16px;}
  .lw-controls{gap:5px;}
}

/* Real news in the caption, and each cat's latest on its card */
.lw-cap-tag{display:none; flex:none; padding:3px 7px 2px; border-radius:999px; background:#2F8F5B; color:#fff; font-size:10.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; line-height:1.2;}
.lw-cap-real .lw-cap-tag{display:inline-block;}
.lw-latest{margin:8px 0 0; padding-top:9px; border-top:1px solid rgba(90,82,72,.16);}
.lw-latest-h{margin:0 0 6px; font-size:11.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#8A8174;}
.lw-latest-ph{display:flex; gap:6px; margin:0 0 8px; padding:0; list-style:none;}
.lw-latest-ph li{flex:0 0 calc((100% - 12px) / 3); min-width:0;}
.lw-latest-ph img{display:block; width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; background:#EFE7DA;}
.lw-latest-ph span{display:block; margin-top:3px; font-size:11px; line-height:1.25; color:#5A5248; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.lw-doing{display:flex; flex-wrap:wrap; gap:5px; margin:0 0 6px; padding:0; list-style:none;}
.lw-doing li{padding:3px 9px; border-radius:999px; font-size:12px; font-weight:600; line-height:1.35; color:#3F5A3A; background:rgba(110,150,96,.15);}
.lw-doing li.lw-doing-watch{color:#9A3B2C; background:rgba(204,90,70,.13);}
.lw-doing-now{margin:0 0 7px; font-size:14px; font-weight:700; color:#3B342C;}
.lw-doing-habit{margin:0 0 9px; font-size:13px; color:#5A5248;}
.lw-latest-row{margin:0 0 3px; font-size:13.5px; color:#5A5248;}
.lw-latest-row b{color:#2B2620;}
.lw-latest-sum{margin:6px 0 0; font-size:13px; line-height:1.4; color:#5A5248; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;}
.lw-latest-know{display:grid; grid-template-columns:1fr auto; gap:4px 8px; align-items:baseline; margin:8px 0 0; font-size:12.5px; color:#5A5248;}
.lw-latest-know b{color:#2B2620;}
.lw-latest-know i{grid-column:1 / -1; display:block; height:5px; border-radius:3px; background:rgba(90,82,72,.14); overflow:hidden;}
.lw-latest-know i::before{content:''; display:block; height:100%; width:var(--k); border-radius:inherit; background:#E0A24A;}
.lw-latest-wait{height:52px; margin:4px 0 0; border-radius:10px; background:linear-gradient(90deg,rgba(90,82,72,.07),rgba(90,82,72,.16),rgba(90,82,72,.07)); background-size:200% 100%; animation:lw-wait 1.2s linear infinite;}
@keyframes lw-wait{to{background-position:-200% 0;}}
@media (prefers-reduced-motion: reduce){.lw-latest-wait{animation:none;}}
@media (max-width:640px){
  .lw-latest{margin-top:6px; padding-top:7px;}
  .lw-latest-ph{gap:5px; margin-bottom:6px;}
  .lw-latest-ph img{border-radius:8px;}
  .lw-latest-row{font-size:12.5px;}
  .lw-latest-sum{-webkit-line-clamp:2; font-size:12.5px;}
  .lw-latest-know{margin-top:6px;}
}
/* Short screens: the card keeps clear of the buttons (its cut-out pokes out the top, so no scrolling). */
@media (max-height:760px){.lw-latest-sum{display:none;} .lw-latest-ph{margin-bottom:6px;}}
@media (max-height:620px){.lw-latest-ph, .lw-latest-know{display:none;}}
/* The caption sizes to its words, not to half the stage. */
.lw-caption{width:max-content;}
@media (max-width:640px){
  .lw-cap-tag{font-size:9.5px; padding:3px 6px 2px;}
  .lw-card-has-img .lw-card-img{top:8px; transform:none;}
  .lw-latest-sum, .lw-latest-know{display:none;}
  .lw-latest-ph img{aspect-ratio:4 / 3;}
}

/* The Live Map (impact.html): the cat list sits close under the map. */
.lm-below{padding-top:clamp(8px,2vw,20px);}

/* The Live Map's hero stays short, so the map shows on landing. */
.lw-page .lm-hero{padding:clamp(16px,2.4vw,28px) 0 clamp(12px,1.6vw,18px);}
.lw-page .lm-hero .page-title{max-width:none; margin-bottom:4px;}
.lw-page .lm-lede{margin:0;}
.lw-page .lm-hero .short-line{max-width:none; margin:8px 0 0; text-align:left; font-size:15px;}
/* On a phone the title says enough: the lede gives its room to the map. */
@media (max-width:640px){ .lw-page .lm-lede{display:none;} .lw-page .lm-hero .page-title{font-size:26px;} .lw-page .lm-hero .short-line{margin-top:6px; font-size:14px;} }

/* Live, the time and the country chips float over the top of the map. */
.lw-top{position:absolute; top:14px; left:50%; transform:translateX(-50%); z-index:4; display:flex; flex-direction:column; align-items:center; gap:8px; max-width:calc(100% - 28px); pointer-events:none; transition:opacity .3s;}
.lw-top > *{pointer-events:auto;}
.lw-top .lm-where{margin:0; justify-content:center;}
.lw-top .cr-sort{background:rgba(255,253,248,.84); color:#2B2622; border-color:transparent; -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); box-shadow:0 4px 14px rgba(15,20,40,.16);}
.lw-top .cr-sort[aria-pressed="true"]{background:#2F6B4F; color:#F4F0E6;}
.lw-night .lw-top .cr-sort:not([aria-pressed="true"]){background:rgba(22,28,50,.72); color:#EEF0FA; box-shadow:0 6px 22px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08);}
.lw-clean .lw-top{display:none;}
/* A country chip scrolls the map up to the top: stop under the sticky header so the totals stay in view. */
.lw-stage{scroll-margin-top:calc(69px + env(safe-area-inset-top,0px));}
/* Too narrow to sit between Live and the clock: it drops under them, and steps aside for a cat's card or an arrival. */
@media (max-width:1180px){
  .lw-top{top:62px;}
  .lw-stage:has(.lw-card:not([hidden])) .lw-top, .lw-stage:has(.lw-polaroid:not([hidden])) .lw-top{opacity:0; pointer-events:none;}
  .lw-stage:has(.lw-card:not([hidden])) .lw-top > *, .lw-stage:has(.lw-polaroid:not([hidden])) .lw-top > *{pointer-events:none;}
}
@media (max-width:640px){
  .lw-top{top:54px; left:10px; right:10px; transform:none; max-width:none; align-items:stretch; gap:6px;}
  .lw-top .lm-where{flex-wrap:nowrap; overflow-x:auto; justify-content:flex-start; scrollbar-width:none;}
  .lw-top .cr-sort{flex:none;}
}

/* The Live Map (impact.html) is the map alone: it fills the screen under the header, the cat list
   floats on its left (a drawer on smaller screens), and everything else sits on the map in three places:
   the towns link, Live and the time at the top left, the numbers in a card at the top right, and two
   toolbars at the bottom right. */
.lm-h1{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
.lw-page.lm-page{padding-bottom:0;}
.lm-page .lw-stage{height:calc(100svh - 69px - env(safe-area-inset-top,0px)); min-height:460px; --side:0px; --gap:14px;}
.lm-page .lw-stage.lw-full{height:100%;}

/* One glass surface for everything on the map, light by day and dark by night. */
.lm-page .lm-bar, .lm-page .lm-tools, .lm-page .lm-towns, .lm-page .lm-nums, .lm-page .lw-top .cr-sort:not([aria-pressed="true"]){
  background:rgba(255,253,248,.88); color:#2B2622;
  -webkit-backdrop-filter:blur(14px) saturate(1.4); backdrop-filter:blur(14px) saturate(1.4);
  box-shadow:0 6px 22px rgba(15,20,40,.16), inset 0 0 0 1px rgba(255,255,255,.55);
}
.lm-page .lw-night .lm-bar, .lm-page .lw-night .lm-tools, .lm-page .lw-night .lm-towns, .lm-page .lw-night .lm-nums, .lm-page .lw-night .lw-top .cr-sort:not([aria-pressed="true"]){
  background:rgba(22,28,50,.76); color:#EEF0FA; box-shadow:0 6px 22px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08);
}

/* The top: on the left the towns link, then Live and the time, the country chips under them; on the right the numbers. */
.lm-page .lw-top{top:var(--gap); left:calc(var(--side) + var(--gap)); right:var(--gap); transform:none; max-width:none; flex-direction:row; flex-wrap:wrap; justify-content:space-between; align-items:flex-start; gap:10px;}
.lm-page .lw-clean .lw-top{display:flex;}
.lm-page .lw-clean .lm-nums, .lm-page .lw-clean .lm-where, .lm-page .lw-clean .lm-towns{display:none;}
.lm-head{display:flex; flex-direction:column; align-items:flex-start; gap:8px; min-width:0;}
.lm-row{display:flex; align-items:center; gap:8px;}
.lm-towns{display:inline-flex; align-items:center; gap:7px; padding:10px 15px 10px 12px; border-radius:99px; font-size:14px; font-weight:700; text-decoration:none; white-space:nowrap; transition:background .15s ease;}
.lm-page .lm-towns{color:#2F6B4F;}
.lm-page .lw-night .lm-towns{color:#8FD3A8;}
.lm-towns svg{width:18px; height:18px; flex:none;}
.lm-towns:hover{text-decoration:underline;}
.lm-bar{display:flex; align-items:center; border-radius:99px; padding:2px;}
.lm-bar .lw-chip, .lw-night .lm-bar .lw-chip{flex:none; background:none; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; color:inherit;}
.lm-bar .lw-brand{padding:8px 10px 8px 12px;}
.lm-bar .lw-brand .lw-sep, .lm-bar #lwCount{display:none;}
.lm-bar .lw-clock{padding:8px 14px 8px 10px; font-weight:700; border-left:1px solid rgba(90,82,72,.16); border-radius:0;}
.lw-night .lm-bar .lw-clock{border-left-color:rgba(255,255,255,.14);}
.lm-bar .lw-clock:empty{display:none;}
.lm-page .lw-top .lm-where{gap:6px;}
.lm-page .lw-top .cr-sort{padding:6px 13px; font-size:13px; border:0;}

/* The numbers: one card, the cat count first, then three by two. */
.lm-nums{list-style:none; margin:0; padding:6px 4px; width:300px; border-radius:18px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr));}
.lm-nums li{display:flex; flex-direction:column; align-items:flex-start; padding:7px 12px; min-width:0;}
.lm-nums b{font-family:'Fraunces',Georgia,serif; font-weight:700; font-size:20px; line-height:1.1; font-variant-numeric:tabular-nums; color:#2B2622;}
.lm-nums span{font-size:11.5px; font-weight:700; line-height:1.25; color:#6A6158; white-space:nowrap;}
.lm-nums small{display:none;}
.lm-nums .lm-main{grid-column:1 / -1; flex-direction:row; align-items:baseline; gap:8px;}
.lm-nums .lm-main{padding-bottom:9px; margin-bottom:3px; border-bottom:1px solid rgba(90,82,72,.14);}
.lm-nums .lm-main b{font-size:30px; color:#2F6B4F;}
.lm-nums .lm-main span{font-size:13.5px; color:#2B2622;}
.lw-night .lm-nums b{color:#EEF0FA;}
.lw-night .lm-nums .lm-main b{color:#8FD3A8;}
.lw-night .lm-nums span, .lw-night .lm-nums .lm-main span{color:#B9BDD3;}
.lw-night .lm-nums .lm-main{border-color:rgba(255,255,255,.14);}

/* The toolbars: what you can do on the map, then the map's own options. */
.lm-page .lw-controls{right:var(--gap); bottom:var(--gap); align-items:flex-end; gap:10px;}
.lm-tools{display:flex; align-items:center; gap:2px; padding:4px; border-radius:99px;}
.lm-tools .lw-btn, .lw-night .lm-tools .lw-btn{background:none; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; color:inherit; padding:9px 14px; transition:background .15s ease, color .15s ease;}
.lm-tools .lw-btn-icon{padding:9px 10px;}
.lm-tools .lw-btn:hover{transform:none; background:rgba(90,82,72,.1);}
.lw-night .lm-tools .lw-btn:hover{background:rgba(255,255,255,.1);}
.lm-tools .lw-btn[aria-pressed="true"], .lm-tools .lw-btn[aria-expanded="true"]{background:#2F6B4F; color:#F4F0E6;}
.lm-tools-x .lw-btn{color:#6A6158;}
.lw-night .lm-tools-x .lw-btn{color:#B9BDD3;}
/* With the list open on a wide screen its own close button is enough. */
.lm-page .lw-stage:not(.lm-closed) #lmSideBtn{display:none;}
.lm-page .lw-find{right:var(--gap); bottom:70px;}

/* The map credits sit at the bottom left. */
.lm-page .maplibregl-ctrl-bottom-left{left:calc(var(--side) + var(--gap) - 10px); bottom:4px;}
.lm-page .lw-caption{bottom:76px;}
.lw-clean .lm-side{display:none;}

/* The cat list. */
.lm-side{
  position:absolute; top:var(--gap); left:var(--gap); bottom:var(--gap); z-index:6; width:380px; display:flex; flex-direction:column; gap:10px;
  padding:16px 14px 14px; border-radius:22px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;
  background:color-mix(in srgb, var(--page-bg) 92%, transparent);
  -webkit-backdrop-filter:blur(14px) saturate(1.3); backdrop-filter:blur(14px) saturate(1.3);
  box-shadow:0 10px 30px rgba(15,20,40,.22);
}
.lm-closed .lm-side{display:none;}
.lm-side-x{position:absolute; top:12px; right:10px; z-index:1; display:grid; place-items:center; width:32px; height:32px; border:0; border-radius:50%; background:rgba(90,82,72,.1); color:var(--ink2); font-size:22px; line-height:1; cursor:pointer;}
.lm-side-x:hover{background:rgba(90,82,72,.18);}
.lm-side .cr{margin:0; padding:0;}
.lm-side .cr-head{padding-right:40px; margin-bottom:10px;}
.lm-side .cr-title{font-size:20px;}
.lm-side .cr-sorts{flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-right:-40px;}
.lm-side .cr-sort{flex:none; padding:5px 10px; font-size:12.5px;}
.lm-side .cr-link{grid-template-columns:22px 56px minmax(0,1fr); padding-right:50px; gap:2px 8px;}
.lm-side .cr-cat{width:56px; height:49px;}
.lm-side .cr-photo{width:49px; height:49px;}
.lm-side .cr-know, .lm-side .cr-badges{grid-column:3;}
.lm-side .cr-badges{justify-content:flex-start; padding-bottom:8px;}
.lm-side .cr-know{flex-direction:row; align-items:center; gap:8px;}
.lm-side .cr-bar{flex:1; max-width:140px;}
.lm-about{font-size:13px; color:var(--ink3);}
.lm-about summary{cursor:pointer; font-weight:700; color:var(--ink2);}
.lm-about .ct-legend{margin-top:6px;}

/* Wide screens: the list sits beside the map's own floating bits, which move over to make room. */
@media (min-width:901px){
  .lm-page .lw-stage:not(.lm-closed):not(.lw-clean){--side:394px;}
  .lm-page .lw-caption{left:calc(50% + var(--side) / 2); max-width:min(640px, calc(100% - var(--side) - 28px));}
  .lm-page .lw-card{left:calc(var(--side) + var(--gap)); top:auto; bottom:70px; max-height:calc(100% - 200px);}
  .lm-page .lw-polaroid{left:calc(var(--side) + 24px); top:auto; bottom:80px;}
}
@media (max-width:1180px) and (min-width:901px){
  .lm-tools .lw-btn:not(.lw-btn-icon) span{display:none;}
  .lm-tools .lw-btn{padding:9px 10px;}
}
/* Smaller screens: the list is a drawer over the map, shut until asked for. */
@media (max-width:900px){
  .lm-page .lw-stage{--gap:10px;}
  .lm-side{width:min(380px, calc(100% - 20px)); z-index:8;}
  .lm-page .lw-stage #lmSideBtn{display:inline-flex;}
  .lm-page .lw-top{top:var(--gap);}
  .lm-page .lw-stage:has(.lw-card:not([hidden])) .lw-top{opacity:1; pointer-events:none;}
  .lm-page .lw-stage:has(.lw-card:not([hidden])) .lw-top > *{pointer-events:auto;}
  .lm-page .lw-card{top:auto; bottom:84px; left:var(--gap);}
}
/* Phones: the towns link and Live share a row, the numbers fill the width under them, the
   toolbar a full-width tab bar, and the map options a small column on the right. */
@media (max-width:640px){
  .lm-page .lw-stage{height:calc(100svh - 62px - env(safe-area-inset-top,0px));}
  .lm-page .lw-top{flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:6px;}
  .lm-head{gap:6px;}
  .lm-row{gap:6px; width:100%;}
  .lm-towns{padding:8px 12px 8px 10px; font-size:13px;}
  .lm-bar .lw-brand{padding:7px 8px 7px 10px;}
  .lm-bar .lw-clock{padding:7px 11px 7px 8px; font-size:12.5px;}
  /* The numbers: the cat count on the left, the other six three by two beside it. */
  .lm-nums{width:100%; padding:4px 2px; border-radius:16px; grid-template-columns:repeat(4,minmax(0,1fr));}
  .lm-nums li, .lm-nums .lm-main{grid-column:auto; flex-direction:column; align-items:flex-start; gap:0; padding:5px 9px; margin:0; border:0;}
  .lm-nums b, .lm-nums .lm-main b{font-size:17px;}
  .lm-nums span, .lm-nums .lm-main span{font-size:10.5px;}
  .lm-nums .lm-main span{color:#6A6158;}
    .lm-nums .lm-main{grid-row:span 2; justify-content:center; padding-right:4px; border-right:1px solid rgba(90,82,72,.14);}
  .lw-night .lm-nums .lm-main{border-right-color:rgba(255,255,255,.14);}
  .lm-nums .lm-main b{font-size:24px;}
  .lm-nums .lm-main span{white-space:normal;}
  .lm-page .lw-top .cr-sort{padding:5px 11px; font-size:12.5px;}

  .lm-page .lw-controls{left:var(--gap); right:var(--gap); bottom:var(--gap); display:block;}
  .lm-tools:not(.lm-tools-x){display:grid; grid-template-columns:repeat(5,1fr); border-radius:18px; padding:4px;}
  .lm-tools:not(.lm-tools-x) .lw-btn{flex-direction:column; gap:2px; padding:7px 2px 6px; border-radius:14px; font-size:11px; font-weight:700;}
  .lm-tools:not(.lm-tools-x) .lw-btn span{display:block; white-space:nowrap;}
  .lm-tools:not(.lm-tools-x) .lw-btn svg{width:19px; height:19px;}
  .lm-tools-x{position:absolute; right:0; bottom:calc(100% + 10px); flex-direction:column; border-radius:22px;}
  .lm-tools-x .lw-btn{padding:9px;}
  .lm-page .lw-find{left:var(--gap); right:var(--gap); width:auto; bottom:82px;}
  .lm-page .maplibregl-ctrl-bottom-left{left:0; bottom:76px;}
  .lm-page .lw-caption{bottom:126px; max-width:calc(100% - 120px); font-size:14px;}
  .lm-page .lw-card{bottom:82px;}
}
