:root {
  --jungle: #0f5f4f;
  --jungle-2: #0b4a3d;
  --sand: #f7efe3;
  --sand-2: #efe2cf;
  --coral: #e8735a;
  --coral-2: #cf5b43;
  --cenote: #2bb3a6;
  --ink: #1d2622;
  --muted: #5f6b65;
  --line: #e2d6c4;
  --card: #fffdf9;
  --ok: #1f8a5b;
  --warn: #b7791f;
  --bad: #c2412d;
  --r: 18px;
  --shadow: 0 6px 24px rgba(15, 50, 40, .08);
  --display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--sand); font-size: 16px; line-height: 1.45; }
a { color: var(--jungle); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
main { max-width: 980px; margin: 0 auto; padding: 0 16px 40px; outline: none; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(247, 239, 227, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--display); font-weight: 700; font-size: 24px; text-decoration: none; color: var(--jungle); letter-spacing: -.5px; display: flex; align-items: baseline; gap: 4px; }
.brand-mark { color: var(--coral); font-size: 20px; }
.brand-dot { color: var(--coral); }
.brand small { font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-left: 4px; }
.top-nav { display: flex; gap: 12px; align-items: center; }
.top-nav a { font-weight: 600; text-decoration: none; font-size: 15px; }
.lang { border: 1.5px solid var(--jungle); background: transparent; color: var(--jungle); border-radius: 99px; padding: 4px 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.demo-bar { background: var(--coral); color: #fff; font-size: 13px; text-align: center; padding: 6px 12px; font-weight: 500; }

/* hero */
.hero { margin: 0 -16px; padding: 28px 16px 24px; background: radial-gradient(120% 90% at 100% 0%, var(--cenote) 0%, transparent 55%), linear-gradient(160deg, var(--jungle) 0%, var(--jungle-2) 100%); color: #fff; border-radius: 0 0 28px 28px; }
.hero h1 { font-family: var(--display); font-size: clamp(30px, 8vw, 48px); line-height: 1.05; margin: 0 0 8px; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: #ffd2c4; }
.hero p { margin: 0 0 18px; color: #d6ece6; font-size: 17px; }
.search { display: flex; background: #fff; border-radius: 99px; padding: 6px; box-shadow: var(--shadow); }
.search input { flex: 1; border: 0; outline: 0; padding: 10px 14px; background: transparent; min-width: 0; font-size: 16px; }
.search button { border: 0; background: var(--coral); color: #fff; border-radius: 99px; padding: 10px 18px; font-weight: 700; cursor: pointer; }

/* chips */
.section-title { font-family: var(--display); font-size: 22px; margin: 26px 0 12px; letter-spacing: -.3px; }
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; font-size: 13px; font-weight: 600; text-align: center; }
.cat span { font-size: 26px; }
.cat[aria-pressed="true"] { border-color: var(--jungle); background: #e3f1ec; color: var(--jungle); }
.zones { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.zones::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--jungle); color: #fff; border-color: var(--jungle); }

/* business cards */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } .cats { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.card { display: block; background: var(--card); border-radius: var(--r); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.cover { position: relative; height: 130px; display: grid; place-items: center; font-size: 54px; }
.badge { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 700; border-radius: 99px; padding: 3px 8px; letter-spacing: .5px; text-transform: uppercase; }
.card-body { padding: 12px 14px 14px; }
.card-body h3 { margin: 0 0 2px; font-size: 18px; }
.meta { color: var(--muted); font-size: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.stars { color: var(--ink); font-weight: 700; }
.stars::before { content: '★ '; color: #f2a93b; }
.from { margin-top: 8px; font-weight: 600; color: var(--jungle); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* business page */
.back { display: inline-block; margin: 14px 0 8px; text-decoration: none; font-weight: 600; }
.biz-cover { height: 180px; border-radius: var(--r); display: grid; place-items: center; font-size: 80px; position: relative; }
.biz-head h1 { font-family: var(--display); font-size: 30px; margin: 14px 0 4px; letter-spacing: -.5px; line-height: 1.1; }
.biz-head p { margin: 8px 0; }
.tabs { display: flex; gap: 6px; margin: 18px 0 8px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 12px; text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; }
.tabs a.on { color: var(--jungle); border-color: var(--jungle); }
.service { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.service h4 { margin: 0; font-size: 17px; }
.service .dur { color: var(--muted); font-size: 14px; }
.service .price { font-weight: 700; margin-top: 2px; }
.btn { border: 0; background: var(--jungle); color: #fff; font-weight: 700; border-radius: 99px; padding: 10px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; }
.btn:hover { background: var(--jungle-2); }
.btn.coral { background: var(--coral); }
.btn.coral:hover { background: var(--coral-2); }
.btn.ghost { background: transparent; color: var(--jungle); border: 1.5px solid var(--jungle); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.block { width: 100%; padding: 14px; font-size: 17px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.review b { display: block; }
.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; }

/* bottom sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(10, 30, 25, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--sand); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
@media (min-width: 640px) { .sheet-bg { align-items: center; } .sheet { border-radius: 24px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sheet h2 { font-family: var(--display); margin: 0; font-size: 24px; line-height: 1.15; }
.x { border: 0; background: var(--sand-2); width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; flex: none; }
.steps { display: flex; gap: 6px; margin: 12px 0 16px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--coral); }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.day { flex: none; width: 58px; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 8px 0; text-align: center; cursor: pointer; }
.day small { display: block; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.day b { font-size: 20px; }
.day[aria-pressed="true"] { background: var(--jungle); border-color: var(--jungle); color: #fff; }
.day[aria-pressed="true"] small { color: #cfe7df; }
.day.closed { opacity: .4; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.slot { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 0; font-weight: 600; cursor: pointer; }
.slot[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; }
.summary { background: var(--card); border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); margin: 12px 0; font-size: 15px; }
.summary div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.field { display: block; margin: 12px 0; }
.field span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; font-size: 16px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--cenote); border-color: transparent; }
.err { color: var(--bad); font-weight: 600; font-size: 14px; min-height: 1em; }
.note { color: var(--muted); font-size: 13px; }

/* confirmation */
.done { text-align: center; padding: 10px 0; }
.done .tick { width: 70px; height: 70px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 36px; margin: 0 auto 10px; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 26px; letter-spacing: 3px; font-weight: 700; background: #fff; border: 2px dashed var(--jungle); border-radius: 12px; padding: 8px 14px; display: inline-block; margin: 6px 0; }
.actions { display: grid; gap: 10px; margin-top: 14px; }

/* status pills + panel */
.pill { display: inline-block; white-space: nowrap; flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .4px; }
.pill.pending { background: #fdf0d5; color: var(--warn); }
.pill.confirmed { background: #d9f2e5; color: var(--ok); }
.pill.cancelled { background: #fbe1dc; color: var(--bad); }
.pill.done { background: #e4e8e6; color: var(--muted); }
.page-title { font-family: var(--display); font-size: 28px; margin: 22px 0 6px; letter-spacing: -.5px; }
.bk { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.bk-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.bk h3 { margin: 0; font-size: 18px; }
.bk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 26px; font-family: var(--display); color: var(--jungle); }
.stat small { color: var(--muted); font-size: 13px; }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 8px 0 14px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; box-shadow: var(--shadow); max-width: 480px; margin: 20px auto; }

.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 16px 40px; border-top: 1px solid var(--line); }
.foot p { margin: 8px 0 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; z-index: 80; font-weight: 600; font-size: 14px; animation: up .2s; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* linked photos (boceto) */
.cover, .biz-cover { overflow: hidden; }
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge { z-index: 1; }
.credit { margin: 6px 2px 0; font-size: 12px; color: var(--muted); }
.credit a { color: var(--muted); }

/* payments */
.pay-row { background: #fdf0e9; margin: 4px -8px; padding: 6px 8px !important; border-radius: 8px; color: var(--coral-2); }
.policy { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 12px 0; font-size: 14px; text-align: left; }
.policy summary { font-weight: 700; cursor: pointer; }
.policy ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.policy li { margin: 3px 0; }
.pill.pay-paid { background: #d9f2e5; color: var(--ok); }
.pill.pay-awaiting, .pill.pay-review { background: #fdf0d5; color: var(--warn); }
.pill.pay-rejected, .pill.pay-expired, .pill.pay-paid_conflict, .pill.pay-error { background: #fbe1dc; color: var(--bad); }
.pill.expired { background: #e4e8e6; color: var(--muted); }
.tick.wait { background: var(--warn); }
.tick.bad { background: var(--bad); }
.sim-head { background: var(--ink); color: #fff; font-weight: 700; border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }

/* rewards + reminders */
.reward > span:first-child { display: inline-flex; gap: 6px; }
.reward { background: #fff6e8; border: 1px dashed var(--coral); border-radius: 14px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.rw-me { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.stamps { display: inline-flex; gap: 4px; }
.stamps i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--coral); display: inline-block; }
.stamps i.on { background: var(--coral); }
.rw-row b, .rw-row span { color: var(--ok); }
.pill.rw { background: #fff0e0; color: var(--coral); text-transform: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 0; }
.stamp-tag { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.stamp-tag .stamps i { width: 11px; height: 11px; }
.rem-banner { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--jungle); color: #fff; text-decoration: none; font-size: 14px; }
.rem .actions .btn { font-size: 17px; padding: 14px; }
.rem-bell { font-size: 40px; text-align: center; }
.settings { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 12px 0; }
.settings summary { cursor: pointer; font-weight: 700; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; align-items: end; margin-top: 10px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 8px 0; }
.rem-banner b { white-space: nowrap; }

/* familiar marketplace chrome: clean sans everywhere, top links on desktop, bottom tab bar on phones */
h1, h2, h3, .brand, .section-title, .page-title, .hero h1 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
.brand { letter-spacing: -.04em; }
.top { background: rgba(255, 255, 255, .94); }
.nav-d { color: var(--ink) !important; padding: 8px 12px; border-radius: 99px; }
.nav-d:hover, .nav-d.on { background: var(--sand); }
.nav-biz { border: 1.5px solid var(--line); }
.tabbar { display: none; }
@media (max-width: 720px) {
  .nav-d { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on { color: var(--jungle); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* owner profile editor + legal */
.ok-line { color: var(--ok); font-weight: 600; margin: 8px 0; }
.warn-line { color: var(--warn); font-weight: 600; margin: 8px 0; }
.svc-row { display: grid; grid-template-columns: 1fr 100px 80px auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.svc-row input, .hrow input[type=time] { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; min-width: 0; }
@media (max-width: 520px) { .svc-row { grid-template-columns: 1fr 1fr; } .svc-row [name=sname] { grid-column: 1 / -1; } }
.hours-edit { display: grid; gap: 6px; margin-bottom: 12px; }
.hrow { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 6px; align-items: center; }
.hrow .check { margin: 0; }
.photo-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.profile h3 { margin: 16px 0 8px; font-size: 16px; }
.legal p { line-height: 1.6; }
@media (max-width: 520px) { .hrow { grid-template-columns: 1fr 96px 96px; } .hrow input[type=time] { padding: 6px 4px; font-size: 14px; } }
