:root {
  color-scheme: light;
  --bg: #dfe7ee;
  --screen: #fff3c2;
  --panel: #fffaf0;
  --ink: #161616;
  --muted: #737373;
  --line: #eadfbd;
  --field: #fffdf6;
  --yellow: #ffd612;
  --yellow-soft: #fff0a0;
  --black: #050505;
  --shadow: 0 18px 44px rgba(25, 28, 32, 0.1);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-frame {
  width: min(100%, 440px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--screen);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 30px 26px 28px;
}

.screen.is-active {
  display: block;
}

.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.brand-badge {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  background: var(--yellow);
  box-shadow: 0 10px 22px rgba(255, 214, 18, 0.28);
}

.brand-badge svg {
  width: 31px;
  height: 31px;
  color: #111;
}

.brand-header p {
  margin: 0 0 4px;
  color: #575757;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 5px;
  color: #6f6f6f;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 1.58rem;
  line-height: 1.12;
}

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

.role-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  border-radius: 24px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid rgba(120, 93, 0, 0.14);
  box-shadow: 0 12px 28px rgba(80, 63, 0, 0.08);
}

.role-logo {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.role-logo .brand-badge {
  margin-bottom: 2px;
}

.role-logo h2,
.role-logo p {
  margin: 0;
}

.role-logo h2 {
  font-size: 1.08rem;
}

.role-logo p {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.portal-grid {
  display: grid;
  gap: 12px;
}

.portal-card {
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 14px;
  background: #fffdf6;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.portal-card.is-provider {
  background: #fffaf0;
}

.portal-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, var(--yellow-soft), transparent 72%);
  color: #111;
}

.portal-icon svg {
  width: 24px;
  height: 24px;
}

.portal-card strong {
  font-size: 1rem;
}

.portal-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.portal-action {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  min-width: 158px;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--yellow);
  color: #111;
  font-size: 0.72rem;
  font-weight: 900;
}

.help-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  border-radius: 14px;
  padding: 11px;
  background: #f5f5f5;
  color: #6a6a6a;
  font-size: 0.72rem;
  font-weight: 800;
}

.help-strip a {
  color: #111;
  text-decoration: none;
}

.service-area-card {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  padding: 16px;
  background: #171717;
  color: #fff8d6;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.service-area-card h2 {
  margin-bottom: 6px;
  color: #fff;
  font-size: 1.1rem;
}

.service-area-card .kicker {
  color: #ffd612;
}

.service-area-card p {
  margin-bottom: 0;
  color: #ddd4aa;
  font-size: 0.87rem;
  line-height: 1.45;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.service-area-card a {
  color: #ffd612;
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.service-card {
  display: grid;
  min-height: 134px;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(120, 93, 0, 0.16);
  border-radius: 22px;
  padding: 16px 10px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(80, 63, 0, 0.08);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.service-card:hover,
.service-card.is-selected {
  border-color: rgba(255, 214, 18, 0.9);
  box-shadow: 0 12px 28px rgba(255, 214, 18, 0.2);
  transform: translateY(-1px);
}

.service-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, var(--yellow-soft), transparent 72%);
  color: #111;
}

.service-icon svg {
  width: 25px;
  height: 25px;
}

.service-card strong {
  margin-top: 11px;
  font-size: 1.08rem;
}

.service-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.section-heading {
  margin: 26px 0 12px;
  text-align: center;
  font-size: 1.05rem;
}

.list-panel {
  display: grid;
  gap: 10px;
}

.list-row,
.emergency-card {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 14px;
  border-radius: 18px;
  padding: 16px;
  text-align: left;
}

.list-row {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}

.list-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: #fff1ad;
}

.list-icon svg,
.chevron {
  width: 18px;
  height: 18px;
}

.chevron {
  margin-left: auto;
  color: #9a9a9a;
}

.emergency-card {
  margin-top: 42px;
  min-height: 86px;
  background: #000;
  color: #fff;
}

.emergency-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #111;
}

.emergency-icon svg {
  width: 23px;
  height: 23px;
}

.emergency-card strong {
  display: block;
  font-size: 1rem;
}

.emergency-card small {
  display: block;
  margin-top: 4px;
  color: #c8c8c8;
  font-size: 0.8rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 28px;
  padding: 4px 0 10px;
}

.legal-links a {
  color: #4f4700;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.screen-topbar {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.screen-topbar h1 {
  text-align: center;
}

.back-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}

.back-button svg {
  width: 23px;
  height: 23px;
}

.request-screen {
  padding-bottom: 92px;
}

.request-form {
  display: grid;
  gap: 28px;
  padding-bottom: 92px;
}

.request-form-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 20px;
  padding: 16px;
  background: #111;
  color: #fff;
}

.request-form-hero p,
.request-form-hero strong,
.request-form-hero span {
  display: block;
  margin: 0;
}

.request-form-hero p {
  color: var(--yellow);
  font-size: 0.76rem;
  font-weight: 900;
}

.request-form-hero strong {
  margin-top: 5px;
  font-size: 1.1rem;
  line-height: 1.1;
}

.request-form-hero span {
  margin-top: 7px;
  color: #ddd4aa;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.hero-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  background: var(--yellow);
  color: #111;
}

.hero-icon svg {
  width: 25px;
  height: 25px;
}

.form-section h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 1.12rem;
}

.form-section h2 svg {
  width: 19px;
  height: 19px;
  color: var(--yellow);
  fill: var(--yellow);
}

.yellow-dot {
  width: 18px;
  height: 18px;
  border: 4px solid var(--yellow);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--screen);
}

.mini-map {
  position: relative;
  display: grid;
  min-height: 178px;
  align-content: end;
  border-radius: 8px;
  padding: 15px;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(255, 255, 255, 0.18) 42% 48%, transparent 48%),
    #bfbfbf;
  overflow: hidden;
}

