*{box-sizing:border-box}body{margin:0;background:#f5f8fd;color:#182f48;font:16px/1.45 "DM Sans",system-ui,sans-serif}header{height:72px;background:#123764;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 5vw}.brand{font:600 25px Georgia,serif;display:flex;align-items:center;gap:11px}.logo{background:#a7d8ff;color:#143965;border-radius:11px;width:39px;height:39px;display:grid;place-items:center;font:34px/1 Georgia}.private{font-size:14px;color:#d8e8fc}main{max-width:1500px;margin:auto;padding:32px 5vw}.heading,.row,.actions{display:flex;align-items:center;justify-content:space-between;gap:10px}h1,h2,h3{font-family:Georgia,serif;margin:0;font-weight:500}h1{font-size:clamp(38px,5vw,64px);letter-spacing:-.045em}h2{font-size:27px}button{font:inherit;cursor:pointer;border:1px solid #c5d3e2;border-radius:10px;padding:8px 14px;background:white;color:#182f48}button:hover{background:#ecf4ff}.primary,nav .active{background:#1859a3;color:white;border-color:#1859a3}.primary:hover,nav .active:hover{background:#144780}nav{display:flex;gap:7px;overflow:auto;margin:20px 0}nav button{border-radius:99px;white-space:nowrap;font-size:14px}.mapbox,.collection{border-radius:18px;overflow:hidden;border:1px solid #cad7e6}.mapbox{position:relative;min-height:55vh;background:#d9e7f4}#map{position:absolute;inset:0;overflow:hidden;touch-action:auto;cursor:default}.maptools{position:absolute;right:12px;top:12px;display:grid;gap:4px}.maptools button{font-size:22px;line-height:1;padding:8px}.credit{position:absolute;right:0;bottom:0;background:white;color:#304965;padding:1px 5px;font-size:12px}.collection{background:white;padding:22px}.collection h2{border-bottom:1px solid #dbe4ee;padding-bottom:14px}.collection h2 span{font:14px system-ui;background:#eaf2fc;border-radius:20px;padding:3px 9px;vertical-align:middle}.empty{text-align:center;padding:40px 6px}.empty b{display:block;font:24px Georgia;margin:10px}.empty p,small{color:#50657c}.empty i{font:38px Georgia;color:#497297}.card{display:block;width:100%;text-align:left;border:0;border-radius:0;padding:16px 0;border-bottom:1px solid #e0e8f1}.tag{font-size:13px;background:#e6f0fd;border-radius:99px;padding:3px 9px}.card strong{display:block;margin:7px 0;font-size:18px}.card small{display:block}
.pin {
  --tip-height: 10px;
  position: absolute;
  transform: translate(-50%, -100%);
  width: max-content;
  padding: 0 0 var(--tip-height);
  border: 0;
  background: transparent;
  filter: drop-shadow(0 2px 2px #15365355);
  color: white;
  font-size: 14px;
  font-weight: 600;
}
.pin:hover, .pin:focus-visible { background: transparent; z-index: 2; }
body:has(#pickbar:not([hidden])) .pin { pointer-events: none; }
.pin-label {
  display: block;
  max-width: 150px;
  padding: 5px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #164c88;
  border: 2px solid white;
  border-radius: 10px;
}
.pin::before, .pin::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 12px;
  bottom: 0;
  background: white;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.pin::after { width: 13px; height: 9px; bottom: 3px; background: #164c88; }
dialog{width:min(470px,94vw);max-height:88dvh;border:none;border-radius:18px;color:inherit;padding:24px;box-shadow:0 15px 70px #102f5430}dialog::backdrop{background:#102b4970}label{display:grid;gap:5px;font-size:14px;font-weight:600;margin:14px 0 5px}input,select,textarea{color:inherit;width:100%;font:16px system-ui;border:1px solid #bbcbdc;border-radius:8px;padding:9px;background:#fff}textarea{resize:vertical}.row,.actions{margin-top:14px}.actions{justify-content:flex-end;flex-wrap:wrap}.close[aria-label]{border:0;font-size:23px}.gallery,#thumbs{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.gallery img,#thumbs img{width:80px;height:75px;object-fit:cover;border-radius:8px}.gallery img{width:100%;height:auto}#pickbar,#toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:#183b69;color:white;padding:12px 18px;border-radius:12px;z-index:3;width:max-content;max-width:94vw}#pickbar button{margin-left:8px}dd{margin:3px 0 14px;white-space:pre-wrap;overflow-wrap:anywhere}dt{font-weight:600;font-size:14px}#detail h2{overflow-wrap:anywhere}@media(max-width:720px){header{height:58px}main{padding:20px 4vw}.mapbox{min-height:40dvh}.collection{padding:17px}.empty{padding:15px}.private{font-size:12px}.primary{padding:9px 12px}nav{margin:15px 0}.brand{font-size:22px}}
[hidden]{display:none!important}#chooser{max-width:1000px;margin:0 auto}#chooser>p{color:#50657c}#cities{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin:24px 0}.citycard{text-align:left;padding:22px;background:#fff;border-radius:14px;display:grid;gap:5px}.citycard strong{font:28px Georgia,serif}.citycard span{color:#4a607a;font-size:14px}#newcity{max-width:450px}#newcity div{display:flex;gap:8px}#newcity button{white-space:nowrap}#change{margin-bottom:8px}@media(max-width:550px){#cities{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.citycard{padding:15px}.citycard strong{font-size:22px}}
#matches{max-height:45dvh;overflow:auto}#matches .card{padding:9px 4px}#matches strong{margin:0 0 3px}#custom{margin-top:13px}#searchstate,.source{color:#4c617a;font-size:14px}.source{display:block;margin-top:14px}
.danger{background:#963a35;color:white;border-color:#963a35}.danger:hover{background:#7d302c}.danger:disabled{opacity:.65}
.category-icon{display:inline-block;margin-inline-end:.35em;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}

.list-heading { border-bottom: 1px solid #dbe4ee; padding-bottom: 10px; }
.collection .list-heading h2 { border: 0; padding: 0; }
#nearby { flex: none; min-height: 44px; padding: 6px 12px; font-size: 14px; }
#nearby[aria-pressed="true"] { background: #1859a3; color: white; border-color: #1859a3; }
#nearby[aria-disabled="true"] { cursor: progress; opacity: .7; }
#nearby-status { margin: 8px 0 0; color: #50657c; font-size: 14px; }
#nearby-status:empty { margin: 0; }
#list .place-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 0;
}
.place-thumbnail {
  position: relative;
  width: clamp(54px, 15vw, 64px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: #e6f0fd;
}
.place-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.place-thumbnail-badge {
  position: absolute;
  inset: auto 2px 2px auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid white;
  border-radius: 50%;
  background: #b9d8fa;
  font-size: 13px;
  line-height: 1;
}
.place-thumbnail-badge .category-icon { margin: 0; }
.place-card-details { overflow-wrap: anywhere; }
.place-card-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 8px; }
.place-card-title strong { min-width: 0; }
.place-distance { color: #50657c; font-size: 13px; white-space: nowrap; }
#list .place-card strong { margin: 0; line-height: 1.25; }
.place-card-details small { display: block; margin-top: 2px; }
.place-card-details .tag { display: inline-block; margin-top: 4px; }

#guide{display:flex;flex-direction:column;min-height:calc(100dvh - 136px)}
#change{align-self:flex-start}
#viewtabs{display:inline-flex;align-self:center;background:#e1ebf7;padding:2px;border-radius:9px;gap:1px}
#viewtabs button{border:0;background:transparent;min-width:40px;min-height:32px;padding:3px 8px;font-size:14px;border-radius:7px}
#viewtabs button[aria-selected=true]{background:#1859a3;color:white}
.citypanels{flex:1;display:flex;flex-direction:column}
#mappanel{flex:1;min-height:320px}
@media(max-width:720px){#guide{min-height:calc(100dvh - 98px)}}
.location-dot{position:absolute;pointer-events:none;z-index:1;width:16px;height:16px;border-radius:50%;background:#1675cb;border:3px solid white;box-shadow:0 0 0 5px #267ed844;transform:translate(-50%,-50%)}.maptools,.credit{z-index:2}#locationHelp a{color:#164f94}
#googlelookup{display:block;margin-top:14px;color:#164f94}
#cityselect{min-width:0;width:10em;max-width:38%;flex:0 1 auto;font:500 17px/1.2 Georgia,serif;color:#14345c;padding:5px 4px;min-height:36px;cursor:pointer}#guide>.heading>.primary{flex-shrink:0}#newcity .actions{justify-content:flex-end}

#guide>.heading{justify-content:flex-start;gap:6px}#guide>.heading>#add{margin-left:auto;font-size:14px;padding:6px 9px;min-height:36px}#guide>#filters{margin:8px 0} @media(max-width:720px){main{padding-block:10px}#guide{min-height:calc(100dvh - 78px)}}

.map-toolbar > .heading { justify-content: flex-start; }
.map-toolbar #add { margin-left: auto; white-space: nowrap; }

body:has(#guide:not([hidden]) #mappanel:not([hidden])) {
  --edge: clamp(10px, 2vw, 22px);
  --top: max(var(--edge), env(safe-area-inset-top));
  --shadow: 0 2px 10px #17385226;
  overflow: hidden;
}
#guide:has(#mappanel:not([hidden])) #mappanel {
  position: fixed;
  inset: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  touch-action: none;
}
#guide:has(#mappanel:not([hidden])) .map-toolbar {
  position: fixed;
  z-index: 3;
  top: var(--top);
  left: var(--edge);
  right: var(--edge);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  pointer-events: none;
}
.map-toolbar .heading > *, .map-toolbar nav button { pointer-events: auto; }
#guide:has(#mappanel:not([hidden])) .heading { gap: 6px; flex-wrap: nowrap; }
#guide:has(#mappanel:not([hidden])) .heading > * {
  box-shadow: var(--shadow);
  touch-action: none;
}
.map-toolbar #viewtabs { background: #f5f8fd; }
#guide:has(#mappanel:not([hidden])) #add { margin-left: auto; padding: 6px 10px; font-size: 14px; min-height: 36px; }
#guide:has(#mappanel:not([hidden])) #filters {
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 2px 0 5px;
  pointer-events: auto;
  scrollbar-width: thin;
  touch-action: pan-x;
}
.maptools { top: auto; bottom: max(30px, calc(env(safe-area-inset-bottom) + 24px)); gap: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.maptools button { width: 44px; height: 44px; border-radius: 0; border: 0; }
.maptools button + button { border-top: 1px solid #dbe4ee; }
.credit { padding-bottom: env(safe-area-inset-bottom); }
body:has(#pickbar:not([hidden])) :is(header,.map-toolbar) { visibility: hidden; }

.map-toolbar { min-width: 0; }
.map-toolbar > .heading { gap: 6px; }
.toolbar-brand {
  display: flex;
  align-items: center;
  flex: none;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 12px;
  background: #123764;
  color: white;
  font: 600 20px Georgia, serif;
  white-space: nowrap;
}
.toolbar-brand .logo { width: 34px; height: 34px; font-size: 27px; }
.map-toolbar #viewtabs, .map-toolbar #add { flex: none; }
.map-toolbar #cityselect { flex: 0 1 10em; width: 0; }
@media (max-width: 540px) {
  .toolbar-brand { padding: 4px; }
  .toolbar-brand .brand-name { display: none; }
  .map-toolbar #cityselect { font-size: 16px; }
}

#guide:has(#mappanel:not([hidden])) #add,
.map-toolbar #add { margin-left: 0; }
#filters {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  gap: 6px;
}
#filters button {
  flex: 0 0 auto;
  white-space: nowrap;
}
