:root {
  color-scheme: light;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --ink: #143130;
  --muted: #607572;
  --deep: #123c3a;
  --deep-2: #1f5751;
  --leaf: #5f8d53;
  --sage: #dce7d5;
  --aqua: #87c6c0;
  --sun: #f1b95a;
  --clay: #c87052;
  --paper: #fbfaf6;
  --panel: rgba(255, 255, 255, 0.86);
  --line: rgba(20, 49, 48, 0.13);
  --shadow: 0 20px 60px rgba(19, 53, 51, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(130deg, rgba(135, 198, 192, 0.34), transparent 38%),
    linear-gradient(310deg, rgba(241, 185, 90, 0.22), transparent 44%),
    #eef4ea;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.app-ready .boot-splash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(18, 60, 58, 0.96), rgba(31, 87, 81, 0.92)),
    #123c3a;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}

.boot-card {
  display: grid;
  justify-items: center;
  gap: 9px;
  width: min(280px, 100%);
  padding: 22px;
  border-radius: 28px;
  color: #fbfaf6;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 24px 60px rgba(8, 31, 29, 0.32);
}

.boot-card img {
  width: 94px;
  height: 94px;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(8, 31, 29, 0.24);
}

.boot-card strong {
  font-size: 1.35rem;
  line-height: 1;
}

.boot-card span {
  color: rgba(251, 250, 246, 0.78);
  font-size: 0.92rem;
  font-weight: 700;
}

.app-shell {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 38px;
}

.topbar {
  position: sticky;
  top: calc(10px + var(--safe-top));
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(251, 250, 246, 0.82);
  box-shadow: 0 14px 36px rgba(19, 53, 51, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: var(--deep);
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(18, 60, 58, 0.2);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  max-width: 180px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(20, 49, 48, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.topnav button {
  min-width: 62px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
  cursor: pointer;
}

.topnav button:hover,
.topnav button:focus-visible,
.topnav button.active {
  color: var(--deep);
  background: rgba(135, 198, 192, 0.22);
  outline: none;
}

.mobile-tabbar {
  display: none;
}

.intro-screen {
  display: none;
}

main {
  display: grid;
  gap: 22px;
  padding-top: 18px;
  height: calc(100svh - 104px - var(--safe-top) - var(--safe-bottom));
  overflow: hidden;
}

.app-screen,
.app-screen-companion {
  display: none;
}

.app-screen.active,
.app-screen-companion.active {
  display: grid;
}

.app-screen.active {
  min-height: min(760px, calc(100svh - 146px));
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.hero-section {
  min-height: calc(100svh - 112px);
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  align-items: center;
  gap: 28px;
  padding: clamp(22px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.75), rgba(226, 236, 218, 0.86)),
    radial-gradient(circle at 85% 18%, rgba(241, 185, 90, 0.26), transparent 26%);
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 660px;
}

.hero-logo {
  display: block;
  width: clamp(122px, 17vw, 184px);
  aspect-ratio: 1;
  margin: 0 0 18px;
  border-radius: 28px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 38px rgba(19, 53, 51, 0.16);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--deep-2);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 2.8vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.35rem;
  line-height: 1.12;
}

.hero-lede {
  max-width: 600px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.6;
}

.hero-actions,
.trust-row,
.route-stats,
.pet-card,
.hero-actions {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 12px;
  margin: 28px 0 20px;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  min-height: 48px;
  border: 0;
  cursor: pointer;
  font-weight: 850;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 13px 18px;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--deep), var(--deep-2));
  box-shadow: 0 14px 28px rgba(18, 60, 58, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: linear-gradient(135deg, #0d302e, #236b62);
  outline: none;
}

.secondary-button {
  color: var(--deep);
  background: var(--sage);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: #cfe0c8;
  outline: none;
}

.danger-button {
  color: #fff;
  background: linear-gradient(135deg, #9f4936, var(--clay));
  box-shadow: 0 14px 26px rgba(159, 73, 54, 0.2);
}

.danger-button:hover,
.danger-button:focus-visible {
  background: linear-gradient(135deg, #873c2c, #d27656);
  outline: none;
}

.compact-button {
  min-height: 42px;
  padding: 10px 13px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: var(--deep);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px var(--line);
}

.icon-button svg,
.alert-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.trust-row {
  flex-wrap: wrap;
  gap: 8px;
}

.trust-row span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.08);
  font-size: 0.82rem;
  font-weight: 780;
}

.trust-row span {
  padding: 6px 10px;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-top: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.08);
  font-size: 0.84rem;
  font-weight: 800;
}

.planner-status {
  margin-top: 16px;
}

.build-marker {
  padding-left: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sun);
}

.live-status.live .live-dot {
  background: var(--leaf);
}

.live-status.offline .live-dot {
  background: var(--clay);
}

.phone-preview {
  width: min(100%, 390px);
  justify-self: end;
  padding: 12px;
  border: 1px solid rgba(20, 49, 48, 0.16);
  border-radius: 34px;
  background: #f7f7f1;
  box-shadow: 0 28px 70px rgba(18, 60, 58, 0.22);
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 12px 10px;
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.status-dots,
.status-dots::before,
.status-dots::after {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--deep);
}

.status-dots {
  position: relative;
  margin-right: 16px;
}

.status-dots::before,
.status-dots::after {
  content: "";
  position: absolute;
  top: 0;
}

.status-dots::before {
  left: 8px;
}

.status-dots::after {
  left: 16px;
}

.map-card {
  position: relative;
  overflow: hidden;
  height: 420px;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(20, 49, 48, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(20, 49, 48, 0.04) 1px, transparent 1px),
    linear-gradient(145deg, #e8f1e5, #d5e9e5);
  background-size: 44px 44px, 44px 44px, auto;
}

.map-visual {
  position: absolute;
  inset: 0;
}

.map-visual svg {
  width: 100%;
  height: 100%;
}

.map-road {
  fill: none;
  stroke: var(--clay);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 12 12;
}

.road-shadow {
  stroke: rgba(18, 60, 58, 0.16);
  stroke-width: 16;
  stroke-dasharray: none;
}

.pin {
  stroke: #fff;
  stroke-width: 5;
}

.start,
.end {
  fill: var(--deep);
}

.stop {
  fill: var(--leaf);
}

.vet {
  fill: var(--clay);
}

.stay {
  fill: var(--sun);
}

.route-summary {
  position: absolute;
  right: 14px;
  top: 14px;
  display: grid;
  gap: 2px;
  min-width: 128px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 30px rgba(18, 60, 58, 0.12);
}

.route-summary span,
.next-stop-card small,
.route-stats span,
.stop-meta,
label span {
  color: var(--muted);
  font-size: 0.82rem;
}

.route-summary strong {
  color: var(--leaf);
  font-size: 2.4rem;
  line-height: 1;
}

.next-stop-card {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.08);
}

.pill {
  width: fit-content;
  padding: 5px 10px;
}

.next-stop-card strong {
  font-size: 1.1rem;
}

.planner-panel,
.saved-trips-panel,
.partner-panel,
.route-board,
.insight-panel,
.pet-section {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.planner-panel,
.saved-trips-panel,
.partner-panel,
.route-board,
.insight-panel,
.pet-section {
  padding: clamp(18px, 3vw, 28px);
}

.section-heading {
  max-width: 650px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 16px;
}

.title-with-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.title-with-logo > div {
  min-width: 0;
}

.title-with-logo h2,
.title-with-logo h3 {
  margin-bottom: 0;
}

.section-logo,
.profile-logo {
  display: block;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 19px;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(19, 53, 51, 0.14);
}

.section-logo.small {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.compact-title {
  margin-bottom: 14px;
}

.trip-form,
.profile-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span {
  font-weight: 780;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(20, 49, 48, 0.14);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  padding: 0 14px;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(31, 87, 81, 0.46);
  box-shadow: 0 0 0 4px rgba(135, 198, 192, 0.22);
}

.form-button {
  white-space: nowrap;
}

.journey-grid {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 22px;
  align-items: start;
}

.saved-trip-list,
.partner-list {
  display: grid;
  gap: 12px;
}

.saved-trips-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: -4px 0 12px;
}

.saved-trips-toolbar span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 820;
}

.saved-trip-card,
.partner-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(20, 49, 48, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
}

.saved-trip-top,
.partner-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.saved-trip-top strong,
.partner-top strong {
  display: block;
  line-height: 1.2;
}

.saved-trip-top span,
.partner-top span,
.partner-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.saved-trip-stats,
.partner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.saved-trip-stats span,
.partner-tags span,
.partner-claim {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--deep);
  background: var(--sage);
  font-size: 0.78rem;
  font-weight: 850;
}

.saved-trip-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.mini-button {
  min-height: 38px;
  border: 0;
  border-radius: 13px;
  padding: 9px 12px;
  color: var(--deep);
  background: rgba(135, 198, 192, 0.22);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 880;
}

.mini-button:hover,
.mini-button:focus-visible {
  color: #fff;
  background: var(--deep);
  outline: none;
}

.mini-button:disabled {
  color: var(--muted);
  background: rgba(76, 88, 86, 0.08);
  cursor: not-allowed;
}

.mini-button.delete {
  color: #8a4737;
  background: rgba(200, 112, 82, 0.13);
}

.mini-button.delete:hover,
.mini-button.delete:focus-visible {
  color: #fff;
  background: var(--clay);
}

.partner-card {
  grid-template-columns: 54px minmax(0, 1fr);
}

.partner-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #fff;
  background: var(--deep-2);
  font-weight: 950;
}

