/* Shared AppShell geometry. Insets belong to the scroll container AND its
   sticky layers: padding alone stops protecting controls after scrolling. */
body.app-shell-nav-mode {
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-left: env(safe-area-inset-left, 0px);
  --app-safe-right: env(safe-area-inset-right, 0px);
  --app-toolbar-height: 60px;
  --app-trip-tabs-height: 56px;
}
.workspace-trips:not(.is-detail) .workspace-trip-detail__back { display:none; }
.workspace-trips > [hidden] { display:none !important; }
.workspace-trips.is-detail .workspace-trips__header { justify-content:space-between; }
.workspace-trips.is-detail .workspace-trip-detail__back { min-height:44px; margin-bottom:0; }
body.app-shell-nav-mode .workspace-trips.is-detail.has-map-workspace:not([hidden]) {
  padding-top:var(--app-safe-top);
  padding-left:max(18px,var(--app-safe-left));
  padding-right:max(18px,var(--app-safe-right));
  scroll-padding-top:calc(var(--app-safe-top) + var(--app-toolbar-height) + var(--app-trip-tabs-height) + 12px);
}
body.app-shell-nav-mode .workspace-trips.is-detail .workspace-trips__header {
  top:0;
  height:var(--app-toolbar-height);
  min-height:var(--app-toolbar-height);
  justify-content:space-between;
  gap:8px;
  margin:0;
  padding:8px 0;
}
body.app-shell-nav-mode .workspace-trips.is-detail .workspace-trips__header::before {
  top:calc(-1 * var(--app-safe-top));
  border-bottom:1px solid #e3e8e2;
}
body.app-shell-nav-mode .workspace-trips.is-detail .workspace-trips__header > div { display:none; }
body.app-shell-nav-mode .workspace-trips.is-detail .workspace-trip-detail__back {
  display:inline-flex; align-items:center; min-height:44px; margin:0;
  font-size:13px; font-weight:600; text-align:left; flex:1; min-width:0;
}
body.app-shell-nav-mode .workspace-trips.is-detail .workspace-trips__close {
  flex:none; min-height:44px; margin:0; background:transparent; border:0;
}
body.app-shell-nav-mode .workspace-trip-detail .workspace-trip-detail__tabs {
  top:var(--app-toolbar-height);
  height:var(--app-trip-tabs-height); min-height:var(--app-trip-tabs-height);
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0;
}
body.app-shell-nav-mode .workspace-trip-detail__tabs button {
  min-width:0; min-height:44px; padding:6px 2px; font-size:12px;
  line-height:1.4; overflow-wrap:normal; word-break:normal;
}
.workspace-trip-detail__tabs button span { display:block; white-space:nowrap; }
.workspace-trip-tab-count { font-size:10px; font-weight:500; font-variant-numeric:tabular-nums; }
body.app-shell-nav-mode .workspace-trip-detail__day-nav {
  top:calc(var(--app-toolbar-height) + var(--app-trip-tabs-height));
}
/* Sheets anchored above the map do not start at the status bar. */
body.app-shell-nav-mode:is(.workspace-trip-route-mode,.workspace-trip-map-pick-mode) .workspace-trips {
  --app-safe-top:0px;
}
/* A trip without a photo is a heading, rather than an empty photograph. */
.workspace-trip-detail__hero:not(.has-cover) {
  min-height:0; margin-top:16px; border-radius:0; background:transparent;
  color:#183e47;
}
.workspace-trip-detail__hero:not(.has-cover)::after { display:none; }
.workspace-trip-detail__hero:not(.has-cover) .workspace-trip-detail__hero-content {
  min-height:0; padding:0 0 16px; gap:8px;
}
.workspace-trip-detail__hero:not(.has-cover) .workspace-trip-detail__hero-top { justify-content:flex-start; }
.workspace-trip-detail__hero:not(.has-cover) [data-workspace-trip-visibility] {
  padding:0; background:transparent; color:#637578; font-size:11px; font-weight:500;
}
.workspace-trip-detail__hero:not(.has-cover) h3 {
  color:#183e47; font-family:inherit; font-size:26px; line-height:1.3; text-shadow:none;
}
.workspace-trip-detail__hero:not(.has-cover) .workspace-trip-detail__meta { color:#637578; text-shadow:none; }
.workspace-trip-detail__utilities { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.workspace-trip-detail__utilities > button {
  flex:1 1 120px; width:auto; min-height:44px; margin:0; padding:10px 12px;
  font-family:inherit; font-size:12px; line-height:1.5; border-radius:10px;
}
body.app-shell-nav-mode [data-workspace-trip-translation] { padding:0; }
body.app-shell-nav-mode .trip-translation-notice { margin:0 0 8px; gap:8px; font-size:12px; }
body.app-shell-nav-mode .trip-translation-notice button { min-height:44px; border:0; background:transparent; text-decoration:underline; }
body.app-shell-nav-mode .workspace-trip-publish-hint { margin:8px 0 16px; }
.workspace-trip-publish-status:empty { display:none; }
body.app-shell-nav-mode .workspace-trips.is-detail .workspace-guest-notice {
  margin:12px 0; padding:12px; border-radius:10px;
}
body.app-shell-nav-mode .workspace-trips.is-detail .workspace-guest-notice strong { font-size:12px; }
body.app-shell-nav-mode .workspace-trips.is-detail .workspace-guest-notice > p { font-size:11px; }
/* Let labels provide the complete target; keep the actual native checkbox. */
body.app-shell-nav-mode .workspace-guest-consent,
body.app-shell-nav-mode .workspace-trip-checklist label {
  min-height:44px; box-sizing:border-box; align-items:center; gap:10px;
}
body.app-shell-nav-mode .workspace-trip-checklist input[type="checkbox"] {
  flex:none; width:20px; height:20px; margin:0; accent-color:#1c6370;
}
body.app-shell-nav-mode .ckl-progress label { min-height:44px; padding:0 4px; }
body.app-shell-nav-mode .ckl-row { min-height:56px; gap:8px; }
body.app-shell-nav-mode .ckl-check-target {
  display:flex; align-items:center; justify-content:center;
  flex:0 0 44px; width:44px; min-height:44px; margin:0; cursor:pointer;
}
body.app-shell-nav-mode .ckl-check-target > input[type="checkbox"] {
  width:20px; height:20px; margin:0; flex:none; accent-color:#1c6370;
}
body.app-shell-nav-mode .ckl-row > button { min-width:44px; min-height:44px; }
body.app-shell-nav-mode .ckl-row > .ckl-name { min-width:0; }
body.app-shell-nav-mode .workspace-trips :is(button,a,input,select,textarea,summary):focus-visible {
  outline:2px solid #1c6370; outline-offset:3px;
}
@media (prefers-reduced-motion:reduce) {
  body.app-shell-nav-mode .workspace-trips { scroll-behavior:auto; }
}
