/* =====================================================================
   maps.css: consistency pass (two weights, three radii), the board on the phone, photos,
   the board map, Where as a map, view switches.
   ===================================================================== */

/* =====================================================================
   Consistency pass: two weights (400 / 600), three radii (6 · 8 · 12)
   ===================================================================== */
.gh,
.fs-h,
.eyebrow,
.ftray-t,
.wt-txt,
.hdl span,
.cc-n,
.sh-head .gh {
  font-weight: 600;
}
.r-count em,
.bl-count em,
.ccard b,
.cc-txt b,
.peek-go b,
.seg-c.cur {
  font-weight: 600;
}
.chipbtn,
.allbtn,
.pbtn,
.clear,
.bl-search,
.seg-c,
.mini-seg button {
  border-radius: 8px;
}
.list,
.ccard,
.wp-list,
.ftray:not(:empty),
.bd-empty {
  border-radius: 12px;
}

.bd-head > .bd-act {
  flex: none;
}
.wp-foot .clear {
  height: 40px;
  font-size: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: none;
}
.keyfacts .v {
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

/* board on the phone: edge to edge, compact headings */
@container (max-width:899px) {
  .board {
    padding: 30px 14px 110px;
  }
  .bd-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .bd-head h2 {
    font-size: 18px;
  }
  .bd-sh h3 small {
    display: none;
  }
  .bd-sh .linkbtn {
    white-space: nowrap;
  }
  .bd-row {
    grid-auto-columns: 150px;
    margin: 0 -14px;
    padding: 2px 14px 8px;
    scroll-padding: 0 14px;
  }
  .pc-img {
    height: 58px;
  }
}

/* photos */
.pc-img.photo {
  position: relative;
  overflow: hidden;
  background: var(--soft);
}
.pc-img.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}
@media (hover: hover) {
  .pcard:hover .pc-img.photo img {
    transform: scale(1.05);
  }
}
.m-photo {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
}
.m-photo img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}
.m-photo figcaption {
  padding: 7px 10px;
  font-size: 11.5px;
  color: var(--muted);
}
.m-photo figcaption a {
  color: var(--slate);
}

/* no width animation on the What panel: it takes its new width at once, the new column slides in */
@container (min-width:900px) {
  .pl {
    transition: transform 460ms var(--spr);
  }
}
.cols {
  scroll-behavior: auto;
}

