/* =====================================================================
   phone.css: adjustments that make the guide easier on a phone.
   Everything here only applies under 900 px wide.
   ===================================================================== */
@container (max-width:899px) {
  /* ---- the two side ears: the same slim tab, mirrored ---- */
  .hdl-l,
  .wtab {
    width: 34px !important;
    min-height: 104px !important;
    bottom: auto !important;
    margin-top: 0 !important;
    padding: 10px 2px !important;
    gap: 6px !important;
  }
  .hdl-l {
    top: 34% !important;
    border-radius: 0 17px 17px 0 !important;
  }
  .wtab {
    top: 54% !important;
    right: 0;
    border-radius: 17px 0 0 17px !important;
  }
  .hdl-l span,
  .wt-txt {
    display: block !important;
    writing-mode: vertical-rl;
    max-width: none !important;
    max-height: 64px;
    font-size: 12px !important;
    letter-spacing: 0.03em;
  }
  .wt-pin svg {
    width: 17px;
    height: 17px;
  }
  /* Where open: the panel leaves a 34 px strip on the left, and its ear sits there */
  .wp-card {
    width: calc(100% - 34px);
  }
  .app.r-open .wtab {
    left: 0;
    right: auto;
    border-radius: 17px 0 0 17px !important;
    border-right: 0 !important;
    border-left: 1px solid var(--h-where-line) !important;
  }
  .wp-back {
    background: rgba(22, 24, 26, 0.18);
  }
  /* a long list window leaves the same strip for the What ear, so it never covers the letters */
  .app.l-open .lw {
    right: 34px;
  }
  /* while a top panel is open, the side ears step aside: the panel closes with its own tab */
  .app.t-open .hdl-l,
  .app.t-open .wtab {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* ---- big enough for a thumb: 32 px at least ---- */
  .bl-row .mini-seg button,
  .bl-row .chipbtn,
  .tv-tools .mini-seg button,
  .tv-tools .chipbtn {
    min-height: 32px;
  }
  .row.fchip .r-check {
    min-width: 32px;
    min-height: 32px;
  }

  /* ---- nothing under 12 px ---- */
  .gh,
  .eyebrow,
  .cc-n,
  .cc-line,
  .r-count,
  .src,
  .pc-where,
  .pc-meta {
    font-size: max(12px, 1em) !important;
  }

  /* ---- Similar nearby: the distance goes under the name, so the name gets the width ---- */
  .sim-main {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 0;
  }
  .sim-pic {
    grid-row: span 2;
  }
  .sim-dist {
    grid-column: 2;
    max-width: none;
    text-align: left;
    color: var(--muted);
  }

  /* ---- the "Narrow it to an area?" hint sits above the footer, out of the list's way ---- */
  .peek {
    top: auto !important;
    bottom: 12px !important;
    right: 44px !important;
    max-width: 240px;
    margin-top: 0 !important;
  }
  .peek-go {
    font-size: 12.5px;
  }

  /* ---- Picks on first load: two and a half cards, so the row clearly scrolls ---- */
  .ccard.mini {
    width: 142px;
  }

  /* ---- Landmarks window: the hint gets its own line under the name ---- */
  .lm-who {
    flex-wrap: wrap;
  }
  .lm-hint {
    flex-basis: 100%;
    padding-left: 44px;
  }
}
@container (max-width:899px) {
  .row.fchip .r-check .box {
    width: 18px;
    height: 18px;
  }
}
@container (max-width:899px) {
  /* the hint sits just above the footer, never on it */
  .peek {
    bottom: calc(var(--fh, 56px) + 10px) !important;
  }
  /* map buttons move in from the edge, so the Where ear never covers them */
  .bm-tools {
    right: 46px !important;
  }
}
@container (max-width:899px) {
  /* the list of a pile of places stays clear of both ears */
  .bm-sheet {
    width: calc(100% - 84px);
  }
}

/* full screen: only on the phone, where the browser bars take room */
.fs-btn {
  display: none;
}
@container (max-width:899px) {
  .fs-btn {
    display: grid;
  }
  /* lists and panels keep their scrolling to themselves */
  .body,
  .layer,
  .lw-scroll,
  .wp-list,
  .m-body,
  .st-body,
  .shelf {
    overscroll-behavior: contain;
  }
}
