/* My places, the rail and the phone drawer (MVP wave a1, 2026-10-19): js/my-places/view.js. */
/*
   The phone drawer's row grammar for the rail's My Trip and Saved: a 44 px thumbnail, the name, kind · area, one ⋯
   (~56 px rows). Baekja tokens only (no hex, no raw colour functions: __tests__/unit/myplaces/wiring.test.js reads
   this file). Every rule sits under #left-content .tbmp (the rail and the phone drawer, which adopts #left-content)
   or body.tb-page (the picker lives on body, the first-trip sheet on the drawer beside #left-content), so the home's
   bare h3, h4, p, a, button:hover and focus rules cannot win. No gold: My places has none (celadon buttons, celadon
   links).
*/

.tbmp,
.tbmp-pick,
.tbmp-sheet { --tbmp-serif: 'Newsreader', 'Pretendard', Georgia, serif; }

.tbmp[hidden], .tbmp [hidden],
.tbmp-pick[hidden], .tbmp-pick [hidden],
.tbmp-sheet[hidden], .tbmp-sheet [hidden] { display: none !important; }

/* ---------------------------------------------------------------- the view */
#left-content .tbmp {
  font-family: var(--font-sans); color: var(--color-ink); line-height: 1.45;
  padding: 4px 0 28px; margin: 0;
}
#left-content .tbmp .tbmp-ico { display: block; flex: none; }
#left-content .tbmp .sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
#left-content .tbmp-sec { margin: 0 0 16px; padding: 0; }
#left-content .tbmp-head {
  font-family: var(--tbmp-serif); font-weight: 400; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em;
  color: var(--color-ink); margin: 8px 8px 8px; padding: 0;
}
#left-content .tbmp-head:focus { outline: none; }
#left-content .tbmp-head:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: var(--radius-sm); }
#left-content .tbmp-list { list-style: none; margin: 0; padding: 0; }
#left-content .tbmp-item { position: relative; margin: 0; padding: 0; list-style: none; }
#left-content .tbmp-row { display: flex; align-items: center; gap: 2px; margin: 0; }

#left-content .tbmp-row__main {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-start; gap: 12px;
  min-height: 56px; padding: 6px 8px; margin: 0;
  background: none; border: 0; border-radius: var(--radius-md); box-shadow: none;
  font-family: var(--font-sans); font-size: 15px; font-weight: 400; line-height: 1.3;
  color: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
#left-content div.tbmp-row__main { cursor: default; }
#left-content .tbmp-row__main:hover { background: var(--color-base-sunk); border-color: transparent; color: inherit; text-decoration: none; }
#left-content div.tbmp-row__main:hover { background: none; }
#left-content a.tbmp-row__main,
#left-content a.tbmp-row__main:hover,
#left-content a.tbmp-row__main:focus,
#left-content a.tbmp-row__main:visited { color: inherit; text-decoration: none; }

#left-content .tbmp-thumb {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--color-base-sunk); color: var(--color-ink-muted);
  display: inline-flex; align-items: center; justify-content: center;
}
#left-content .tbmp-thumb__img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
#left-content .tbmp-num {
  position: absolute; top: -5px; left: -5px; min-width: 19px; height: 19px; padding: 0 5px; box-sizing: border-box;
  border-radius: var(--radius-pill); background: var(--color-celadon-deep); color: var(--text-on-celadon);
  font-family: var(--font-sans); font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
  box-shadow: 0 0 0 2px var(--color-base);
}
#left-content .tbmp-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#left-content .tbmp-row__name {
  font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--color-ink); overflow-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#left-content .tbmp-row--unlisted .tbmp-row__name { font-weight: 500; color: var(--color-ink-muted); }
#left-content .tbmp-row__sub {
  font-size: 12.5px; font-weight: 400; line-height: 1.4; color: var(--color-ink-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* "dates · count" may take a second line rather than lose the count: every row in the drawer (narrower than the rail)
   and a trip's row on both surfaces (a date range filled the rail's line and the ellipsis took the count) */
#left-content .tbmp[data-tbmp-surface="drawer"] .tbmp-row__sub,
#left-content [data-tbmp-act="open-trip"] .tbmp-row__sub {
  white-space: normal; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