.partner-card.featured {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(246, 225, 189, 0.48));
}

.partner-card.featured .partner-icon {
  color: var(--ink);
  background: var(--sun);
}

.partner-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.partner-claim {
  background: rgba(95, 141, 83, 0.16);
}

.partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.partner-actions a {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 11px;
  color: var(--deep);
  background: rgba(135, 198, 192, 0.2);
  font-size: 0.78rem;
  font-weight: 900;
}

.partner-actions a:hover,
.partner-actions a:focus-visible {
  color: #fff;
  background: var(--deep);
  outline: none;
}

.partner-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.08);
}

.partner-form-heading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.partner-form-heading h3 {
  margin: 0;
}

.partner-lead-tools {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.partner-lead-tools span {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--deep);
  background: rgba(95, 141, 83, 0.16);
  font-size: 0.78rem;
  font-weight: 900;
}

.partner-lead-tools .mini-button {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 0.78rem;
}

.partner-form .compact-button {
  grid-column: 1 / -1;
}

.partner-lead-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.partner-lead-empty,
.partner-lead-card {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.07);
}

.partner-lead-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.partner-lead-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
}

.partner-lead-card strong,
.partner-lead-card small {
  display: block;
}

.partner-lead-card strong {
  color: var(--deep);
  font-size: 0.9rem;
}

