/* =====================================================================
   navigator.css: the What navigator. Path bar, panes, levels, rows, footer, place page.
   Computer layout starts at 900 px wide (the @container rules).
   ===================================================================== */

/* =========================================================
   The What navigator
   ========================================================= */
.app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  container-type: inline-size;
  background: var(--ground);
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.3;
}
.tapglow {
  position: absolute;
  z-index: 200;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(91, 75, 196, 0.25);
  transform: translate(-50%, -50%);
  animation: glow 480ms ease-out forwards;
}

/* road map: back · forward · path */
.road {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 10px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-top: 3px solid var(--what);
}
.navbtn {
  appearance: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  transition:
    transform var(--t1) var(--ease),
    opacity var(--t1),
    background var(--t1);
}
.navbtn:active {
  transform: scale(0.92);
}
.navbtn[disabled] {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}
.navbtn.flash {
  animation: flash 600ms ease-out;
}
.path {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 2px;
}
.path::-webkit-scrollbar {
  display: none;
}
.seg-c {
  appearance: none;
  cursor: pointer;
  flex: none;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition:
    background var(--t1),
    color var(--t1),
    border-color var(--t1);
}
.seg-c:hover {
  background: var(--soft);
}
.seg-c.cur {
  background: var(--what);
  color: #fff;
}
.seg-c.ahead {
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  background: #fff;
}
.seg-c.ahead:hover {
  color: var(--ink);
  border-style: solid;
}
.sep {
  flex: none;
  color: var(--faint);
  font-size: 12px;
}

/* panes */
.body {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  transition: transform var(--t3) var(--ease);
}
.layer {
  height: 100%;
  flex: none;
  overflow-y: auto;
  padding: 10px 12px 24px;
  transition:
    opacity var(--t2) ease,
    visibility 0s linear var(--t2);
}
.layer.off {
  opacity: 0;
  visibility: hidden;
}
.layer.cur {
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--t2) ease,
    visibility 0s;
}
.layer.arrive .l-head {
  animation: slidein var(--t3) var(--ease) both;
}
.cols {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}
.col {
  flex: none;
  width: 320px;
  scroll-snap-align: start;
  height: 100%;
  overflow-y: auto;
  padding: 10px 12px 24px;
  border-right: 1px solid var(--line);
  transition:
    opacity var(--t2),
    background var(--t2);
}
.col.curcol {
  background: #fbfbf9;
}
.col.ahead {
  opacity: 0.5;
}
.col.ahead:hover {
  opacity: 1;
}
.col.arrive {
  animation: slidein var(--t3) var(--ease) both;
}