.map-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 180ms ease;
}

.map-canvas.is-ready {
  opacity: 1;
}

.map-canvas.has-error {
  opacity: 0.18;
}

.map-error {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 4;
  border: 1px solid #f0d15a;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 253, 246, 0.94);
  color: #181818;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.3;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.destination-field {
  margin-top: 14px;
}

.map-pin {
  position: absolute;
  z-index: 1;
  top: 73px;
  left: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  background: #f04444;
  transform: translateX(-50%) rotate(-45deg);
}

.map-pin::after {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.address-pill,
.input-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.address-pill {
  position: relative;
  z-index: 2;
  min-height: 48px;
  border-radius: 10px;
  padding: 0 14px;
  background: var(--field);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.address-pill svg,
.input-with-icon svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font-size: 0.92rem;
}

input {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 48px;
  resize: vertical;
  padding: 12px;
}

.address-pill input,
.input-with-icon input {
  border: 0;
  padding: 0;
}

.location-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 12px;
  border: 1px solid #ebdc82;
  border-radius: 12px;
  background: #fff9d7;
  color: #111;
  font-size: 0.86rem;
  font-weight: 900;
}

.location-button svg {
  width: 18px;
  height: 18px;
}

.location-status {
  margin: 8px 2px 0;
  color: #676767;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.35;
}

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

.share-location {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: #565656;
  font-size: 0.9rem;
}

.share-location input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 36px;
  height: 18px;
  border-radius: 999px;
  background: #dcdcdc;
}

.toggle-track::after {
  position: absolute;
  top: -2px;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2d9ee9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  content: "";
}

.share-location input:checked + .toggle-track {
  background: var(--yellow);
}

.share-location input:not(:checked) + .toggle-track::after {
  transform: translateX(14px);
  background: #777;
}

.service-area-mini {
  border: 1px solid #f0e6b4;
  border-radius: 18px;
  padding: 14px;
  background: #fff8dc;
}

.service-area-mini strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.service-area-mini p {
  margin-bottom: 0;
  color: #686868;
  font-size: 0.82rem;
  line-height: 1.45;
}

.confirm-button {
  position: fixed;
  right: max(20px, calc((100vw - 440px) / 2 + 20px));
  bottom: 22px;
  left: max(20px, calc((100vw - 440px) / 2 + 20px));
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  background: var(--yellow);
  color: #111;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(255, 214, 18, 0.3);
}

.confirm-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.tracking-screen {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #bfbfbf;
}

.tracking-map {
  position: relative;
  min-height: 58vh;
  background:
    linear-gradient(140deg, transparent 0 46%, rgba(255, 255, 255, 0.15) 46% 51%, transparent 51%),
    #bfbfbf;
}

.tracking-map-canvas {
  min-height: 100%;
}

.tracking-status {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 22px;
  left: 22px;
  display: grid;
  grid-template-columns: 42px 1fr 58px;
  align-items: center;
  gap: 8px;
  border-radius: 22px;
  padding: 12px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.tracking-status strong,
.tracking-status span {
  display: block;
}

.tracking-status strong {
  font-size: 0.98rem;
}

.tracking-status span {
  margin-top: 5px;
  font-size: 1.1rem;
}

.status-clock {
  display: grid;
  width: 48px;
  height: 34px;
  place-items: center;
  border-radius: 18px;
  background: var(--yellow);
}

.status-clock svg {
  width: 18px;
  height: 18px;
}

.call-float {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 26px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #000;
  color: #fff;
}

.call-float svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.4;
}

.tracking-sheet {
  position: relative;
  min-height: 42vh;
  border-radius: 34px 34px 0 0;
  padding: 30px 26px 28px;
  background: var(--screen);
}

.sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

.sheet-title-row h2 {
  margin-bottom: 6px;
  font-size: 1.62rem;
  line-height: 1.1;
}

.sheet-title-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.star {
  color: #111;
}

.truck-badge {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--panel);
}

.truck-badge svg {
  width: 23px;
  height: 23px;
  fill: #111;
}

.trip-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 24px 0;
  text-align: center;
}

.destination-summary {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  padding: 0 0 20px;
}

.destination-summary span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.destination-summary strong {
  font-size: 0.94rem;
  line-height: 1.25;
}

.trip-stats div {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.trip-stats svg {
  width: 22px;
  height: 22px;
}

.trip-stats strong {
  min-height: 34px;
  font-size: 0.92rem;
  line-height: 1.1;
}

.trip-stats small {
  color: var(--muted);
  font-size: 0.72rem;
}

.tracking-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cancel-button,
.message-button,
.pay-button {
  min-height: 48px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 800;
}

.cancel-button {
  border: 1px solid var(--line);
  background: var(--panel);
}

.message-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--yellow);
}

.pay-button {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #111;
  color: #fff;
  text-decoration: none;
}

.pay-button[hidden] {
  display: none;
}

.message-button svg,
.pay-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.toast {
  position: fixed;
  right: max(18px, calc((100vw - 440px) / 2 + 18px));
  bottom: 82px;
  left: max(18px, calc((100vw - 440px) / 2 + 18px));
  z-index: 20;
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 760px) {
  body {
    padding: 24px 0;
  }

  .app-frame {
    min-height: calc(100vh - 48px);
    border-radius: 26px;
    overflow: hidden;
  }

  .screen {
    min-height: calc(100vh - 48px);
  }
}

@media (max-width: 390px) {
  .screen {
    padding-right: 20px;
    padding-left: 20px;
  }

  .service-grid,
  .field-grid {
    gap: 10px;
  }

  .service-card {
    min-height: 126px;
  }

  .tracking-actions {
    grid-template-columns: 1fr;
  }
}