.partner-lead-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.partner-lead-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.route-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.route-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.route-stats div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.route-stats strong {
  font-size: 1.25rem;
}

.route-source {
  width: fit-content;
  margin: -4px 0 14px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.08);
  font-size: 0.8rem;
  font-weight: 850;
}

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(20, 49, 48, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
}

.filter-chip.active,
.filter-chip:hover,
.filter-chip:focus-visible {
  color: #fff;
  background: var(--deep);
  outline: none;
}

.stop-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stop-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(20, 49, 48, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.stop-item:not(.empty-stop):hover,
.stop-item:not(.empty-stop):focus-visible,
.stop-item.selected {
  border-color: rgba(31, 87, 81, 0.32);
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

.stop-item:not(.empty-stop):active {
  transform: scale(0.996);
}

.empty-stop {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-weight: 760;
}

.stop-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  background: var(--deep);
  font-weight: 900;
}

.stop-icon.vet {
  background: var(--clay);
}

.stop-icon.stay {
  color: var(--ink);
  background: var(--sun);
}

.stop-icon.park {
  background: var(--leaf);
}

.stop-icon.store {
  background: var(--deep-2);
}

.stop-copy {
  min-width: 0;
}

.stop-copy strong,
.stop-copy span {
  display: block;
}

.stop-copy strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-meta {
  margin-top: 3px;
}

.stop-badge {
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--deep);
  background: var(--sage);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.stop-detail {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(220, 231, 213, 0.52));
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.08);
}

.stop-detail h3 {
  margin-bottom: 4px;
  font-size: 1.12rem;
}

.stop-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.stop-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stop-detail-link,
.stop-detail-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 13px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.08);
  font-size: 0.84rem;
  font-weight: 850;
}

.stop-detail-link:hover,
.stop-detail-link:focus-visible {
  color: #fff;
  background: var(--deep);
  outline: none;
}

.stop-detail-link.booking {
  color: #fff;
  background: var(--deep);
}

.stop-detail-link.secondary {
  background: rgba(135, 198, 192, 0.2);
}

.insight-panel {
  gap: 14px;
}