/* level head */
.l-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 2px 0 8px;
}
.l-head h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.l-head .badge {
  margin-right: 2px;
}
.allbtn {
  appearance: none;
  cursor: pointer;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 500;
  transition:
    background var(--t1),
    border-color var(--t1),
    color var(--t1),
    transform var(--t1) var(--ease);
}
.allbtn:active {
  transform: scale(0.95);
}
.allbtn .box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}
.allbtn.on {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
}
.hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.mini-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  background: var(--soft);
  gap: 2px;
  margin: 0 0 8px;
}
.mini-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition:
    background var(--t1),
    color var(--t1),
    box-shadow var(--t1);
}
.mini-seg button[aria-pressed='true'] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(22, 24, 26, 0.12);
}
.gh {
  margin: 14px 2px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.gh:first-child {
  margin-top: 4px;
}

/* the tight list: one card, hairline rows */
.list {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.row {
  display: flex;
  align-items: stretch;
  min-height: 44px;
  border-top: 1px solid var(--line);
  transition: background var(--t1);
}
.row:first-child {
  border-top: 0;
}
.row.on {
  background: var(--accent-wash);
}
.row.path {
  background: color-mix(in srgb, var(--what) 9%, #fff);
  box-shadow: inset 3px 0 0 var(--what);
}
.row.was-here {
  animation: washout 1300ms ease-out;
}
.r-check,
.r-main,
.r-go {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background var(--t1);
}
.r-check {
  width: 42px;
  flex: none;
  justify-content: center;
}
.r-main {
  flex: 1;
  min-width: 0;
  gap: 8px;
  padding: 7px 6px 7px 0;
  text-align: left;
}
.r-go {
  width: 40px;
  flex: none;
  justify-content: center;
  color: var(--muted);
  border-left: 1px solid var(--line);
}
.r-check:hover,
.r-main:hover,
.r-go:hover {
  background: rgba(22, 24, 26, 0.035);
}
.r-check:active,
.r-main:active,
.r-go:active {
  background: rgba(22, 24, 26, 0.07);
}
.r-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}
.r-name small {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  margin-left: 4px;
}
.r-meta {
  flex: none;
  max-width: 42%;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row.going .r-go {
  background: var(--what);
  color: #fff;
}
.r-go svg {
  transition: transform var(--t1) var(--ease);
}
.row.going .r-go svg {
  transform: translateX(3px);
}
.row.place .r-go .door {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
}
.row.place.going .r-go {
  background: #fff;
  color: var(--ink);
}
.row.place.going .r-go .door {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 5px;
  flex: none;
}
.badge {
  min-width: 28px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.box {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--faint);
  background: #fff;
  display: grid;
  place-items: center;
  transition:
    background var(--t1),
    border-color var(--t1),
    transform var(--t1) var(--ease);
}
.box svg {
  grid-area: 1/1;
  opacity: 0;
  transition: opacity var(--t1);
}
.on .box {
  background: var(--accent);
  border-color: var(--accent);
}
.on .box .ck {
  opacity: 1;
}
.part .box {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.part .box .dash {
  opacity: 1;
}
.just .box {
  animation: pop 300ms var(--spring);
}
.empty {
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.empty b {
  color: var(--ink);
  font-weight: 600;
}
.src {
  margin: 10px 2px 0;
  font-size: 11px;
  color: var(--faint);
}

/* footer: what is chosen */
.foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.foot .sum {
  flex: 1;
  min-width: 0;
}
.foot .sum b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.foot .sum span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.foot .clear {
  appearance: none;
  cursor: pointer;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 500;
}
.foot .clear:active {
  transform: scale(0.96);
}
.foot .sum b {
  transform-origin: left center;
}
.foot .sum b.bump {
  animation: pop 380ms var(--spring);
}

/* place window */
.modal {
  position: absolute;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  transition: visibility 0s linear var(--t3);
}
.modal.open {
  visibility: visible;
  transition: visibility 0s;
}
.m-back {
  position: absolute;
  inset: 0;
  background: rgba(22, 24, 26, 0.4);
  opacity: 0;
  transition: opacity var(--t2) ease;
}
.modal.open .m-back {
  opacity: 1;
}
.m-card {
  position: absolute;
  inset: 0;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.06);
  transition:
    transform var(--t3) var(--ease),
    opacity var(--t2) ease;
}
.modal.open .m-card {
  opacity: 1;
  transform: none;
}
.m-band {
  height: 5px;
  flex: none;
}
.m-head {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 0 20px;
}
.m-close {
  appearance: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.m-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 40px;
}
.m-inner {
  max-width: 680px;
  margin: 0 auto;
}
.modal.entering .m-inner > * {
  animation: rise var(--t3) var(--ease) both;
  animation-delay: calc(110ms + var(--i, 0) * 45ms);
}
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.m-name {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.example {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff8e6;
  border: 1px solid #f1dda6;
  font-size: 12px;
  color: #6b4a00;
}
.sec {
  margin-top: 24px;
}
.photos {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 200px;
}
.photo {
  border-radius: 12px;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.photo:first-child {
  grid-row: 1/3;
}
.photo.empty {
  background: repeating-linear-gradient(135deg, #f2f2ee 0 10px, #f7f7f4 10px 20px);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-weight: 500;
  align-items: center;
  justify-content: center;
}
.keyfacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.kf {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ground);
  border: 1px solid var(--line);
}
.kf .k {
  font-size: 12px;
  color: var(--muted);
}
.kf .v {
  font-size: 17px;
  font-weight: 600;
  margin-top: 2px;
}
.kf .v.blank {
  color: var(--faint);
  font-weight: 500;
}
.mapbox {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fbfbf9;
  overflow: hidden;
}
.mapbox svg {
  display: block;
  width: 100%;
  height: auto;
}
.mapbox.empty {
  height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  background: repeating-linear-gradient(135deg, #f2f2ee 0 10px, #f7f7f4 10px 20px);
  border-style: dashed;
}
.legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend i {
  font-style: normal;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}

@container (min-width:900px) {
  .road {
    padding: 10px 16px;
  }
  .m-card {
    inset: 28px max(28px, calc((100% - 760px) / 2));
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(22, 24, 26, 0.25);
  }
  .keyfacts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .photos {
    height: 260px;
  }
}

/* the first step of the path: a house and the city's name */
.seg-c svg {
  vertical-align: -2px;
  margin-right: 5px;
}

/* ---- "Similar nearby" (similar.js) ---- */
.sim-btn {
  margin-left: 8px;
}
.sim-back {
  margin-right: auto;
  margin-left: 12px;
  font-size: 13.5px;
}
.sim-sub {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.sim-tabs {
  margin-bottom: 12px;
}
.sim-tabs button {
  padding: 0 12px;
}
.sim-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.sim-row {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
}
.sim-row:first-child {
  border-top: 0;
}
.sim-row .r-check {
  flex: none;
  width: 44px;
  align-self: stretch;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
}
.sim-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.sim-main:hover {
  background: var(--soft);
}
.sim-pic {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.sim-pic.photo img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 9px;
  border: 2px solid #fff;
  outline: 1.2px solid #4a3a33;
}
.sim-pic svg.drawn {
  width: 40px;
  height: 40px;
  filter: url(#stkEdge);
}
.sim-pic.cut img {
  max-width: 44px;
  max-height: 44px;
  filter: url(#stkEdge);
}
.sim-pic .chain-badge {
  width: 40px;
  font-size: 8.5px;
  border-width: 2px;
  padding: 2px;
}
.sim-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sim-txt b {
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sim-txt small {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sim-dist {
  flex: none;
  font-size: 12.5px;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sim-row.on .sim-txt b {
  color: var(--accent);
}
.sim-more {
  margin: 12px auto 0;
  display: block;
}
.sim-foot {
  margin-top: 16px;
}
.sim-none {
  color: var(--muted);
}
@container (max-width:899px) {
  .sim-dist {
    max-width: 92px;
    white-space: normal;
    text-align: right;
  }
}
