:root {
  --bg: #FBF6EC;
  --card: #FFFFFF;
  --ink: #22302B;
  --muted: #6B7A74;
  --line: #E9E1D2;
  --green: #1F6F54;
  --green-dark: #17543F;
  --amber: #E9A23B;
  --red: #C4553B;
  --wa: #25D366;
  --radius: 22px;
  --shadow: 0 6px 20px rgba(60, 45, 20, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 17px; line-height: 1.35; }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
h1 { font-size: 26px; margin: 0; }
h2 { font-size: 15px; margin: 22px 4px 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.top { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px; }
.top .back { width: 46px; height: 46px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 22px; }
.top h1 { flex: 1; }
.main { flex: 1; padding: 8px 16px 110px; }

.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex;
  background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.nav a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; padding: 6px 0; border-radius: 16px; position: relative; }
.nav a span { display: block; font-size: 26px; line-height: 1.1; }
.nav a.on { color: var(--green); background: #EAF4EF; }
.dot { position: absolute; top: 4px; right: 26%; min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; line-height: 20px; }

.hero { background: linear-gradient(140deg, var(--green), #2E8C6B); color: #fff; border-radius: 28px; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.hero h1 { font-size: 30px; }
.hero p { margin: 4px 0 0; opacity: .9; }

.big { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; background: var(--card); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); font-size: 21px; font-weight: 700; text-decoration: none; color: var(--ink); }
.big .ico { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; font-size: 42px; flex: none; }
.big .arrow { margin-left: auto; color: var(--muted); font-size: 24px; }
.ico.a { background: #E3F1EA; } .ico.b { background: #FCEFD6; } .ico.c { background: #F8E1DA; }
.big:active, .tile:active, .btn:active, .chip:active { transform: scale(.98); }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
a.card { display: block; text-decoration: none; color: inherit; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 15px; }
.center { text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tiles.two { grid-template-columns: repeat(2, 1fr); }
.tile { border-radius: 20px; padding: 14px 6px; text-align: center; background: var(--card); border: 3px solid var(--line); font-weight: 700; font-size: 15px; }
.tile .e { display: block; font-size: 38px; line-height: 1.2; }
.tile small { display: block; font-weight: 500; color: var(--muted); }
.tile.on { border-color: var(--green); background: #EAF4EF; }
.tile.place { color: #fff; border-color: transparent; opacity: .55; }
.tile.place small { color: rgba(255,255,255,.85); }
.tile.place.on { opacity: 1; box-shadow: 0 0 0 4px var(--ink); }
.tile.place:disabled { opacity: .15; }

.route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 700; }
.pill { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 15px; white-space: nowrap; }
.swap { width: 48px; height: 48px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 22px; flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border-radius: 999px; padding: 11px 18px; background: var(--card); border: 2px solid var(--line); font-weight: 700; }
.chip.on { border-color: var(--green); background: var(--green); color: #fff; }

.input { width: 100%; padding: 15px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); font-size: 19px; }
.input:focus { outline: none; border-color: var(--green); }
.input.price { font-size: 30px; font-weight: 800; text-align: center; }
label.field { display: block; margin: 0 4px 6px; font-weight: 600; color: var(--muted); font-size: 15px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 17px; border-radius: 18px;
  background: var(--green); color: #fff; font-size: 20px; font-weight: 800; margin-top: 12px; text-decoration: none; }
.btn:disabled { opacity: .4; }
.btn.wa { background: var(--wa); }
.btn.amber { background: var(--amber); color: #3b2a05; }
.btn.light { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.btn.red { background: #FBEAE5; color: var(--red); }
.btn.small { width: auto; padding: 11px 16px; font-size: 16px; margin: 0; }

.photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 18px; background: #EFE8DA; }
.photo-btn { width: 100%; aspect-ratio: 16/9; border-radius: 20px; border: 3px dashed #CDBFA5; background: #FFFDF8; font-size: 18px; font-weight: 700; color: var(--muted); overflow: hidden; }
.photo-btn .e { display: block; font-size: 48px; }
.photo-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; }
.avatar.lg { width: 84px; height: 84px; font-size: 34px; }
.price-tag { font-size: 24px; font-weight: 800; color: var(--green-dark); white-space: nowrap; }
.thumb { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: #F2ECDF; display: grid; place-items: center; font-size: 36px; flex: none; }
.tag { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700; background: #EAF4EF; color: var(--green-dark); }
.tag.amber { background: #FCEFD6; color: #7A5206; } .tag.red { background: #FBEAE5; color: var(--red); }
audio { width: 100%; margin-top: 10px; }

.steps { display: flex; justify-content: space-between; margin: 4px 0 2px; position: relative; }
.steps::before { content: ""; position: absolute; top: 25px; left: 12%; right: 12%; height: 4px; background: var(--line); }
.step { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); position: relative; }
.step span { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 4px; border-radius: 50%; background: #F2ECDF; font-size: 26px; filter: grayscale(1); opacity: .5; }
.step.on { color: var(--green-dark); }
.step.on span { background: #D8EFE3; filter: none; opacity: 1; box-shadow: 0 0 0 3px var(--green); }

.code { font-size: 44px; font-weight: 800; letter-spacing: .25em; text-align: center; color: var(--green-dark); }
.stars button { font-size: 40px; padding: 2px; filter: grayscale(1); opacity: .4; }
.stars button.on { filter: none; opacity: 1; }
.tabs { display: flex; gap: 8px; margin: 14px 0; }
.tabs .chip { flex: 1; text-align: center; padding: 10px 4px; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.empty .e { font-size: 54px; display: block; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 50; font-weight: 600; max-width: 90%; text-align: center; }
.langs { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }

.mapbox { height: 240px; border-radius: 18px; overflow: hidden; margin-top: 10px; z-index: 0; }
.sheet { position: fixed; inset: 0; background: var(--bg); z-index: 40; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; }
.sheet .mapbox { flex: 1; height: auto; border-radius: 0; margin: 0; }
.sheet .bar { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.sheet .bar .btn { margin: 0; }

.cal { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.16em; background: no-repeat center/contain
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F6F54' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3' fill='%23fff'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3Cg fill='%231F6F54' stroke='none'%3E%3Ccircle cx='8' cy='14' r='1.3'/%3E%3Ccircle cx='12' cy='14' r='1.3'/%3E%3Ccircle cx='16' cy='14' r='1.3'/%3E%3Ccircle cx='8' cy='17.6' r='1.3'/%3E%3Ccircle cx='12' cy='17.6' r='1.3'/%3E%3C/g%3E%3C/svg%3E"); }
.chip.on .cal { filter: brightness(0) invert(1); }
.facts { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.pill { padding: 5px 14px; }

.select { margin-bottom: 12px; }
.select-btn, .select-list button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font-size: 19px; }
.select-btn { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 15px 16px; box-shadow: var(--shadow); }
.select-btn.open { border-color: var(--green); border-radius: 18px 18px 0 0; }
.select-btn .lbl { color: var(--muted); font-weight: 600; font-size: 15px; min-width: 34px; }
.select small { color: var(--muted); }
.select .caret { margin-left: auto; color: var(--muted); font-size: 18px; }
.select-list { background: var(--card); border: 2px solid var(--green); border-top: 0; border-radius: 0 0 18px 18px; overflow: hidden; box-shadow: var(--shadow); }
.select-list button { padding: 16px; border-top: 1px solid var(--line); }
.select-list button.on { background: #EAF4EF; }
.select-list button.on .caret { color: var(--green); }
.dotc { width: 18px; height: 18px; border-radius: 50%; flex: none; }

.pick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 3px solid transparent;
  border-radius: var(--radius); padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); position: relative; opacity: .7; }
.pick.on { border-color: var(--green); opacity: 1; }
.pick .thumb { width: 56px; height: 56px; font-size: 28px; }
.pick .dot { top: -6px; right: -4px; }

.card.done { text-align: center; background: #E3F1EA; box-shadow: none; }
.big-check { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: var(--green); color: #fff; font-size: 30px; font-weight: 800; display: grid; place-items: center; }
.return-q { font-size: 23px; font-weight: 800; margin: 10px 0 12px; }

.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(34, 48, 43, .55); display: grid; place-items: center; padding: 20px; }
.overlay .card { width: 100%; max-width: 420px; margin: 0; }

.mapbox.small { height: 170px; }
.mapbox.route { height: 46vh; min-height: 260px; }
.numpin { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px;
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); flex: none; }
.numpin.off { background: #F2ECDF; color: var(--ink); box-shadow: none; border-color: var(--line); }
.stop { border: 3px solid transparent; }
.stop.on { border-color: var(--green); }
.modes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tile { line-height: 1.2; }
.sheet .hint { text-align: center; font-weight: 700; padding: 0 16px 10px; color: var(--muted); }

.offline { position: sticky; top: 0; z-index: 30; background: #3B2A05; color: #FFE7B3; text-align: center; font-weight: 700; font-size: 15px; padding: 8px 12px; }

.pending { position: sticky; top: 0; z-index: 31; display: block; width: 100%; background: var(--amber); color: #3b2a05; text-align: center; font-weight: 800; font-size: 15px; padding: 9px 12px; }
.card.later { background: #FCEFD6; color: #7A5206; font-weight: 700; box-shadow: none; }
.card.failed { background: #FBEAE5; box-shadow: none; }
