:root {
  --teal: #49b39c;
  --teal-dark: #1f6e5d;
  --navy: #1a2c30;
  --cream: #fffcd5;
  --paper: #f6f2e8;
  --white: #fffef8;
  --coral: #ee765c;
  --ink-soft: #657578;
  --shadow: 0 18px 45px rgba(26,44,48,.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--navy); }
body { margin: 0; min-width: 320px; background: var(--navy); color: var(--navy); font-family: 'Poppins', sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }

.app-frame {
  position: relative;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(108px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--paper);
  background-image: radial-gradient(rgba(26,44,48,.04) .8px, transparent .8px);
  background-size: 15px 15px;
  box-shadow: 0 0 70px rgba(0,0,0,.25);
}

.app-frame::before { content: ''; position: absolute; z-index: 0; width: 310px; height: 310px; right: -185px; top: 65px; border: 1px solid rgba(73,179,156,.18); border-radius: 50%; box-shadow: 0 0 0 50px rgba(73,179,156,.035); }
.app-frame > * { position: relative; z-index: 1; }
.app-header { display: flex; align-items: center; justify-content: space-between; }
.brand-logo { width: 133px; height: auto; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.round-action, .switch-pet { border: 0; cursor: pointer; }
.round-action { position: relative; display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; background: rgba(255,255,255,.75); color: var(--navy); box-shadow: 0 5px 16px rgba(26,44,48,.06); }
.round-action > span { position: absolute; right: 6px; top: 3px; color: var(--coral); font-size: 18px; }
.owner-avatar { display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--white); border-radius: 50% 46% 54% 50%; background: var(--teal); color: var(--navy); font-family: 'Fredoka'; font-size: 11px; font-weight: 700; }