.alert-card,
.break-panel,
.emergency-card,
.premium-panel,
.pet-card,
.checklist-panel,
.readiness-panel {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.08);
}

.alert-card {
  display: flex;
  gap: 12px;
  padding: 16px;
}

.alert-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: var(--clay);
  border-radius: 15px;
  background: rgba(200, 112, 82, 0.13);
}

.alert-card p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.48;
}

.emergency-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(251, 236, 226, 0.82));
}

.emergency-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.emergency-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.break-panel {
  padding: 18px;
}

.break-list {
  display: grid;
  gap: 9px;
}

.break-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.break-time {
  min-width: 58px;
  padding: 6px 8px;
  border-radius: 12px;
  color: var(--deep);
  background: var(--sage);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.break-item strong,
.break-item span {
  display: block;
}

.break-item span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.premium-panel {
  padding: 18px;
}

.premium-panel ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.premium-panel li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

.premium-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--leaf);
}

.route-usage-copy {
  margin: 16px 0 10px;
  color: var(--deep);
  font-size: 0.86rem;
  font-weight: 800;
}

.plus-button {
  width: 100%;
}

.text-button {
  width: 100%;
  padding: 10px;
  border: 0;
  color: var(--deep);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.paywall-dialog {
  width: min(92vw, 440px);
  max-height: 88vh;
  padding: 0;
  border: 0;
  border-radius: 30px;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 28px 80px rgba(10, 44, 40, 0.28);
}

.paywall-dialog::backdrop {
  background: rgba(8, 31, 29, 0.58);
  backdrop-filter: blur(7px);
}

.paywall-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px;
  background: linear-gradient(160deg, #fffdf8, #edf5e9);
}

.paywall-card img {
  border-radius: 20px;
}

.paywall-card h2,
.paywall-card p,
.paywall-card ul {
  margin: 0;
}

.paywall-card ul {
  display: grid;
  gap: 10px;
  padding-left: 22px;
  color: var(--muted);
}

.paywall-card small {
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.paywall-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.78);
  font-size: 1.5rem;
  cursor: pointer;
}

.pet-section {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: center;
}

.pet-card {
  gap: 16px;
  padding: 18px;
}

.profile-logo {
  width: 86px;
  height: 86px;
  border-radius: 26px;
}

.pet-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.48;
}

.profile-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-form .secondary-button {
  align-self: end;
}

.readiness-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.readiness-panel > div {
  display: grid;
  gap: 5px;
}

.readiness-score {
  color: var(--leaf);
  font-size: 2.2rem;
  font-weight: 950;
  line-height: 1;
}

.readiness-panel ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.readiness-panel li {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  font-size: 0.84rem;
  font-weight: 760;
}

.readiness-panel li::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--leaf);
}

.readiness-panel li.missing {
  color: #8a6a5f;
  background: rgba(241, 185, 90, 0.18);
}

.readiness-panel li.missing::before {
  background: var(--sun);
}

.checklist-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.checklist-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.checklist-heading h3 {
  margin: 0;
}

.checklist-heading span {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--deep);
  background: rgba(135, 198, 192, 0.22);
  font-size: 0.82rem;
  font-weight: 900;
}

.checklist-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 76px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 0 1px rgba(20, 49, 48, 0.07);
  cursor: pointer;
}

.checklist-item input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--leaf);
}

.checklist-item strong,
.checklist-item small {
  display: block;
}

.checklist-item strong {
  color: var(--deep);
  font-size: 0.92rem;
}

.checklist-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.checklist-item.complete {
  background: rgba(220, 231, 213, 0.62);
}

