body { --note-toolbar-height: 44px; min-height: 100vh; }

.trip-library-page { max-width: 620px; padding: 18px 20px 30px; }
.trip-library-page:has(.trip-detail:not([hidden])) { max-width: var(--note-max-width, 980px); padding: 12px 16px 30px; }
.trip-library-page:has(.about-page:not([hidden])) { max-width: 1060px; padding-block: clamp(24px, 4.5vw, 52px) 48px; }
.trip-library-page [hidden], .trip-topbar [hidden], .trip-dialog [hidden], .user-profile-panel [hidden] { display: none; }
.workspace-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.trip-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 12px;
  min-height: 0;
  padding: 0;
  border-bottom: 0;
  background: var(--banner-surface);
}
.trip-topbar.is-trip-detail {
  display: flex;
  min-height: var(--note-toolbar-height);
  padding: 0 clamp(8px, 3vw, 22px);
  background: var(--page-background);
}
.trip-topbar .brand { grid-area: 1 / 1; min-height: 44px; justify-self: start; margin-inline-start: 16px; gap: 6px; }
.trip-topbar .brand-copy > span { font: 800 16px/1.2 var(--ui-font); }
.trip-topbar nav {
  grid-area: 2 / 1 / 3 / -1;
  display: block;
  justify-self: center;
  width: min(100%, 620px);
}
.trip-topbar .topbar-page-links {
  --inactive-tab-weight: 600;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.trip-topbar .topbar-utilities { grid-area: 1 / 2; display: flex; align-items: center; margin-inline-end: 16px; }
.trip-topbar :is(nav, .topbar-utilities)[hidden] { display: none; }
.trip-topbar .topbar-page-links > a {
  display: grid;
  min-height: 44px;
  padding-inline: 10px;
  place-items: center;
  background: var(--home-inactive-tab, var(--banner-surface));
  font-size: 12px;
}
.trip-topbar .topbar-page-links > a[aria-current="page"] { background: var(--page-background); }
.trip-topbar .topbar-page-links > a:hover:not([aria-current="page"]) { color: var(--ink); background: color-mix(in srgb, var(--forest) 13%, var(--panel)); }
.trip-topbar .topbar-page-links a:focus-visible, .profile-avatar-button:focus-visible, .account-sign-in:focus-visible { outline: 2px solid var(--forest); outline-offset: -3px; }
.trip-topbar .profile-avatar-button {
  position: relative;
  display: inline-grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--forest);
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .96), rgba(225, 231, 221, .92));
  box-shadow: 0 1px 4px rgba(31, 37, 35, .12);
  line-height: 0;
  transition: background .16s ease, box-shadow .16s ease;
}
.trip-topbar .profile-avatar-button[hidden] { display: none; }
.trip-topbar .profile-avatar-button:hover, .trip-topbar .profile-avatar-button:focus-visible {
  color: var(--ink);
  background: #e1e7dd;
  box-shadow: 0 2px 8px rgba(31, 37, 35, .14);
}
.profile-avatar-button img, .profile-avatar-fallback, .user-profile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.profile-avatar-button img, .user-profile-photo img { object-fit: cover; }
.profile-signin-button svg { width: 18px; height: 18px; fill: currentColor; }
.profile-avatar-fallback { display: grid; place-items: center; }
.profile-avatar-fallback svg { width: 68%; height: 68%; fill: currentColor; }
.account-sign-in { display: inline-flex; min-height: 40px; align-items: center; padding: 0 16px; border-radius: 8px; color: var(--panel); background: var(--forest); font-size: 14px; font-weight: 750; text-decoration: none; }
.account-sign-in:hover { background: var(--ink); }
.trip-detail-nav {
  position: sticky;
  top: var(--note-toolbar-height);
  z-index: 4;
  display: flex;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  scroll-margin-top: var(--note-toolbar-height);
}
.trip-detail-nav a {
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  place-items: center;
  padding: 5px 3px;
  background: var(--note-inactive-tab, #edf0ec);
  font-size: clamp(13px, 4vw, 16px);
  text-decoration: none;
}
.trip-detail-nav a[aria-selected="true"] { background: var(--panel); }
.trip-detail-nav a:hover:not([aria-selected="true"]) { color: var(--ink); background: color-mix(in srgb, var(--forest) 13%, var(--panel)); }
.trip-detail-nav a:focus-visible { outline: 2px solid var(--forest); outline-offset: -4px; }
#trip-status { margin: 18px 0; color: var(--muted); }
.trip-start-tracking { margin-bottom: 16px; }
.trip-start-button.primary {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-block: 8px;
  border-radius: 6px;
  box-shadow: var(--full-width-button-shadow);
  font-size: 15px;
  font-weight: 600;
}
.trip-start-button svg { width: 17px; height: 17px; flex: none; fill: currentColor; }
.trip-start-tracking p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.trip-list-panel {
  display: grid;
  gap: 10px;
}
#trip-listing[data-view="explore"] .trip-list-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--grouped-panel, var(--panel));
  box-shadow: var(--content-panel-shadow);
}
.trip-list-panel .trip-list { margin: 0; }
.trip-list-panel .trip-list:not(:has(> :not([hidden]))) { display: none; }
.trip-list-panel #more-trips { justify-self: center; }
.trip-list-status { margin: 0; color: var(--muted); font-size: 14px; }
.trip-list-search { position: relative; min-width: 0; }
.trip-list-search input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 9px 50px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  line-height: 1.25;
}
.trip-list-search button {
  position: absolute;
  inset: 5px 6px 5px auto;
  display: grid;
  width: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border-radius: 5px;
  color: var(--forest);
  background: transparent;
}
.trip-list-search button:hover { color: var(--ink); background: color-mix(in srgb, var(--moss) 32%, var(--panel)); }
.trip-list-search button svg { width: 21px; height: 21px; fill: currentColor; }
.trip-list-search :is(input, button):focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.trip-heading { margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
#trip-library-title { font-size: 24px; text-align: left; }
.about-page { display: grid; gap: clamp(24px, 4vw, 40px); }
.about-hero { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: center; gap: clamp(20px, 4vw, 44px); }
.about-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5.4vw, 66px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.03;
  text-wrap: balance;
}
.about-intro p { margin: 0; color: var(--muted); font-size: clamp(16px, 2vw, 20px); line-height: 1.55; }
.about-demo { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--grouped-panel); box-shadow: var(--content-panel-shadow); }
.about-demo h2 { margin: 0; padding: 13px 16px; font-size: 16px; }
.about-demo video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #1f2523; }
.about-demo video:focus-visible { outline: 2px solid var(--tab-underline); outline-offset: -3px; }
.about-section-title { margin: 0 0 13px; font-size: clamp(21px, 3vw, 28px); letter-spacing: -.025em; }
.about-steps, .about-use-cases {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.about-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.about-use-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about-step, .about-use-case {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--grouped-panel);
  box-shadow: var(--content-panel-shadow);
}
.about-step h3, .about-use-case h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.28;
}
.about-number {
  display: grid;
  flex: 0 0 26px;
  height: 26px;
  place-items: center;
  padding-block-start: 2px;
  border: 1px solid var(--forest);
  border-radius: 50%;
  background: #f0e9da;
  box-shadow: 0 2px 4px rgb(31 37 35 / 14%);
  color: #1f2523;
  font: 400 16px/1 "Marker Felt", "Segoe Print", ui-rounded, sans-serif;
}
.about-step ul { display: grid; gap: 7px; margin: 0; padding-inline-start: 16px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.about-use-case p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.about-step strong, .about-use-case strong { color: var(--ink); font-weight: 650; }
.about-actions { display: flex; flex-wrap: wrap; gap: 9px 13px; }
.about-actions :is(a, button) {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--grouped-panel);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.about-actions .about-primary-action { border-color: transparent; background: var(--forest); color: var(--primary-button-ink); }
.about-actions :is(a, button):not(.about-primary-action):hover { border-color: var(--forest); }
.about-actions .about-primary-action:hover { background: var(--forest-dark); }
.about-actions :is(a, button):focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

@media (max-width: 760px) {
  .about-hero, .about-steps, .about-use-cases { grid-template-columns: minmax(0, 1fr); }
  .about-demo h2 { padding: 10px 13px; }
}

.trip-detail-heading { display: block; min-height: 0; margin-bottom: 11px; scroll-margin-top: var(--note-toolbar-height); }
.trip-heading h1 { overflow-wrap: anywhere; margin-bottom: 0; }
.trip-detail-heading h1 { font-size: 28px; }
.trip-list, .trip-marks { list-style: none; padding: 0; }
.trip-list { display: grid; gap: 10px; }
.trip-card, .trip-content { box-shadow: var(--content-panel-shadow); }
.trip-card { display: flex; align-items: center; min-width: 0; padding-inline-end: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--grouped-panel, var(--panel)); }
.trip-card:hover, .trip-card:focus-within { border-color: var(--forest); }
.trip-card-link { min-width: 0; flex: 1; display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 13px; text-decoration: none; }
.trip-card-link > div { min-width: 0; flex: 1; }
.trip-list img { width: 64px; height: 58px; border-radius: 8px; flex: none; object-fit: cover; }
.trip-list .trip-placeholder { object-fit: contain; padding: 7px; }
.trip-list strong { display: block; overflow-wrap: anywhere; line-height: 1.25; }
.trip-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.3; }
#trip-listing[data-view="explore"] .trip-list { gap: 0; }
#trip-listing[data-view="explore"] .trip-card { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#trip-listing[data-view="explore"] .trip-card:not([hidden]) ~ .trip-card:not([hidden]) { border-top: 1px solid var(--item-divider); }
#trip-listing[data-view="explore"] .trip-card-link { padding: 10px 3px; border-radius: 6px; }
#trip-listing[data-view="explore"] .trip-card-link::after { content: ""; width: 6px; height: 6px; border-top: 2px solid; border-right: 2px solid; color: var(--muted); transform: rotate(45deg); margin-inline: 3px; }
.trip-card-link:hover { background: color-mix(in srgb, var(--moss) 12%, transparent); }
.trip-card-link:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }
.trip-heading-actions { flex: none; display: flex; align-items: center; }
.trip-actions { position: relative; flex: none; }
.trip-actions summary { cursor: pointer; list-style: none; }
.trip-actions summary::-webkit-details-marker { display: none; }
.trip-action-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 1; width: max-content; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 8px 24px rgba(31,37,35,.15); }
.trip-action-menu button { width: 100%; padding: 0 12px; background: transparent; color: var(--ink); text-align: left; border-radius: 6px; }
.trip-action-menu button:hover { background: var(--paper); }
.trip-action-menu .trip-danger-text { color: #B3373B; }
.trip-content { border-top: 0; border-radius: 0 0 12px 12px; margin-bottom: 16px; padding: 14px; scroll-margin-top: 88px; }
.trip-content:not(.trip-content-current) { display: none; }
.trip-content h2 { margin-bottom: 12px; }
.trip-overview { padding: 0; overflow: hidden; }
.trip-overview-facts { display: grid; gap: 9px; padding: 12px 14px; }
.trip-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--item-divider); }
.trip-overview-facts :is(dt, small) { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.trip-facts dd { margin: 3px 0 0; }
.trip-overview-facts :is(dd, strong, a) { color: var(--forest); font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.trip-area a { display: flex; justify-content: space-between; gap: 8px; min-height: 28px; align-items: center; text-decoration: none; }
.trip-area a::after { content: "↗"; }
.trip-area a:hover { text-decoration: underline; }
.trip-created-date { margin: 0; color: var(--muted); font-size: 12px; }
.trip-note:not(:empty) { padding: 0 14px 14px; }
.trip-photos:not([hidden]) + .trip-photo-index[hidden] + .trip-note:not(:empty) { padding-top: 12px; }
.trip-note p { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.trip-note p:last-child { margin-bottom: 0; }
.trip-photos { display: flex; overflow: auto hidden; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; scrollbar-width: none; }
.trip-photos::-webkit-scrollbar { display: none; }
.trip-photos a { display: block; flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.trip-photos a:focus-visible { outline: 2px solid var(--forest); outline-offset: -3px; }
.trip-photos img { display: block; width: 100%; max-height: 480px; aspect-ratio: 4/3; object-fit: cover; background: var(--paper); }
.trip-photo-index { display: flex; flex-wrap: wrap; justify-content: center; }
.trip-photo-index button { display: grid; place-items: center; width: 28px; min-height: 40px; padding: 0; background: transparent; }
.trip-photo-index button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 40%, transparent); }
.trip-photo-index button[aria-current="true"]::before { width: 8px; height: 8px; background: var(--gold); }
.trip-route-wrap { height: clamp(312px, 47vw, 440px); margin-bottom: 12px; isolation: isolate; }
#shared-trace, #shared-tile-map { display: block; width: 100%; height: 100%; border-radius: inherit; }
#shared-trace[hidden], #shared-tile-map[hidden] { display: none; }
#shared-trace { background: var(--paper); }
#shared-tile-map { position: absolute; inset: 0; }
.shared-trace-line, .shared-trace-walked, .shared-trace-dot { vector-effect: non-scaling-stroke; }
.shared-trace-line, .shared-trace-walked { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.shared-trace-line { stroke: var(--route-ahead); stroke-width: 2.4; stroke-dasharray: 9 9; }
.shared-trace-walked { stroke: var(--route-walked); stroke-width: 3.2; }
.shared-trace-walked-outline { stroke: var(--route-terrain-outline); stroke-width: 5.2; }
.shared-trace-dot { fill: var(--route-walked); stroke: var(--route-terrain-outline); stroke-width: 1; }
.trip-map-pin { cursor: pointer; --map-pin-fill: var(--gold); --map-pin-ink: #25221b; }
.trip-map-pin-reminder { --map-pin-fill: var(--reminder); --map-pin-ink: #fff; }
.trip-map-pin-alert { --map-pin-fill: var(--alert); }
.trip-map-pin-warning { --map-pin-fill: var(--warning); --map-pin-ink: #fff; }
.trip-map-pin-group { --map-pin-fill: #465f50; --map-pin-ink: #fff; }
.trip-map-pin-target { fill: transparent; stroke: none; }
.trip-map-pin-disc { fill: var(--map-pin-fill); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.trip-map-camera { fill: none; stroke: var(--map-pin-ink); stroke-width: 1.4; stroke-linejoin: round; }
.trip-map-pin text { fill: var(--map-pin-ink); font: 800 11px var(--ui-font); }
.trip-map-pin:focus-visible, .trip-map-tile-pin:focus-visible { outline: none; }
.trip-map-pin:focus-visible .trip-map-pin-disc, .trip-map-tile-pin:focus-visible .trip-map-pin-disc { stroke: #1f2523; stroke-width: 3; }
.trip-map-tile-pin svg { display: block; width: 100%; height: 100%; }
.trip-map-credit, .trip-map-status, .trip-map-popup { position: absolute; z-index: 680; }
.trip-map-credit { bottom: 0; left: 0; max-width: calc(100% - 16px); }
.trip-map-credit-links, .trip-map-status {
  padding: 5px 8px; border-radius: 6px;
  background: var(--panel); color: var(--ink); font-size: 11px; box-shadow: var(--content-panel-shadow);
}
.trip-map-credit-links { display: flex; gap: 3px 7px; flex-wrap: wrap; padding: 2px 6px; font-size: 10px; }
.trip-map-status { top: 56px; right: 8px; max-width: calc(100% - 16px); margin: 0; pointer-events: none; }
.trip-map-popup {
  display: grid; gap: 6px; bottom: 10px; left: 10px;
  width: min(216px, calc(100% - 20px)); max-height: calc(100% - 66px); overflow: auto;
  padding: 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--grouped-panel); color: var(--ink); box-shadow: var(--content-panel-shadow);
  overflow-wrap: anywhere;
}
.trip-route-wrap [hidden] { display: none; }
.trip-route-wrap:has(.trip-map-credit:not([hidden])) .trip-map-popup,
.trip-route-wrap[data-google-map] .trip-map-popup { bottom: 42px; }
.trip-map-popup-heading { display: flex; align-items: center; justify-content: space-between; }
.trip-map-popup :is(select, img) { width: 100%; }
.trip-map-popup select { min-height: 34px; font: inherit; }
.trip-map-popup img { display: block; max-height: 110px; object-fit: cover; border-radius: 6px; }
.trip-map-popup-close {
  display: grid; place-items: center; width: 32px; min-height: 32px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--panel);
  font: 500 22px/1 var(--ui-font); cursor: pointer;
}
.trip-map-popup-close:hover { background: var(--note-inactive-tab); }
.trip-map-popup :is(p, time) { margin: 0; color: var(--muted); font-size: 12px; }
.trip-map-popup p { white-space: pre-wrap; }
.trip-route-wrap[data-map-mode="aerial"], .trip-route-wrap[data-map-mode="aerial"] ~ .trip-route-playback {
  --route-walked: #ffce1b;
  --route-ahead: var(--route-aerial-ahead);
  --trip-chart-ahead: var(--route-ahead);
}
.trip-route-wrap[data-map-mode="aerial"] .shared-trace-walked-outline { display: none; }
.trip-route-controls { gap: 8px; margin: 0 0 14px; padding: 0 0 12px; background: transparent; }
.trip-route-elevation-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.trip-route-elevation-heading h3, .trip-route-stops h3 { margin: 0; font-size: 16px; }
#shared-elevation-value { color: var(--forest); font-weight: 700; font-variant-numeric: tabular-nums; }
#shared-elevation-chart { display: block; width: 100%; max-height: 176px; margin-top: 8px; }
.trip-elevation-grid, .trip-elevation-cursor { stroke: var(--item-divider); vector-effect: non-scaling-stroke; }
.trip-elevation-cursor { stroke: var(--muted); stroke-dasharray: 2 3; opacity: .65; }
.trip-elevation-axis { fill: var(--muted); font: 15px var(--ui-font); }
.trip-elevation-ahead, .trip-elevation-walked {
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
.trip-elevation-ahead { stroke: var(--trip-chart-ahead, var(--route-ahead)); stroke-dasharray: 3 4; }
.trip-elevation-walked { stroke: var(--route-walked); stroke-width: 2.5; }
.trip-elevation-dot { fill: var(--route-walked); stroke: var(--route-terrain-outline); vector-effect: non-scaling-stroke; }
@media (prefers-color-scheme: dark) {
  .trip-route-playback { --trip-chart-ahead: #c9a9bc; }
}
#shared-elevation-empty, #shared-no-route { margin: 8px 0 0; color: var(--muted); }
.trip-route-stops { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--item-divider); }
.trip-route-stops dl { margin: 7px 0 0; }
.trip-route-stops dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 7px 0; }
.trip-route-stops dl > div + div { border-top: 1px solid var(--item-divider); }
.trip-route-stops dt { font-weight: 700; }
.trip-route-stops dd { margin: 0; }
.trip-route-stops a { font-size: 14px; font-variant-numeric: tabular-nums; }
.trip-marks li { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--item-divider); }
.trip-marks p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.trip-marks button { flex: none; }
.trip-mark-kind { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.trip-mark-reminder { color: var(--reminder); }
.trip-mark-alert { color: #936600; }
.trip-mark-warning { color: var(--warning); }
.trip-dialog form { gap: 12px; }
.trip-dialog form > button { box-shadow: var(--full-width-button-shadow); font-weight: 600; }
.trip-dialog p { margin-bottom: 0; color: var(--muted); }
.trip-dialog input, .trip-dialog select, .trip-dialog textarea { width: 100%; min-width: 0; min-height: 40px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; }
.trip-dialog textarea { resize: vertical; }
#trip-link { margin-top: 12px; }
.trip-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.trip-dialog-actions button { min-height: 42px; border-radius: 9px; }
.app-install-dialog { padding: 0; }
.app-install-panel { padding: clamp(16px, 4vw, 24px); }
.app-install-panel .alert-dialog-heading, .app-install-brand { display: flex; align-items: center; gap: 10px; }
.app-install-brand img { flex: none; object-fit: contain; }
.app-install-panel .dialog-close { flex: none; }
.app-install-panel p { margin: 0; }
.app-install-panel .app-install-unavailable { font-size: 13px; }
.app-install-actions { flex-wrap: wrap; }
.app-install-actions .app-install-store {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--forest);
  color: var(--primary-button-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.app-install-actions .app-install-store[hidden] { display: none; }
.app-install-actions a:hover { background: var(--forest-dark); }
.app-install-actions button:disabled { border-color: var(--line); background: var(--banner-surface); color: var(--muted); cursor: default; opacity: 1; }
.trip-start-button:focus-visible, .app-install-dialog :is(button, a):focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.trip-share-actions { margin-top: 12px; }
#share-link-status { margin-top: 8px; }
.trip-delete { color: white; background: #AE3235; }
.trip-delete:hover { background: #952628; }

.user-profile-dialog {
  width: min(390px, calc(100vw - 28px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 28px 80px rgba(31, 37, 35, .34);
}
.user-profile-dialog::backdrop { background: rgba(22, 27, 25, .36); -webkit-backdrop-filter: blur(10px) saturate(115%); backdrop-filter: blur(10px) saturate(115%); }
.user-profile-panel {
  max-height: 88vh;
  overflow-y: auto;
  padding: 14px 18px 18px;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(247, 248, 244, .66));
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.user-profile-heading { display: flex; justify-content: flex-end; }
.user-profile-close {
  display: grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0 0 2px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 3px 12px rgba(31, 37, 35, .08);
  font-size: 24px;
  line-height: 1;
}
.user-profile-close:hover, .user-profile-close:focus-visible { background: var(--panel); }
.user-profile-hero { display: grid; justify-items: center; gap: 6px; padding: 0 8px 18px; text-align: center; }
.user-profile-hero h2 { max-width: 100%; margin: 8px 0 0; outline: none; font: 800 24px/1.2 Inter, sans-serif; overflow-wrap: anywhere; }
.user-profile-photo {
  position: relative;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 50%;
  color: var(--forest);
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .98), rgba(225, 231, 221, .94));
  box-shadow: 0 14px 32px rgba(31, 37, 35, .16), inset 0 0 0 1px rgba(255, 255, 255, .78);
}
.profile-signout-button {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid rgba(176, 52, 43, .18);
  border-radius: 999px;
  color: #b4342b;
  background: rgba(255, 255, 255, .58);
  box-shadow: var(--full-width-button-shadow), inset 0 1px 0 rgba(255, 255, 255, .76);
  font-size: 14px;
  font-weight: 800;
}
.profile-signout-button:hover, .profile-signout-button:focus-visible { border-color: rgba(176, 52, 43, .34); background: rgba(255, 241, 239, .82); }
.profile-signout-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-status { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.profile-status:empty { margin: 0; }

.privacy-picker { position: relative; display: inline-flex; }
.privacy-picker-trigger:not(.note-corner-action) {
  display: inline-grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--forest);
  background: var(--panel);
  transition: border-color .16s ease, background .16s ease;
}
.privacy-picker-trigger:not(.note-corner-action):is(:hover, :focus-visible) { border-color: var(--moss); color: var(--ink); background: var(--paper); }
.privacy-picker-trigger[aria-busy="true"] { cursor: wait; opacity: .65; }
.privacy-picker-menu {
  position: fixed;
  z-index: 5;
  width: min(300px, calc(100vw - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(31, 42, 35, .18);
}
.privacy-picker-menu-title { margin: 2px 5px 5px; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.3; }
.privacy-picker-option {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.privacy-picker-option[data-visibility="private"] { --privacy-state: #985f61; --privacy-hover: #fbf3f3; --privacy-selected: #f8eeee; }
.privacy-picker-option[data-visibility="link"] { --privacy-state: #9c782f; --privacy-hover: #fbf6e9; --privacy-selected: #faf3df; }
.privacy-picker-option[data-visibility="public"] { --privacy-state: #466148; --privacy-hover: #f1f5f1; --privacy-selected: #e7eee7; }
.privacy-picker-option:hover, .privacy-picker-option:focus-visible { border-color: var(--privacy-state); background: var(--privacy-hover); }
.privacy-picker-option[aria-checked="true"] {
  border-color: color-mix(in srgb, var(--privacy-state) 65%, transparent);
  background: var(--privacy-selected);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--privacy-state) 16%, transparent);
}
.privacy-picker-option:hover .privacy-option-icon, .privacy-picker-option:focus-visible .privacy-option-icon,
.privacy-picker-option[aria-checked="true"] .privacy-option-icon { border-color: var(--privacy-state); color: var(--privacy-state); }
.privacy-option-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--forest);
  background: var(--panel);
}
.privacy-option-icon svg, .privacy-picker-trigger:not(.note-corner-action) svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.privacy-picker-option strong, .privacy-picker-option small { display: block; letter-spacing: 0; }
.privacy-picker-option strong { margin: 0 0 2px; font-size: 13px; }
.privacy-picker-option small { margin: 0; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.35; }
.privacy-copy-link {
  width: 100%;
  min-height: 34px;
  margin-top: 6px;
  padding: 0 8px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  color: var(--forest);
  background: transparent;
  text-align: left;
  font-size: 13px;
}
.privacy-copy-link:hover, .privacy-copy-link:focus-visible { background: var(--paper); }
.privacy-copy-link[hidden] { display: none; }
.privacy-feedback {
  position: fixed;
  z-index: 6;
  right: 16px;
  bottom: 16px;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(31, 37, 35, .15);
  font-size: 13px;
}
.privacy-feedback:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; border: 0; }

@media (prefers-color-scheme: dark) {
  .trip-topbar .profile-avatar-button, .user-profile-photo { background: var(--paper); }
  .trip-topbar .profile-avatar-button:hover, .trip-topbar .profile-avatar-button:focus-visible { color: var(--ink); background: var(--line); }
  .user-profile-panel { border-color: var(--line); background: var(--panel); box-shadow: none; }
  .user-profile-close { border-color: var(--line); background: var(--paper); }
  .profile-signout-button { border-color: var(--line); color: #f29593; background: var(--paper); box-shadow: var(--full-width-button-shadow); }
  .profile-signout-button:hover, .profile-signout-button:focus-visible { background: var(--line); }
  .privacy-picker-option[data-visibility="private"] { --privacy-state: #dc9b9d; --privacy-hover: #362b2c; --privacy-selected: #432f31; }
  .privacy-picker-option[data-visibility="link"] { --privacy-state: #d9b76e; --privacy-hover: #342e24; --privacy-selected: #423726; }
  .privacy-picker-option[data-visibility="public"] { --privacy-state: #a5c2a8; --privacy-hover: #2d382d; --privacy-selected: #344539; }
  .trip-action-menu .trip-danger-text, .trip-mark-warning { color: #F29593; }
  .trip-mark-reminder { color: #97D29E; }
  .trip-mark-alert { color: #E8BC58; }
  .shared-trace-line { stroke: #c9a9bc; }
}