#left-content .tbmp-row__go { flex: none; display: inline-flex; color: var(--color-ink-faint); }

/* the one action per row (and the first-trip sheet's ×) */
#left-content .tbmp-more,
body.tb-page .tbmp-sheet .tbmp-more {
  flex: none; width: 38px; height: 38px; min-height: 0; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; margin: 0; background: none; border: 0; border-radius: var(--radius-circle); box-shadow: none;
  color: var(--color-ink-muted); cursor: pointer;
}
#left-content .tbmp-more:hover,
#left-content .tbmp-more[aria-expanded="true"],
body.tb-page .tbmp-sheet .tbmp-more:hover { background: var(--color-base-sunk); border-color: transparent; color: var(--color-ink); }
#left-content .tbmp-more[aria-pressed="true"] { color: var(--color-celadon-deep); }

/* a ⋯ menu: words with glyphs (not a writing surface) */
#left-content .tbmp-menu {
  position: absolute; z-index: 30; right: 4px; top: 52px; min-width: 216px; max-width: calc(100% - 8px);
  margin: 0; padding: 6px; list-style: none; box-sizing: border-box;
  background: var(--color-base-2); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay);
}
#left-content .tbmp-trip-head > .tbmp-menu { top: 46px; right: 0; }
#left-content .tbmp-menu li { margin: 0; padding: 0; list-style: none; }
#left-content .tbmp-menu__item {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px; margin: 0;
  background: none; border: 0; border-radius: var(--radius-sm); box-shadow: none;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--color-ink);
  text-align: left; cursor: pointer;
}
#left-content .tbmp-menu__item .tbmp-ico { color: var(--color-celadon-deep); }
#left-content .tbmp-menu__item:hover,
#left-content .tbmp-menu__item:focus { background: var(--color-base-sunk); border-color: transparent; color: var(--color-ink); }

/* the note line, under the row's words */
#left-content .tbmp-note {
  margin: -2px 8px 8px 64px; padding: 0; font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--color-ink-muted);
}
#left-content .tbmp-note__k { font-weight: 600; color: var(--color-celadon-deep); margin-right: 2px; }
/* the label's colon: read and copied, clipped from sight (inline, so a copy stays one line: "Note: text") */
#left-content .tbmp-note__c {
  display: inline-block; width: 1px; height: 1px; margin-right: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* the text beside the label (inline-block: every line of a long or joined note sits under the text, never under the
   label; 3.4em holds Note, 메모, メモ and the space) */
#left-content .tbmp-note__t {
  display: inline-block; vertical-align: top; max-width: calc(100% - 3.4em); white-space: pre-line; overflow-wrap: break-word;
}

/* walking minutes between two listed stops: in the flow, on the line that joins the thumbnails */
#left-content .tbmp-leg {
  margin: 0 8px 0 29px; padding: 2px 0 2px 33px; border-left: 1px dashed var(--color-line-strong);
  font-size: 12.5px; font-weight: 400; line-height: 1.5; color: var(--color-ink-muted);
}

/* the trip's own head */
#left-content .tbmp-back {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 4px; min-height: 34px; padding: 4px 10px 4px 4px; margin: 0 0 2px;
  background: none; border: 0; border-radius: var(--radius-sm); box-shadow: none;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; line-height: 1.2; color: var(--color-celadon-deep); cursor: pointer;
}
#left-content .tbmp-back:hover { background: var(--color-base-sunk); border-color: transparent; color: var(--color-celadon-deep); }
#left-content .tbmp-trip-head { position: relative; display: flex; align-items: flex-start; gap: 4px; margin: 0; }
#left-content .tbmp-trip-head .tbmp-head { flex: 1; min-width: 0; margin-bottom: 2px; overflow-wrap: break-word; }
#left-content .tbmp-trip-head .tbmp-more { margin-top: 4px; }
#left-content .tbmp-datesline { margin: 0 8px 12px; padding: 0; font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--color-ink-muted); }