.checklist-item.complete strong {
  color: var(--leaf);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 30;
  transform: translate(-50%, 24px);
  opacity: 0;
  max-width: min(420px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: 16px;
  color: #fff;
  background: rgba(18, 60, 58, 0.94);
  box-shadow: 0 16px 38px rgba(18, 60, 58, 0.24);
  font-weight: 750;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100vw - 20px, 720px);
    padding-top: 10px;
  }

  .topbar {
    border-radius: 22px;
  }

  .topnav button {
    min-width: 54px;
    padding-inline: 10px;
  }

  .hero-section {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .phone-preview {
    justify-self: center;
  }

  .trip-form,
  .profile-form,
  .journey-grid,
  .route-grid,
  .pet-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    width: 100%;
    min-height: 100svh;
    padding: 8px 10px calc(92px + var(--safe-bottom));
  }

  .topbar {
    top: calc(6px + var(--safe-top));
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 64px;
    padding: 8px 12px;
    border-radius: 24px;
  }

  .brand {
    width: auto;
    max-width: 100%;
    gap: 10px;
  }

  .brand > span:not(.brand-mark) {
    min-width: 0;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .brand strong {
    font-size: 1.06rem;
    line-height: 1;
  }

  .brand small {
    max-width: 190px;
    font-size: 0.72rem;
  }

  .topnav {
    display: none;
  }

  .mobile-tabbar {
    position: fixed;
    left: max(10px, var(--safe-left));
    right: max(10px, var(--safe-right));
    bottom: calc(8px + var(--safe-bottom));
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(251, 250, 246, 0.94);
    box-shadow: 0 18px 48px rgba(19, 53, 51, 0.22);
    backdrop-filter: blur(18px);
  }

  .mobile-tabbar button {
    display: grid;
    place-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    border-radius: 18px;
    color: var(--muted);
    border: 0;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
  }

  .mobile-tabbar svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-tabbar button.active,
  .mobile-tabbar button:focus-visible {
    color: var(--deep);
    background: rgba(135, 198, 192, 0.24);
    outline: none;
  }

  main {
    gap: 14px;
    height: calc(100svh - 92px - 82px - var(--safe-top) - var(--safe-bottom));
    min-height: 0;
    padding-top: 12px;
  }

  .app-screen.active {
    min-height: 0;
    height: 100%;
    max-height: 100%;
  }

  .hero-section,
  .planner-panel,
  .route-board,
  .insight-panel,
  .pet-section {
    border-radius: 24px;
  }

  .hero-section {
    padding: 20px 18px 22px;
    overflow: hidden;
  }

  .hero-logo {
    width: 88px;
    height: 88px;
    margin-bottom: 14px;
    border-radius: 22px;
    object-fit: cover;
  }

  h1 {
    font-size: clamp(1.9rem, 9.4vw, 2.55rem);
    line-height: 1.06;
    overflow-wrap: anywhere;
  }

  .hero-lede {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    width: 100%;
  }

  .hero-actions .primary-button {
    width: auto;
    flex: 1;
  }

  .map-card {
    height: 350px;
  }

  .route-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 12px;
  }

  .route-stats div {
    min-width: 0;
    padding: 10px 8px;
    border-radius: 15px;
  }

  .route-stats span {
    font-size: 0.66rem;
    line-height: 1.15;
  }

  .route-stats strong {
    font-size: 1.05rem;
    line-height: 1.1;
  }

  .stop-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .stop-badge {
    grid-column: 2;
    justify-self: start;
  }

  .pet-card {
    align-items: flex-start;
  }

  .title-with-logo {
    align-items: flex-start;
    gap: 11px;
  }

  .section-logo,
  .profile-logo {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .saved-trip-actions,
  .emergency-actions,
  .partner-form,
  .partner-lead-card,
  .readiness-panel,
  .readiness-panel ul,
  .checklist-list {
    grid-template-columns: 1fr;
  }

  .partner-form-heading,
  .checklist-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .partner-lead-tools {
    justify-content: stretch;
  }

  .partner-lead-tools span,
  .partner-lead-tools .mini-button {
    flex: 1;
  }

  .partner-lead-actions {
    justify-content: stretch;
  }

.partner-lead-actions .mini-button {
    flex: 1;
  }
}

.app-screen:not(.active),
.app-screen-companion:not(.active),
.app-shell main > section:not(.active),
.intro-screen {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.app-legal {
  padding: 10px 4px 0;
  text-align: center;
}

.app-legal a {
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .app-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100svh;
    min-height: 0;
    overflow: hidden;
    padding: calc(8px + var(--safe-top)) 10px calc(88px + var(--safe-bottom));
  }

  .app-legal {
    padding-top: 4px;
  }

  .topbar {
    position: relative;
    top: auto;
    z-index: 25;
  }

  main {
    height: auto;
    min-height: 0;
    overflow: hidden;
    padding-top: 12px;
  }

  .app-screen.active {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 18px;
  }

  .journey-grid.app-screen.active,
  .route-grid.app-screen.active,
  .pet-section.app-screen.active,
  .planner-panel.app-screen.active,
  .insight-panel.app-screen.active {
    display: grid;
  }
}
