html, body { overflow: hidden; overscroll-behavior: none; }
#map { position: fixed; inset: 0; z-index: 0; }
#boot { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; background: var(--bg); }
#topbar { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 600; display: flex; justify-content: space-between; pointer-events: none; }
.round { pointer-events: auto; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 20px; cursor: pointer; color: var(--ink); }
#pin-center { position: fixed; left: 50%; top: 42%; z-index: 550; transform: translate(-50%, -100%); pointer-events: none; }
#pin-center span { display: block; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); border: 4px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.4); margin: 0 auto; }
#pin-center.dest span { background: #111827; }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 700; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow); padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 82vh; overflow: auto; }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 12px; }
@media (min-width: 800px) { .sheet { left: 20px; right: auto; width: 430px; bottom: 20px; border-radius: 24px; } #topbar { left: 470px; } }

.where { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--surface-2); border: 0; border-radius: 16px; padding: 16px; font-size: 18px; font-weight: 650; text-align: left; cursor: pointer; }
.where .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); flex: none; }
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; margin-top: 10px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.place-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.place-row:last-child { border-bottom: 0; }
.place-ico { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: none; font-size: 17px; }

#overlay, #picker { position: fixed; inset: 0; z-index: 900; background: var(--surface); display: flex; flex-direction: column; }
#picker { z-index: 950; }
#overlay .head, #picker .head { padding: calc(12px + env(safe-area-inset-top)) 14px 10px; border-bottom: 1px solid var(--line); }
#overlay .body, #picker .body { flex: 1; overflow: auto; padding: 4px 14px calc(14px + env(safe-area-inset-bottom)); }
.route-inputs { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.route-inputs .input { padding-left: 38px; background-repeat: no-repeat; }

#drawer { position: fixed; inset: 0; z-index: 1100; background: rgba(8,12,20,.45); }
#drawer .panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(86vw, 340px); background: var(--surface); padding: calc(20px + env(safe-area-inset-top)) 0 20px; overflow: auto; animation: slidein .2s ease; }
@keyframes slidein { from { transform: translateX(-30px); opacity: .5; } }
#drawer .item { display: flex; align-items: center; gap: 14px; padding: 14px 22px; font-size: 17px; cursor: pointer; width: 100%; background: none; border: 0; text-align: left; }
#drawer .item:active { background: var(--surface-2); }

#auth { position: fixed; inset: 0; z-index: 3500; background: var(--bg); display: grid; place-items: center; padding: 20px; overflow: auto; }
#auth .box { width: min(100%, 400px); }
#auth .logo { font-size: 38px; font-weight: 850; color: var(--brand); letter-spacing: -.02em; margin-bottom: 4px; }
.phone-row { display: flex; gap: 8px; }
.phone-row .pre { background: var(--surface-2); border-radius: 12px; padding: 0 14px; display: grid; place-items: center; font-weight: 700; }

.tariffs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px; scroll-snap-type: x proximity; scrollbar-width: none; }
.tariffs::-webkit-scrollbar { display: none; }
.tariff { flex: none; width: 128px; border: 2px solid var(--line); border-radius: 16px; padding: 10px; background: var(--surface); cursor: pointer; scroll-snap-align: start; text-align: left; }
.tariff.active { border-color: var(--brand); background: var(--brand-soft); }
.tariff .nm { font-weight: 750; }
.tariff .pr { font-size: 18px; font-weight: 800; margin-top: 4px; }
.tariff .old { text-decoration: line-through; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.tariff .eta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.tariff.off { opacity: .55; }
.tariff svg { width: 54px; height: 28px; display: block; margin-bottom: 4px; }
.surge-note { background: color-mix(in srgb, var(--warn) 18%, transparent); color: #92400e; padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
@media (prefers-color-scheme: dark) { .surge-note { color: #fcd34d; } }

.pay-row, .opt-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.pin-box { display: flex; gap: 6px; justify-content: center; margin: 4px 0; }
.pin-box span { width: 44px; height: 54px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 28px; font-weight: 800; }
.plate { display: inline-block; border: 2px solid var(--ink); border-radius: 8px; padding: 2px 10px; font-weight: 800; letter-spacing: .08em; background: var(--surface); }

.pulse { position: relative; width: 64px; height: 64px; margin: 4px auto 10px; }
.pulse i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--brand); animation: ring 1.8s ease-out infinite; opacity: 0; }
.pulse i:nth-child(2) { animation-delay: .6s; } .pulse i:nth-child(3) { animation-delay: 1.2s; }
.pulse b { position: absolute; inset: 22px; border-radius: 50%; background: var(--brand); }
@keyframes ring { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }

.actions-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface-2); border: 0; border-radius: 14px; padding: 10px 4px; font-size: 12px; font-weight: 650; cursor: pointer; position: relative; }
.act .ico { font-size: 22px; }
.act .dot { position: absolute; top: 6px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.act.sos { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.chat-list { max-height: 45vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.bubble { max-width: 80%; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); align-self: flex-start; }
.bubble.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0; }
.receipt { background: var(--surface-2); border-radius: 14px; padding: 12px; }
.receipt .line { display: flex; justify-content: space-between; padding: 3px 0; }
.big-price { font-size: 30px; font-weight: 850; }
.fav-add { border: 1.5px dashed var(--line); background: transparent; }