/* + New trip, + Add a place: a row of their own, never a dashed box over the list */
#left-content .tbmp-add {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 56px; padding: 6px 8px; margin: 2px 0 0;
  background: none; border: 0; border-radius: var(--radius-md); box-shadow: none;
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--color-celadon-deep);
  text-align: left; cursor: pointer;
}
#left-content .tbmp-add:hover { background: var(--color-celadon-soft); border-color: transparent; color: var(--color-celadon-deep); }
#left-content .tbmp-add__tile {
  flex: none; width: 44px; height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  border: 1px dashed var(--color-celadon); border-radius: var(--radius-sm); color: var(--color-celadon-deep);
}

/* Add a place: the saved places not in the trip, several in a row until Done */
#left-content .tbmp-pickpanel {
  margin: 4px 0 12px; padding: 8px 0 10px; display: flex; flex-direction: column; gap: 2px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
#left-content .tbmp-pickpanel__head { margin: 2px 8px 2px; padding: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--color-ink-muted); }
#left-content .tbmp-pickpanel .tbmp-row__go { color: var(--color-celadon-deep); }
#left-content .tbmp-pickpanel > .tbmp-btn { align-self: flex-end; margin: 6px 8px 0; }

/* the cap and the membership door (only while the cap is known) */
#left-content .tbmp-cap {
  margin: 8px 8px 12px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-base-sunk);
  font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--color-ink-muted);
}
/* the line takes focus when the trip fills from the Add a place panel (a keyboard visitor reads why it closed) */
#left-content .tbmp-cap:focus { outline: none; }
#left-content .tbmp-cap:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
#left-content .tbmp-cap a,
#left-content .tbmp-cap a:hover,
#left-content .tbmp-cap a:focus,
#left-content .tbmp-cap a:visited {
  color: var(--color-celadon-deep); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--color-celadon);
}

/* the bridge to the paid plan: one quiet celadon line, its underline its own border */
#left-content .tbmp-plan,
#left-content .tbmp-plan:visited,
#left-content .tbmp-plan:focus {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 8px 4px; padding: 0 0 2px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--color-celadon-deep);
  text-decoration: none; border-bottom: 1px solid var(--border-strong);
}
#left-content .tbmp-plan:hover { color: var(--color-celadon-deep); text-decoration: none; border-bottom-color: var(--color-celadon); }
#left-content .tbmp-planslot { margin: 0; padding: 0; }

/* empty states: celadon disc, serif title, italic line (upright sans in Korean and Japanese) */
#left-content .tbmp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 16px 18px; margin: 0; }
#left-content .tbmp-empty__disc {
  width: 54px; height: 54px; border-radius: var(--radius-circle); margin: 0 0 4px;
  background: var(--color-celadon-soft); color: var(--color-celadon-deep);
  display: flex; align-items: center; justify-content: center;
}
#left-content .tbmp-empty h4 {
  margin: 0; padding: 0; font-family: var(--tbmp-serif); font-weight: 400; font-size: 22px; line-height: 1.25;
  letter-spacing: -0.01em; color: var(--color-ink);
}
#left-content .tbmp-empty p {
  margin: 0; padding: 0; max-width: 30ch; font-family: var(--tbmp-serif); font-style: italic; font-weight: 400;
  font-size: 15.5px; line-height: 1.5; color: var(--color-ink-muted);
}
html[lang|="ko"] #left-content .tbmp-empty p,
html[lang|="ja"] #left-content .tbmp-empty p { font-style: normal; font-family: var(--font-sans); font-size: 14.5px; }
#left-content .tbmp-empty .tbmp-btn { margin-top: 6px; }