/* ---- board map ---- */
.bd-act {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bd-act .mini-seg button {
  height: 26px;
  font-size: 12px;
  padding: 0 10px;
}
.board.mapmode {
  overflow: hidden;
  padding: 0;
}
.bm-head {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  padding: 22px 64px 12px;
  background: linear-gradient(var(--ground) 70%, rgba(247, 244, 239, 0));
  pointer-events: none;
}
.bm-head .bd-head {
  margin: 0;
  pointer-events: auto;
}
.bmap {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
}
.bmap canvas {
  display: block;
}
.bm-tip {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -100%);
  background: var(--slate);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms;
}
.bm-tip.on {
  opacity: 1;
}
.bm-tools {
  position: absolute;
  z-index: 3;
  right: 64px;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bm-tools .pbtn {
  width: 32px;
  height: 32px;
  font-size: 17px;
  color: var(--slate);
  background: var(--surface);
}
.bm-legend {
  position: absolute;
  z-index: 3;
  left: 64px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 128px);
}
.bm-fam {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  transition:
    opacity var(--t1),
    background var(--t1);
}
.bm-fam i {
  font-style: normal;
  color: var(--faint);
  font-size: 11px;
}
.bm-fam.off {
  opacity: 0.45;
  background: transparent;
}
@container (max-width:899px) {
  .bm-head {
    padding: 28px 14px 10px;
  }
  .bm-tools {
    right: 14px;
    top: auto;
    bottom: 130px;
  }
  .bm-legend {
    left: 14px;
    right: 14px;
    max-width: none;
    bottom: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .bm-fam span {
    white-space: nowrap;
  }
}

/* ---- Where as a map ---- */
.wview {
  margin: 0 0 8px;
}
.wview button {
  height: 26px;
  font-size: 12px;
  padding: 0 12px;
}
.wp-mapbody {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.amap {
  position: relative;
  flex: 1;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--ground) radial-gradient(circle at 1px 1px, rgba(46, 58, 67, 0.06) 1px, transparent 0) 0 0/14px 14px;
  touch-action: none;
  cursor: grab;
}
.amap canvas {
  display: block;
}
.am-tools {
  position: absolute;
  right: 8px;
  top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.am-tools .pbtn {
  width: 30px;
  height: 30px;
  font-size: 16px;
  color: var(--slate);
  background: var(--surface);
}
.am-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-height: 34px;
  flex-wrap: wrap;
}
.am-bar .am-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.am-bar b {
  font-weight: 600;
}
.am-bar.hint {
  font-size: 12.5px;
  color: var(--muted);
}
.am-bar .allbtn {
  height: 30px;
}
.am-bar .chipbtn {
  height: 30px;
}

@container (max-width:899px) {
  .app.r-open .wtab {
    bottom: auto;
    top: 46%;
  }
}

/* ---- view switches with icons: big, obvious ---- */
.vsw {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 11px;
  background: var(--soft);
  border: 1px solid var(--line);
}
.vsw button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition:
    background var(--t1),
    color var(--t1),
    box-shadow var(--t1);
}
.vsw button svg {
  flex: none;
}
.vsw button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--slate);
  border-color: var(--line-strong);
  box-shadow: 0 1px 3px rgba(46, 58, 67, 0.12);
}
.vsw button[aria-pressed='true'] svg {
  color: var(--accent);
}
@media (hover: hover) {
  .vsw button:not([aria-pressed='true']):hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.6);
  }
}
/* ---- Where header: one line, switch on the right ---- */
.wp-head {
  align-items: center;
  padding: 12px 14px;
}
.wp-head h2 {
  flex: 1;
  margin: 0;
  font-size: 19px;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.wp-head h2 .eyebrow {
  font-size: 10.5px;
  margin-bottom: 2px;
}
.wp-head .vsw button {
  height: 34px;
}
.wview {
  display: none;
}

/* ---- palette through the page ---- */
:root {
  --blush: #f7d3cf;
  --lilac: #e3cde0;
  --cream: #f8ebd8;
  --stone: #d9cbc0;
  --peri: #a9aec4;
}
.road {
  border-top-color: #a9c1cf;
}
.ccard {
  border-top: 3px solid color-mix(in srgb, var(--cc) 55%, #fff);
}
.cc-ic {
  background: color-mix(in srgb, var(--cc) 16%, #fff);
}
.pc-img {
  background: color-mix(in srgb, var(--tint) 16%, #fff)
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--tint) 24%, transparent) 1px, transparent 0) 0 0/12px
    12px;
}
.bd-empty-ic {
  background: var(--blush);
  color: #8e5d66;
}
.wt-badge {
  background: var(--blush);
  color: #8e5d66;
  box-shadow: 0 0 0 1.5px #e2b6bc;
}
.lw-band,
.m-band {
  opacity: 0.75;
}
.board {
  background: linear-gradient(180deg, rgba(248, 235, 216, 0.35), rgba(220, 238, 243, 0.25));
}
.mid {
  background: var(--ground) radial-gradient(circle at 1px 1px, rgba(46, 58, 67, 0.06) 1px, transparent 0) 0 0/18px 18px;
}
.amap {
  background: #f3f1ec;
}

/* the quiet-map switch: only there when places are on the map; filled while the map is quiet */
.quiet-btn[hidden] {
  display: none;
}
.quiet-btn[aria-pressed='true'] {
  background: var(--sky);
}

/* ---- a pile of places on the map, listed in a sheet (map-fan.js) ---- */
.bm-sheet {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 6;
  width: min(420px, calc(100% - 24px));
  max-height: 55%;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 18px 40px -14px rgba(47, 67, 81, 0.45);
  transform: translate(-50%, 110%);
  opacity: 0;
  transition:
    transform 340ms var(--spring),
    opacity 200ms;
}
.bm-sheet.open {
  transform: translate(-50%, 0);
  opacity: 1;
}
.bms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 8px 16px;
}
.bms-head .m-close {
  position: static;
}
.bms-list {
  overflow: auto;
  margin: 0 8px 8px;
}