.welcome-block { margin: 36px 0 25px; animation: rise .55s both; }
.weather-line { margin: 0 0 8px; color: var(--ink-soft); font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.weather-line span { color: #dc9d21; }
.welcome-block h1 { margin: 0; color: var(--navy); font-family: 'Fredoka'; font-size: 42px; font-weight: 500; letter-spacing: -.045em; line-height: .98; }
.welcome-block h1 > span { color: var(--teal-dark); }
.welcome-block h1 strong { font-weight: 600; }

.pet-ticket { position: relative; display: grid; grid-template-columns: 72px 1fr 32px; align-items: center; gap: 13px; min-height: 104px; margin-bottom: 29px; padding: 16px 14px; background: var(--cream); box-shadow: 0 10px 30px rgba(105,100,48,.1); animation: rise .55s .08s both; }
.pet-ticket::after { content: ''; position: absolute; inset: 8px; border: 1px dashed rgba(31,110,93,.18); pointer-events: none; }
.ticket-cut { position: absolute; top: 42px; width: 17px; height: 24px; background: var(--paper); border-radius: 50%; }
.ticket-left { left: -9px; }.ticket-right { right: -9px; }
.pet-portrait { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 48% 52% 44% 56% / 55% 44% 56% 45%; background: var(--navy); color: white; font-family: 'Fredoka'; font-size: 19px; font-weight: 700; }
.pet-portrait i { position: absolute; right: -2px; bottom: 2px; display: grid; place-items: center; width: 21px; height: 21px; border: 2px solid var(--cream); border-radius: 50%; background: var(--coral); color: white; font-size: 9px; font-style: normal; }
.pet-copy { display: grid; }
.pet-copy small, .section-heading small, .promise-card small, .request-sheet > small, .success-view > small { color: var(--teal-dark); font-size: 8px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.pet-copy h2 { margin: 2px 0 0; font-family: 'Fredoka'; font-size: 25px; font-weight: 600; }
.pet-copy p { margin: 1px 0; color: var(--ink-soft); font-size: 9px; }
.pet-position { margin-top: 5px; color: var(--teal-dark); font-size: 8px; font-weight: 700; }
.switch-pet { z-index: 2; width: 29px; height: 29px; border-radius: 50%; background: rgba(26,44,48,.07); color: var(--navy); }
.switch-pet:focus-visible { outline: 3px solid rgba(73,179,156,.38); outline-offset: 2px; }

.quick-section { margin-bottom: 31px; animation: rise .55s .16s both; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.section-heading h2 { margin: 2px 0 0; font-family: 'Fredoka'; font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
.section-heading > span, .text-button { color: var(--teal-dark); font-size: 8px; font-weight: 700; }
.walk-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(112px,1fr)); gap: 10px; }
.walk-option { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; align-items: end; min-height: 127px; padding: 16px; overflow: hidden; border: 1.5px solid rgba(26,44,48,.1); background: rgba(255,255,255,.72); color: var(--navy); cursor: pointer; text-align: left; transition: transform .18s, border .18s, background .18s; }
.walk-option:hover { transform: translateY(-2px); }
.walk-option.selected { border-color: var(--teal); background: var(--teal); box-shadow: 0 14px 30px rgba(73,179,156,.19); }
.walk-option::after { content: ''; position: absolute; width: 82px; height: 82px; right: -32px; top: -39px; border: 1px solid rgba(26,44,48,.11); border-radius: 50%; }
.option-icon { position: absolute; top: 14px; right: 15px; font-size: 19px; }
.walk-option strong { font-family: 'Fredoka'; font-size: 42px; font-weight: 600; line-height: .85; }
.walk-option small { align-self: end; margin: 0 0 2px 4px; color: rgba(26,44,48,.62); font-size: 8px; }
.walk-option em { grid-column: 1 / -1; margin-top: 15px; font-size: 8px; font-style: normal; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.request-button, .confirm-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 10px; padding: 15px 17px; border: 0; background: var(--navy); color: white; font-size: 11px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 24px rgba(26,44,48,.14); }
.request-button span { color: var(--teal); font-size: 20px; }

.active-section, .walkers-section { margin-bottom: 31px; }
.live-badge { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; background: rgba(73,179,156,.13); text-transform: uppercase; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(73,179,156,.4); animation: pulse 2s infinite; }
.active-card { overflow: hidden; background: var(--navy); color: white; box-shadow: var(--shadow); }
.route-canvas { position: relative; height: 170px; overflow: hidden; background: #d7dcc5; }
.mobile-live-map { position: absolute; inset: 0; z-index: 1; }
.mobile-live-map .leaflet-tile-pane, .pickup-map .leaflet-tile-pane { filter: saturate(.55) contrast(.93) sepia(.08); }
.mobile-live-map .leaflet-control-attribution, .pickup-map .leaflet-control-attribution { background: rgba(255,255,255,.76); color: #687779; font-size: 6px; }
.mobile-live-map .leaflet-control-attribution a, .pickup-map .leaflet-control-attribution a { color: var(--teal-dark); }
.mobile-live-map .leaflet-control-zoom { display: none; }
.mobile-gps-label { position: absolute; z-index: 500; left: 10px; top: 10px; display: flex; align-items: center; gap: 5px; padding: 6px 8px; background: rgba(26,44,48,.87); color: white; font-size: 6px; font-weight: 700; letter-spacing: .1em; }
.mobile-gps-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(238,118,92,.16); }
.mobile-route-marker { display: grid; place-items: center; width: 28px; height: 28px; border: 3px solid white; border-radius: 50%; background: var(--navy); color: white; font-family: 'Fredoka'; font-size: 7px; font-weight: 700; box-shadow: 0 5px 14px rgba(26,44,48,.3); }
.mobile-route-marker.walker { background: var(--teal); color: var(--navy); }
.mobile-route-marker.live::after { content: ''; position: absolute; width: 39px; height: 39px; border: 2px solid rgba(238,118,92,.5); border-radius: 50%; animation: pulse-map 1.8s infinite; }
.route-grid { position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(35deg, transparent 44%, #82918b 45%, #82918b 47%, transparent 48%), linear-gradient(130deg, transparent 48%, #82918b 49%, #82918b 51%, transparent 52%); background-size: 95px 72px, 121px 89px; }
.route-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-canvas path { fill: none; stroke: var(--teal-dark); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 10; animation: route 14s linear infinite; }
.route-pin { position: absolute; z-index: 2; display: grid; place-items: center; width: 35px; height: 35px; border: 3px solid white; border-radius: 50%; background: var(--navy); color: white; font-family: 'Fredoka'; font-size: 9px; font-weight: 700; box-shadow: 0 6px 16px rgba(26,44,48,.25); }
.route-start { left: 19px; bottom: 20px; }.route-end { right: 17px; top: 22px; background: var(--teal); color: var(--navy); }
.park-label { position: absolute; left: 42%; top: 50%; padding: 4px 7px; background: rgba(255,252,213,.86); color: var(--navy); font-size: 7px; font-weight: 600; transform: rotate(-4deg); }
.active-info { display: grid; grid-template-columns: 1.2fr .7fr .8fr 35px; align-items: center; gap: 8px; padding: 15px; }
.active-info div { display: grid; }
.active-info small { color: rgba(255,255,255,.42); font-size: 7px; }
.active-info strong { margin-top: 2px; font-size: 9px; }
.active-info button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--teal); color: var(--navy); cursor: pointer; }

.text-button { padding: 0; border: 0; background: none; cursor: pointer; }
.walker-strip { display: grid; grid-auto-columns: minmax(145px, 43%); grid-auto-flow: column; gap: 10px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.walker-strip::-webkit-scrollbar { display: none; }
.walker-card { min-height: 143px; padding: 14px; border: 1px solid rgba(26,44,48,.1); background: rgba(255,255,255,.73); }
.walker-card-top { display: flex; align-items: start; justify-content: space-between; }
.walker-face { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 51% 49% 60% 40% / 43% 60% 40% 57%; background: var(--teal); color: var(--navy); font-family: 'Fredoka'; font-size: 12px; font-weight: 700; }
.walker-score { color: #d5931b; font-size: 8px; font-weight: 700; }
.walker-card h3 { margin: 13px 0 1px; font-family: 'Fredoka'; font-size: 16px; font-weight: 600; }
.walker-card p { margin: 0; color: var(--ink-soft); font-size: 7.5px; line-height: 1.45; }
.verified-line { display: flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--teal-dark); font-size: 7px; font-weight: 700; text-transform: uppercase; }
.verified-line span { display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: var(--teal-dark); color: white; font-size: 7px; }
.loading { color: var(--ink-soft); font-size: 9px; }

.promise-card { position: relative; display: grid; grid-template-columns: 43px 1fr; gap: 15px; margin-top: 3px; padding: 24px 20px; overflow: hidden; background: var(--cream); }
.promise-card::after { content: '🐾'; position: absolute; right: -4px; bottom: -23px; color: rgba(73,179,156,.12); font-size: 80px; transform: rotate(-18deg); }
.promise-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--teal-dark); color: white; font-weight: 700; }
.promise-card h2 { max-width: 300px; margin: 4px 0 5px; font-family: 'Fredoka'; font-size: 20px; font-weight: 600; line-height: 1.05; }
.promise-card p { max-width: 320px; margin: 0; color: var(--ink-soft); font-size: 8px; line-height: 1.6; }

.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 0; display: grid; grid-template-columns: 1fr 1fr 62px 1fr 1fr; align-items: end; width: min(100%, 520px); height: calc(70px + env(safe-area-inset-bottom)); padding: 9px 14px env(safe-area-inset-bottom); background: rgba(255,254,248,.96); border-top: 1px solid rgba(26,44,48,.08); box-shadow: 0 -12px 30px rgba(26,44,48,.08); backdrop-filter: blur(15px); transform: translateX(-50%); }
.bottom-nav a { display: grid; justify-items: center; gap: 3px; color: #8b9697; font-size: 7px; text-decoration: none; }
.bottom-nav a span { font-size: 17px; }
.bottom-nav a.active { color: var(--teal-dark); font-weight: 700; }
.bottom-nav button { align-self: start; display: grid; place-items: center; width: 54px; height: 54px; margin: -27px auto 0; border: 5px solid var(--paper); border-radius: 50%; background: var(--navy); color: var(--cream); font-size: 26px; cursor: pointer; box-shadow: 0 8px 22px rgba(26,44,48,.25); }

.sheet-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(15,29,31,.66); backdrop-filter: blur(4px); }
.request-sheet { position: fixed; z-index: 41; left: 50%; bottom: 0; width: min(100%, 520px); max-height: 94vh; padding: 30px 22px calc(25px + env(safe-area-inset-bottom)); overflow-y: auto; background: var(--white); box-shadow: 0 -30px 70px rgba(0,0,0,.23); transform: translateX(-50%); animation: sheetUp .28s cubic-bezier(.2,.8,.2,1) both; }
.request-sheet::before { content: ''; position: absolute; left: calc(50% - 24px); top: 10px; width: 48px; height: 4px; border-radius: 99px; background: rgba(26,44,48,.16); }
.sheet-close { position: absolute; right: 18px; top: 20px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(26,44,48,.07); color: var(--navy); font-size: 19px; cursor: pointer; }
.sheet-paw { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 50%; background: var(--cream); font-size: 20px; }
.request-sheet h2 { margin: 5px 0 4px; font-family: 'Fredoka'; font-size: 30px; font-weight: 600; }
.request-sheet > p { margin: 0 0 18px; color: var(--ink-soft); font-size: 10px; }
.schedule-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.schedule-option { display: grid; justify-items: start; min-height: 100px; padding: 13px; border: 1.5px solid rgba(26,44,48,.1); background: var(--paper); color: var(--navy); text-align: left; cursor: pointer; }
.schedule-option.selected { border-color: var(--teal); background: rgba(73,179,156,.11); }
.schedule-option > span { font-size: 16px; }
.schedule-option strong { align-self: end; font-size: 9px; }
.schedule-option small { color: var(--ink-soft); font-size: 7px; }
.pickup-location { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid rgba(26,44,48,.1); background: var(--paper); }
.pickup-location > div:first-child { display: grid; gap: 2px; }
.pickup-location small { color: var(--teal-dark); font-size: 6px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pickup-location strong { font-size: 8px; }
.pickup-location > button { padding: 8px 9px; border: 0; background: var(--navy); color: white; font-size: 7px; font-weight: 700; cursor: pointer; }
.pickup-location > button span { color: var(--teal); font-size: 12px; }
.pickup-location > button:disabled { opacity: .55; cursor: wait; }
.pickup-map { grid-column: 1 / -1; height: 145px; margin: 2px -2px -2px; overflow: hidden; }
.pickup-map[hidden] { display: none; }
.pickup-pin { display: grid; place-items: center; width: 29px; height: 29px; border: 3px solid white; border-radius: 50%; background: var(--coral); color: white; font-size: 12px; box-shadow: 0 5px 15px rgba(26,44,48,.3); }
.price-line { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; padding-top: 15px; border-top: 1px solid rgba(26,44,48,.1); color: var(--ink-soft); font-size: 9px; }
.price-line strong { color: var(--navy); font-family: 'Fredoka'; font-size: 20px; }
.confirm-button { justify-content: center; background: var(--teal-dark); }
.confirm-button:disabled { opacity: .55; cursor: wait; }
.sheet-note { margin: 12px 0 0 !important; text-align: center; font-size: 13px !important; line-height: 1.55; }
.sheet-note a { color: var(--teal-deep); font-weight: 700; }

.success-view { position: fixed; z-index: 60; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; background: var(--teal-dark); color: white; text-align: center; }
.success-view[hidden], .request-sheet[hidden], .sheet-backdrop[hidden] { display: none; }
.success-view::before { content: ''; position: absolute; width: 340px; height: 340px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 64px rgba(255,255,255,.025); }
.success-orbit { position: relative; display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 25px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; }
.success-orbit::after { content: ''; position: absolute; width: 120px; height: 120px; border: 1px dashed rgba(255,255,255,.22); border-radius: 50%; animation: spin 12s linear infinite; }
.success-orbit span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--cream); color: var(--teal-dark); font-size: 23px; }
.success-view > small { color: #9aead6; }
.success-view h2 { margin: 10px 0; font-family: 'Fredoka'; font-size: 38px; font-weight: 600; line-height: .96; }
.success-view p { max-width: 310px; color: rgba(255,255,255,.65); font-size: 10px; line-height: 1.6; }
.success-view > strong { margin: 9px 0 28px; padding: 5px 9px; border: 1px solid rgba(255,255,255,.18); font-size: 8px; letter-spacing: .12em; }
.success-view button { padding: 13px 22px; border: 0; background: var(--cream); color: var(--navy); font-size: 10px; font-weight: 700; cursor: pointer; }
.app-toast { position: fixed; z-index: 80; left: 50%; bottom: 90px; width: max-content; max-width: calc(100% - 40px); padding: 11px 15px; background: var(--navy); color: white; font-size: 9px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .2s; }
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(73,179,156,0); } 100% { box-shadow: 0 0 0 0 rgba(73,179,156,0); } }
@keyframes route { to { stroke-dashoffset: -120; } }
@keyframes sheetUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-map { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }

@media (min-width: 800px) {
  body::before { content: 'WALKPET · DEMO ANDROID'; position: fixed; left: 44px; top: 50%; color: rgba(255,255,255,.18); font-size: 10px; font-weight: 700; letter-spacing: .24em; writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Readability pass for real phones and tablets. */
.mobile-shell p,
.mobile-shell small,
.mobile-shell button,
.mobile-shell a,
.request-sheet p,
.request-sheet small,
.request-sheet button,
.success-view p,
.success-view small,
.success-view button,
.app-toast { font-size: 13px; }
.mobile-gps-label, .pickup-location small { font-size: 11px; }
.active-info small, .walker-score, .verified-line, .loading { font-size: 12px; }
.active-info strong, .walker-card p, .promise-card p, .pickup-location strong { font-size: 13px; }
.bottom-nav a { font-size: 11px; }