/* states, the sync line, the search */
#left-content .tbmp-state { margin: 0; padding: 6px 8px; font-size: 13.5px; font-weight: 400; line-height: 1.5; color: var(--color-ink-muted); }
#left-content .tbmp-loading { margin: 0; padding: 18px 8px; font-size: 13.5px; font-weight: 400; line-height: 1.5; color: var(--color-ink-muted); }
#left-content .tbmp-syncslot,
#left-content .tbmp-savedstate { margin: 0; padding: 0; }
#left-content .tbmp-sync {
  margin: 4px 8px 12px; padding: 9px 12px; border-radius: var(--radius-md); background: var(--color-gold-soft);
  font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--color-ink);
}
#left-content .tbmp-linkbtn {
  display: inline; min-height: 0; padding: 0; margin: 0; background: none; border: 0; border-bottom: 1px solid var(--color-celadon);
  border-radius: 0; box-shadow: none; font: inherit; font-weight: 600; color: var(--color-celadon-deep); cursor: pointer;
}
#left-content .tbmp-linkbtn:hover { background: none; border-color: var(--color-celadon-deep); color: var(--color-celadon-deep); }
#left-content .tbmp-search { margin: 0 8px 8px; padding: 0; }
#left-content .tbmp-search .tbmp-input { padding-left: 11px; }

/* inline forms: a note, a trip's name and dates, a new trip (never closed by an outside click) */
#left-content .tbmp-form {
  margin: 4px 8px 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px;
  background: var(--color-base-2); border: 1px solid var(--border); border-radius: var(--radius-md);
}
/* the first-trip sheet holds the same form without its box (the sheet is the surface) */
body.tb-page .tbmp-sheet .tbmp-form {
  margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; background: none; border: 0; border-radius: 0;
}
#left-content .tbmp-field,
body.tb-page .tbmp-sheet .tbmp-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; padding: 0; }
#left-content .tbmp-field__label,
body.tb-page .tbmp-sheet .tbmp-field__label { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--color-ink-muted); }
#left-content .tbmp-input,
body.tb-page .tbmp-sheet .tbmp-input {
  display: block; width: 100%; box-sizing: border-box; min-height: 40px; padding: 9px 11px; margin: 0;
  background: var(--color-base-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: none;
  font-family: var(--font-sans); font-size: 14px; font-weight: 400; line-height: 1.45; color: var(--color-ink);
}
#left-content textarea.tbmp-input { min-height: 84px; resize: vertical; }
#left-content .tbmp-input::placeholder,
body.tb-page .tbmp-sheet .tbmp-input::placeholder { color: var(--color-ink-faint); font-style: normal; }
#left-content .tbmp-input:focus,
body.tb-page .tbmp-sheet .tbmp-input:focus { outline: none; border-color: var(--color-celadon); box-shadow: var(--ring); }
/* accessibility.css paints every [aria-invalid] field magenta with !important (no raised selector beats that): the one
   place this sheet answers !important with !important, so a field the error names keeps the house's attention colour */
#left-content .tbmp .tbmp-input[aria-invalid="true"],
body.tb-page .tbmp-sheet .tbmp-input[aria-invalid="true"] { border-color: var(--status-attention) !important; box-shadow: none !important; }
#left-content .tbmp .tbmp-input[aria-invalid="true"]:focus,
body.tb-page .tbmp-sheet .tbmp-input[aria-invalid="true"]:focus { box-shadow: var(--ring) !important; }
#left-content .tbmp-form__dates,
body.tb-page .tbmp-sheet .tbmp-form__dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* the drawer's inline form is the narrowest: a date field on its own line keeps its whole date */
#left-content .tbmp[data-tbmp-surface="drawer"] .tbmp-form__dates { grid-template-columns: 1fr; }
#left-content .tbmp-hint,
body.tb-page .tbmp-sheet .tbmp-hint { margin: -4px 0 0; padding: 0; font-size: 12.5px; font-weight: 400; line-height: 1.45; color: var(--color-ink-muted); }
#left-content .tbmp-err,
body.tb-page .tbmp-sheet .tbmp-err {
  margin: 0; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--color-gold-soft);
  font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--color-ink);
}
#left-content .tbmp-actions,
body.tb-page .tbmp-sheet .tbmp-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 0; }

