/* =====================================================================
   landmarks.css: the home map card, the Landmarks window, type badges, handle colours,
   the footer's "Show on map" and Undo message.
   ===================================================================== */

/* ---- home map ---- */
.bd-float {
  position: relative;
  z-index: 4;
  display: inline-block;
  max-width: 360px;
  margin: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 12px 30px -16px rgba(46, 58, 67, 0.4);
  pointer-events: auto;
}
.bd-float h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}
.bd-float p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.bd-float .bd-empty-act {
  justify-content: flex-start;
  margin-top: 10px;
}
.bd-float .allbtn {
  height: 30px;
}
.bd-float .allbtn svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.bm-head .bd-float {
  pointer-events: auto;
}
.board.mapmode .bm-head {
  background: none;
}
.bm-head .bd-head {
  background: rgba(251, 248, 242, 0.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  backdrop-filter: blur(4px);
}
.lm-btn.on {
  color: var(--slate);
  background: var(--sky) !important;
  border-color: #b9ccd7;
}
/* ---- landmarks window ---- */
.m-card.wide {
  max-width: 980px;
}
.lm-ctl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 14px;
}
.lm-sw {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}
.lm-sw input {
  width: 16px;
  height: 16px;
  accent-color: #4a6577;
}
.lm-range {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.lm-range span {
  width: 56px;
  color: var(--muted);
}
.lm-range input {
  flex: 1;
  accent-color: #4a6577;
}
.lm-range b {
  width: 40px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lm-prev {
  grid-column: 1/-1;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.lm-prev canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.lm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.lm-area {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 8px;
}
.lm-ah {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 6px;
}
.lm-ah h3 {
  flex: 1;
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}
.lm-all {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 2px;
}
.lm-all.on .box {
  background: var(--accent);
  border-color: var(--accent);
}
.lm-all.part .box {
  background: var(--accent-tint);
  border-color: var(--accent);
}
.lm-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--faint);
  cursor: pointer;
  text-align: left;
}
.lm-item.on {
  color: var(--ink);
}
.lm-item:hover {
  background: var(--soft);
}
.lm-ic {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1.4px solid currentColor;
  border-radius: 8px;
  background: #fff;
  color: var(--faint);
}
.lm-item.on .lm-ic {
  color: #2f4351;
}
.lm-nm {
  flex: 1;
}
.lm-nm small {
  color: var(--faint);
}
.lm-tg {
  width: 30px;
  height: 18px;
  border-radius: 9px;
  background: var(--line-strong);
  position: relative;
  flex: none;
  transition: background var(--t1);
}
.lm-tg::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--t1) var(--spring);
}
.lm-item.on .lm-tg {
  background: #4a6577;
}
.lm-item.on .lm-tg::after {
  transform: translateX(12px);
}
@container (max-width:899px) {
  .lm-ctl {
    grid-template-columns: 1fr;
  }
  .lm-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- type badge on cards ---- */
.pc-type {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 7px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 4px rgba(74, 58, 51, 0.25);
  pointer-events: none;
}
/* ---- each landmark's own size and opacity ---- */
.lm-row {
  border-radius: 8px;
}
.lm-row .lm-item {
  padding: 6px 6px 2px;
}
.lm-own {
  display: flex;
  gap: 10px;
  padding: 0 6px 6px 42px;
}
.lm-own label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--faint);
  font-size: 11px;
}
.lm-own label span {
  display: grid;
  place-items: center;
}
.lm-own input {
  flex: 1;
  min-width: 0;
  height: 14px;
  accent-color: #4a6577;
}
.lm-own b {
  width: 32px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.lm-row:not(.on) .lm-own {
  opacity: 0.35;
  pointer-events: none;
}
.lm-range span {
  width: 84px;
}
/* ---- every panel handle in its own colour from the palette ---- */
:root {
  --h-what: #c9d8e2;
  --h-what-line: #8fa6b5;
  --h-picks: #f8d9cb;
  --h-picks-line: #e5a98e;
  --h-hl: #eadbe8;
  --h-hl-line: #c7a9c4;
  --h-where: #f7dad6;
  --h-where-line: #dfa7a0;
}
.hdl-l {
  background: var(--h-what) !important;
  border-color: var(--h-what-line) !important;
  color: #3e5566 !important;
}
.hdl-t {
  background: var(--h-picks) !important;
  border-color: var(--h-picks-line) !important;
  color: #8a4f37 !important;
}
.hdl-h {
  background: var(--h-hl) !important;
  border-color: var(--h-hl-line) !important;
  color: #6e4f72 !important;
}
.wtab,
.wtab.set {
  background: var(--h-where) !important;
  border-color: var(--h-where-line) !important;
  color: #8e4c52 !important;
}
.hdl span,
.wt-txt,
.hdl .arr,
.wtab .arr {
  color: #3a2f2b !important;
}
.hdl-top .hdl.cur {
  filter: saturate(1.25) brightness(0.97);
}
.road {
  border-top: 3px solid var(--h-what-line) !important;
}
.pt {
  border-top: 3px solid var(--h-picks-line);
}
.pt.is-hl {
  border-top-color: var(--h-hl-line);
}
.wp-card {
  border-top: 3px solid var(--h-where-line);
}
.wt-badge {
  background: #fff !important;
  color: #8e4c52 !important;
  box-shadow: 0 0 0 1.5px var(--h-where-line) !important;
}

.lm-grid {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.lm-own label {
  min-width: 0;
}
.lm-own input {
  width: 100%;
}

/* ---- v27: footer "Show on map", Undo toast ---- */
.foot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.foot .sum {
  flex: 1;
  min-width: 0;
}
.footmap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #e5a98e;
  border-radius: 9px;
  background: #f8d9cb;
  color: var(--slate);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.footmap svg {
  width: 16px;
  height: 16px;
}
.footmap:hover {
  background: #f4cbb8;
}
.footmap[hidden] {
  display: none;
}
.foot .clear:disabled {
  opacity: 0.4;
  cursor: default;
}
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--fh, 56px) + 12px);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  border-radius: 12px;
  background: #2f4351;
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(47, 67, 81, 0.28);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 260ms var(--ease),
    opacity 200ms;
  max-width: calc(100% - 32px);
}
.toast.on {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
.toast button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  height: 30px;
  padding: 0 12px;
  background: #f8d9cb;
  color: #2f4351;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
@container (max-width:899px) {
  .footmap {
    height: 30px;
    padding: 0 10px;
    font-size: 12.5px;
  }
  .foot .clear {
    height: 30px !important;
  }
  .footmap span {
    display: none;
  }
  .footmap {
    width: 38px;
    justify-content: center;
    padding: 0;
  }
}

/* ---- v27: Landmarks — one pair of sliders for whatever is picked ---- */
.lm-ctl {
  position: sticky;
  top: -1px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  box-shadow: 0 6px 16px -10px rgba(47, 67, 81, 0.25);
}
.lm-sws {
  grid-column: 1/-1;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.lm-who {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
}
.lm-ctl.one .lm-who {
  background: color-mix(in srgb, #c9d8e2 45%, #fff);
  border-color: #8fa6b5;
}
.lm-who > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}
.lm-who small {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lm-who b {
  font-size: 14.5px;
}
.lm-who-ic {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
}
.lm-who-ic.all {
  border-radius: 9px;
  background: var(--sky);
  color: var(--slate);
}
.lm-hint {
  font-size: 12.5px;
  color: var(--muted);
}
.lm-flash {
  animation: lmFlash 600ms var(--ease);
}
@keyframes lmFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(143, 166, 181, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(143, 166, 181, 0);
  }
}
.lm-range span {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 78px;
}
.lm-tile {
  display: grid;
  place-items: center;
  background: #fff;
  border: 1.3px solid #4a3a33;
  color: #4a3a33;
  box-shadow: 0 1px 4px rgba(74, 58, 51, 0.22);
  box-sizing: border-box;
  transition:
    width 120ms,
    height 120ms;
}
.lm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 4px;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition:
    background var(--t1),
    border-color var(--t1);
}
.lm-row:hover {
  background: var(--soft);
}
.lm-row.picked {
  background: color-mix(in srgb, #c9d8e2 40%, #fff);
  border-color: #8fa6b5;
}
.lm-row:not(.on) .lm-tslot {
  filter: grayscale(1);
  opacity: 0.35;
}
.lm-row:not(.on) .lm-nm {
  color: var(--faint);
}
.lm-tslot {
  width: 68px;
  min-height: 30px;
  flex: none;
  display: grid;
  place-items: center;
}
.lm-row .lm-nm {
  flex: 1;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lm-own-dot {
  display: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e5a98e;
}
.lm-row.own .lm-own-dot {
  display: inline-block;
}
.lm-row .lm-item {
  width: auto;
  padding: 6px;
  flex: none;
}
.lm-row .lm-item:hover {
  background: none;
}
.lm-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
@container (max-width:899px) {
  .lm-ctl {
    grid-template-columns: 1fr;
  }
  .lm-tslot {
    width: 56px;
  }
}

/* a landmark sticker in the Landmarks window, drawn at its map size */
.lm-stk {
  display: grid;
  place-items: center;
  max-width: 100%;
}
.lm-stk img {
  display: block;
  width: auto;
  object-fit: contain;
  filter: url(#stkEdge) drop-shadow(0 2px 3px rgba(74, 58, 51, 0.3));
}

/* the picture column grows with a big sticker instead of running into the name */
.lm-tslot {
  width: auto;
  min-width: 68px;
}
