/* Find a place (#555): adapted from the design prototype `surfaces/places`; scoped under .pl-places;
   tokens only. Phone first; at 64 rem the place and search sit left and Saved right. */
.pl-places { display: grid; gap: var(--space-4); min-width: 0; max-width: var(--page-max); margin: var(--space-4) auto 0; }
.pl-places .pl-slot:empty { display: none; }
.pl-card { display: grid; gap: 12px; min-width: 0; padding: var(--space-4); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-card), 0 0 0 1px var(--card-edge); }
.pl-card-head { display: grid; gap: 4px; }
.pl-label { margin: 0; font-size: var(--t-small); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-small); text-transform: uppercase; color: var(--text-muted); }
.pl-head { margin: 0; font-size: var(--t-head); font-weight: var(--weight-heavy); line-height: 1.25; color: var(--text); text-transform: none; letter-spacing: normal; }
.pl-sub { margin: 0; font-size: var(--t-sub); line-height: 1.4; max-width: var(--measure); }
.pl-muted { color: var(--text-muted); }
.pl-acts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--space-4); margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4); border-top: 1px solid var(--line); }
.pl-act { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0; border: 0; background: none; font: inherit; font-weight: var(--weight-bold); color: var(--action); text-decoration: none; text-align: left; white-space: normal; cursor: pointer; }
.pl-acts .pl-act { font-size: var(--t-sub); }
.pl-act:hover { text-decoration: underline; text-underline-offset: 3px; }
.pl-act-sm { padding-left: 8px; }

/* the search box */
.pl-qlabel { display: block; margin-bottom: 6px; }
.pl-input::placeholder { color: var(--text-muted); opacity: 1; }
.pl-input { width: 100%; min-width: 0; min-height: var(--tap); padding: 10px 14px; border-radius: var(--radius-m); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: var(--t-body); font-weight: var(--weight-medium); }
.pl-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.pl-count { margin-top: -6px; }
.pl-results:empty { display: none; }
.pl-done:focus, .pl-saved-count:focus, .pl-none:focus, .pl-full:focus { outline: none; box-shadow: none; }

/* a place row: name (heavy), detail (muted), the arrow; at least 56 px */
.pl-list { display: grid; margin: 0; padding: 0; list-style: none; }
.pl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; border-top: 1px solid var(--line); }
.pl-place { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 56px; padding: 8px 0; min-width: 0; color: var(--text); text-decoration: none; }
.pl-row > .pl-place { grid-column: 1 / -1; }
.pl-row-rm > .pl-place { grid-column: 1; }
.pl-row-rm > .pl-place .pl-go { display: none; }
.pl-t { display: grid; gap: 1px; min-width: 0; }
.pl-name { font-size: 1rem; font-weight: var(--weight-heavy); line-height: 1.3; overflow-wrap: break-word; }
.pl-meta { font-size: var(--t-sub); font-weight: var(--weight-medium); line-height: 1.35; color: var(--text-muted); overflow-wrap: break-word; }
.pl-go { font-size: 1.25rem; font-weight: var(--weight-bold); line-height: 1; color: var(--action); }
.pl-place:hover .pl-name { text-decoration: underline; text-underline-offset: 3px; }
.pl-tag { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-size: var(--t-small); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-small); text-transform: uppercase; line-height: 1.4; color: var(--text-muted); vertical-align: 1px; }
.pl-none { padding-bottom: 4px; }
.pl-pad { height: 6px; }
.pl-saved-count { font-size: var(--t-head); }
.pl-done { font-weight: var(--weight-bold); }

/* the third save opens in place below the place's heading */
.pl-full { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.pl-swap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pl-swapbtn { display: flex; align-items: center; justify-content: flex-start; min-height: var(--tap); padding: 8px 14px; border-radius: var(--radius-m); border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-weight: var(--weight-heavy); color: var(--action); text-align: left; white-space: normal; cursor: pointer; }
.pl-swapbtn:hover { background: var(--action-soft); }
.pl-keep { justify-self: start; }

/* laptop: place and search left, Saved right, Recent under search */
@media (min-width: 1024px) {
  main.is-places { max-width: 64rem; }
  .pl-places { max-width: 64rem; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 24px; align-items: start; grid-template-areas: "cur sav" "search sav" "recent sav"; }
  .pl-a-cur { grid-area: cur; }
  .pl-a-search { grid-area: search; }
  .pl-a-saved { grid-area: sav; }
  .pl-a-recent { grid-area: recent; }
}

@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="reduce"]) .pl-full { animation: pl-open var(--dur) ease-out both; }
}
@keyframes pl-open { from { opacity: 0; } to { opacity: 1; } }