/* buttons: celadon and ghost (no gold in My places) */
#left-content .tbmp-btn,
body.tb-page .tbmp-pick .tbmp-btn,
body.tb-page .tbmp-sheet .tbmp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 14px; margin: 0;
  border-radius: var(--radius-sm); box-shadow: none;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
}
#left-content .tbmp-btn--celadon,
body.tb-page .tbmp-sheet .tbmp-btn--celadon { background: var(--color-celadon); border: 1px solid var(--color-celadon); color: var(--text-on-celadon); }
#left-content .tbmp-btn--celadon:hover,
body.tb-page .tbmp-sheet .tbmp-btn--celadon:hover { background: var(--color-celadon-hover); border-color: var(--color-celadon-hover); color: var(--text-on-celadon); }
#left-content .tbmp-btn--ghost,
body.tb-page .tbmp-pick .tbmp-btn--ghost,
body.tb-page .tbmp-sheet .tbmp-btn--ghost { background: var(--color-base-2); border: 1px solid var(--border-strong); color: var(--color-celadon-deep); }
#left-content .tbmp-btn--ghost:hover,
body.tb-page .tbmp-pick .tbmp-btn--ghost:hover,
body.tb-page .tbmp-sheet .tbmp-btn--ghost:hover { background: var(--color-celadon-soft); border-color: var(--color-celadon); color: var(--color-celadon-deep); }

/* a ring only for the keyboard (the page's own focus rules are Material blue) */
#left-content .tbmp button:focus-visible,
#left-content .tbmp a:focus-visible,
body.tb-page .tbmp-pick button:focus-visible,
body.tb-page .tbmp-sheet button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; box-shadow: none; }
#left-content .tbmp button:focus:not(:focus-visible),
body.tb-page .tbmp-pick button:focus:not(:focus-visible),
body.tb-page .tbmp-sheet button:focus:not(:focus-visible) { outline: none; box-shadow: none; }

/* ---------------------------------------------------------------- the Add to My Trip picker (on body) */
body.tb-page .tbmp-pick {
  position: fixed; z-index: 10050; width: 300px; max-width: calc(100vw - 16px); max-height: min(440px, calc(100vh - 16px));
  overflow-y: auto; box-sizing: border-box; margin: 0; padding: 6px;
  background: var(--color-base-2); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay);
  font-family: var(--font-sans); color: var(--color-ink); line-height: 1.4; text-align: left;
}
body.tb-page .tbmp-pick__head { margin: 6px 10px 6px; padding: 0; font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--color-ink-muted); }
body.tb-page .tbmp-pick__list { list-style: none; margin: 0; padding: 0; }
body.tb-page .tbmp-pick__list li { margin: 0; padding: 0; list-style: none; }
body.tb-page .tbmp-pick__list li:last-child { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }
body.tb-page .tbmp-pick__item {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-width: 0; min-height: 44px;
  padding: 8px 10px; margin: 0; box-sizing: border-box;
  background: none; border: 0; border-radius: var(--radius-sm); box-shadow: none;
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--color-ink);
  text-align: left; cursor: pointer;
}
body.tb-page .tbmp-pick__item:hover,
body.tb-page .tbmp-pick__item:focus { background: var(--color-base-sunk); border-color: transparent; color: var(--color-ink); }
body.tb-page .tbmp-pick__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.tb-page .tbmp-pick__meta { flex: none; font-size: 12.5px; font-weight: 500; color: var(--color-ink-muted); }
body.tb-page .tbmp-pick__item[aria-disabled="true"] { cursor: default; color: var(--color-ink-faint); }
body.tb-page .tbmp-pick__item[aria-disabled="true"] .tbmp-pick__meta { color: var(--color-celadon-deep); }
body.tb-page .tbmp-pick__item.is-full .tbmp-pick__meta { color: var(--status-attention); }
body.tb-page .tbmp-pick__item--new { color: var(--color-celadon-deep); }
body.tb-page .tbmp-pick__item--new .tbmp-ico { display: block; flex: none; }
html[lang|="ko"] body.tb-page .tbmp-pick,
html[lang|="ko"] body.tb-page .tbmp-sheet { word-break: keep-all; overflow-wrap: break-word; }

/* phones: the picker is a bottom sheet over the drawer and the place sheet (z 670) */
body.tb-page .tbmp-scrim {
  position: fixed; inset: 0; z-index: 671;
  background: var(--color-line-strong);
  background: color-mix(in srgb, var(--color-ink) 32%, transparent);
}
body.tb-page .tbmp-pick.is-sheet {
  top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 72vh; z-index: 671;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
body.tb-page .tbmp-pick.is-sheet .tbmp-pick__head {
  margin: 4px 4px 10px; font-family: var(--tbmp-serif); font-size: 20px; font-weight: 400; color: var(--color-ink);
}
body.tb-page .tbmp-pick.is-sheet .tbmp-pick__item { min-height: 52px; }
body.tb-page .tbmp-pick__close { width: 100%; margin-top: 10px; }

/* ---------------------------------------------------------------- the first-trip sheet inside the drawer (step 3) */
body.tb-page .tbmp-sheet-scrim {
  position: absolute; inset: 0; z-index: 5;
  background: var(--color-line-strong);
  background: color-mix(in srgb, var(--color-ink) 24%, transparent);
}
body.tb-page .tbmp-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; box-sizing: border-box;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background: var(--color-base-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-overlay);
  font-family: var(--font-sans); color: var(--color-ink);
}
body.tb-page .tbmp-sheet__title {
  margin: 0 40px 12px 0; padding: 0; font-family: var(--tbmp-serif); font-weight: 400; font-size: 22px; line-height: 1.25; color: var(--color-ink);
}
body.tb-page .tbmp-sheet__x { position: absolute; top: 10px; right: 10px; }
/* phones: the shared toast (a Save's "Saved to My places.", an Undo) sits above the place sheet, never over its buttons
   (view.js watchSheet writes --tbmp-sheet-h, the sheet's visible height); while the drawer is open it stays at the
   bottom, over the drawer's own rows' foot, never in the middle of the list. The cap toast's action takes its own line. */
@media (max-width: 768px) {
  body.tb-page:not(:has(.tbm-drawer.is-open)) #tb-toast-container { bottom: min(calc(var(--tbmp-sheet-h, 0px) + 16px), calc(100vh - 160px)); }
  body.tb-page #tb-toast-container .tb-toast.tbmp-toast--stack { flex-wrap: wrap; row-gap: 4px; }
  body.tb-page #tb-toast-container .tb-toast.tbmp-toast--stack .tb-toast-message { flex: 1 1 calc(100% - 92px); }
  body.tb-page #tb-toast-container .tb-toast.tbmp-toast--stack .tb-toast-action { order: 3; margin-left: 24px; }
}
/* phones: a field under 16 px makes iOS zoom the page when it takes focus. accessibility.css gives every button and
   link at this width 44 px, padding and centred content: the view's rows set justify-content themselves (above); the
   cap line's link stays a word in its sentence; the plan link keeps its 44 px target with the underline on the text */
@media (max-width: 768px) {
  #left-content .tbmp-input,
  body.tb-page .tbmp-sheet .tbmp-input { font-size: 16px; }
  #left-content .tbmp-cap a { display: inline; min-height: 0; min-width: 0; padding: 0; }
  #left-content .tbmp-plan,
  #left-content .tbmp-plan:visited,
  #left-content .tbmp-plan:focus,
  #left-content .tbmp-plan:hover {
    padding: 0; border-bottom: 0; text-decoration: underline; text-decoration-thickness: 1px;
    text-decoration-color: var(--border-strong); text-underline-offset: 4px;
  }
}

/* ---------------------------------------------------------------- motion, only when wanted */
@media (prefers-reduced-motion: no-preference) {
  #left-content .tbmp-row__main,
  #left-content .tbmp-more,
  #left-content .tbmp-add,
  #left-content .tbmp-btn,
  #left-content .tbmp-menu__item,
  body.tb-page .tbmp-pick__item { transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
  #left-content .tbmp-menu,
  body.tb-page .tbmp-pick { animation: tbmp-pop var(--dur-fast) var(--ease-out); }
  body.tb-page .tbmp-pick.is-sheet,
  body.tb-page .tbmp-sheet { animation: tbmp-rise var(--dur-base) var(--ease-out); }
}
/* movement only, never a fade: a menu or sheet is opaque from its first frame (no row ever reads through it) */
@keyframes tbmp-pop { from { transform: translateY(4px); } to { transform: none; } }
@keyframes tbmp-rise { from { transform: translateY(24px); } to { transform: none; } }
