
/* Layout: vista pública (buscador, categorías, fichas) y vista de administración solo para quien puede editar la página */
:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --fg: #17231f;
  --muted: #5a6a64;
  --line: #d9e0db;
  --accent: #2450a6;
  --accent-fg: #ffffff;
  --accent-soft: #e3eaf8;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --bad: #a3261f;
  --ok: #1d6b3a;
  --star: #c27a00;
  --star-off: #ccd4cf;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101715; --surface: #18221f; --fg: #e8efea; --muted: #9aaba4; --line: #2a3833;
    --accent: #86a8f2; --accent-fg: #0d1a33; --accent-soft: #1c2a47; --warn: #f0c36a; --warn-soft: #3a2f12; --bad: #f08a82; --ok: #7bd398; --star: #f0c36a; --star-off: #3a4943;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101715; --surface: #18221f; --fg: #e8efea; --muted: #9aaba4; --line: #2a3833;
  --accent: #86a8f2; --accent-fg: #0d1a33; --accent-soft: #1c2a47; --warn: #f0c36a; --warn-soft: #3a2f12; --bad: #f08a82; --ok: #7bd398; --star: #f0c36a; --star-off: #3a4943;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  padding-block: 24px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
html, body { overflow-x: hidden; max-width: 100%; overscroll-behavior-x: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.wrap > *, .search > * { min-width: 0; max-width: 100%; }
.wrap { width: 100%; min-width: 0; }
img, video, svg, select, input, textarea { max-width: 100%; }
#pub { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.1; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
.top { display: flex; flex-wrap: wrap; gap: 12px 16px; justify-content: space-between; align-items: flex-start; }
.lead { color: var(--muted); max-width: 60ch; margin: 8px 0 0; }
.demo { background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.search { display: flex; flex-direction: column; gap: 12px; }
input[type="search"], input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="url"], select, textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
}
input:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.chip {
  flex: none; font: inherit; font-size: 14px; cursor: pointer; color: var(--fg); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.count { color: var(--muted); font-size: 14px; }
.countrow { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.card.feat { border-color: var(--accent); }
.cardtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .cat { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.badge { font-size: 12px; background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); }
.meta { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; align-items: center; }
.btn {
  font: inherit; font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block;
  background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent); border-radius: 8px; padding: 8px 14px;
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.small { font-size: 13px; padding: 5px 10px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tel { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 32px 0; border: 1px dashed var(--line); border-radius: 10px; }
.join, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--fg); font-size: 14px; }
.form label.check input { width: auto; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags:empty { display: none; }
.tag { font-size: 12px; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 2px 8px; }
.msg { white-space: pre-wrap; background: var(--accent-soft); border-radius: 8px; padding: 12px; font-size: 14px; overflow-wrap: anywhere; }
.status { font-size: 13px; color: var(--muted); }
.admin { display: flex; flex-direction: column; gap: 16px; }
.admhead, .between { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.publishbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); padding-block: 8px; z-index: 5; }
.editor { border: 1px solid var(--accent); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.editor .checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.err { color: var(--bad); font-size: 13px; min-height: 1.2em; }
.arow { border-top: 1px solid var(--line); padding-block: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.arow .info { min-width: 0; flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.arow .info strong { overflow-wrap: anywhere; }
.arow .info span { font-size: 13px; color: var(--muted); }
.arow .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 12px; border-radius: 6px; padding: 1px 8px; background: var(--accent-soft); color: var(--accent); margin-right: 6px; }
.pill.off { background: var(--warn-soft); color: var(--warn); }

/* Fotos de cada negocio */
.gal { display: flex; flex-direction: column; gap: 6px; }
.cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--accent-soft); display: block; }
.thumbs { display: flex; gap: 6px; }
.thumb { width: 52px; height: 52px; padding: 0; border: 2px solid var(--line); border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--surface); }
.thumb[aria-pressed="true"] { border-color: var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgs { display: flex; flex-direction: column; gap: 8px; }
.edthumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.edthumb { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.edthumb img { width: 88px; height: 66px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.edthumb .rm { font: inherit; font-size: 12px; color: var(--bad); background: none; border: none; cursor: pointer; padding: 2px 4px; }

/* Tableta y computadora: más ancho, filtros que se acomodan en varias líneas, panel en dos columnas */
.wrap { max-width: 1120px; }
@media (min-width: 720px) {
  body { font-size: 16px; padding-block: 40px 64px; }
  .chips { flex-wrap: wrap; overflow-x: visible; }
  .search input[type="search"] { max-width: 520px; }
  .grid { gap: 18px; }
  .join, .panel { padding: 28px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Mouse: resalta lo que se puede tocar */
@media (hover: hover) {
  .chip:hover { border-color: var(--accent); }
  .btn:hover { filter: brightness(1.1); }
  .card:hover { border-color: var(--accent); }
}
/* Pantallas táctiles: botones y campos cómodos para el dedo, y 16px para que el celular no haga zoom al escribir */
@media (pointer: coarse) {
  .chip { padding: 10px 16px; min-height: 44px; }
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn.small { min-height: 40px; }
  input[type="search"], input[type="text"], input[type="tel"], select { min-height: 44px; font-size: 16px; }
}
[hidden] { display: none !important; }

/* Cabecera con logo y pie de página */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hero .txt { flex: 1 1 280px; min-width: 0; }
.logo { display: block; width: min(100%, 340px); height: auto; background: #fff; border-radius: 14px; padding: 8px; }
.foot { color: var(--muted); font-size: 13px; text-align: center; max-width: 60ch; margin: 0 auto; }
.login { max-width: 420px; margin: 8vh auto 0; }
.login form { display: flex; flex-direction: column; gap: 12px; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.noscript { background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 8px 12px; }

/* Localidades, administración de listas */
.locrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.locrow label { font-size: 14px; color: var(--muted); }
.locrow select { width: auto; max-width: 100%; min-width: min(100%, 260px); }
.meta .where { color: var(--fg); }
.mgr { display: flex; flex-direction: column; gap: 8px; }
.mgr + .mgr { border-top: 1px solid var(--line); padding-top: 16px; }
.mrow { display: flex; gap: 8px; align-items: center; }
.mrow input[type="text"] { flex: 1 1 auto; min-width: 0; padding: 8px 10px; }
.mrow .cnt { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.madd { display: flex; gap: 8px; }
.madd input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; }
.mmsg { font-size: 13px; color: var(--warn); min-height: 1.2em; }
.picklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 6px 14px; }
.picklist label { display: flex; flex-direction: row; gap: 8px; align-items: center; font-size: 14px; color: var(--fg); }
.picklist input { width: auto; }
.pickhead { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.hint { font-size: 13px; color: var(--muted); }

.mrow .cnt { min-width: 22px; text-align: center; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 7px; font-weight: 600; }
.mrow input[type="text"] { font-size: 14px; }
@media (max-width: 560px) {
  .mrow { flex-wrap: wrap; }
  .mrow input[type="text"] { flex: 1 1 100%; }
  .mrow .cnt { margin-left: auto; }
}

/* ---------- Cuentas y calificaciones ---------- */
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; min-height: 32px; }
.topbar .who { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.stars {
  display: inline-block; font-size: 18px; line-height: 1; letter-spacing: 2px; white-space: nowrap;
  background: linear-gradient(90deg, var(--star) var(--pct, 0%), var(--star-off) var(--pct, 0%));
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.rate { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.rsumrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rsum { font-size: 13px; color: var(--muted); }
.rin { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rlabel { font-size: 13px; color: var(--muted); margin-right: 6px; }
.star {
  font: inherit; font-size: 24px; line-height: 1; padding: 4px 3px; min-width: 32px; min-height: 36px;
  background: transparent; border: 0; cursor: pointer; color: var(--star-off);
}
.star.on { color: var(--star); }
.rclear { font: inherit; font-size: 13px; background: transparent; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 6px; margin-left: 4px; }
.star:focus-visible, .rclear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

dialog#authDlg {
  width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 20px;
}
dialog#authDlg::backdrop { background: rgba(10, 18, 15, 0.55); }
#authForm { display: flex; flex-direction: column; gap: 12px; }
#authForm label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.dlghead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dlghead h2 { margin: 0; font-size: 20px; }
#authIntro:empty { display: none; }
.ok { color: var(--ok); font-size: 14px; }
.ok:empty { display: none; }
.authlinks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.link { font: inherit; font-size: 14px; background: transparent; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 6px 0; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 50;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: min(440px, calc(100vw - 32px));
  background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; text-align: center;
}

/* Cuentas en el panel */
.toggles { display: flex; flex-direction: column; gap: 10px; }
.ulist { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.urow { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.urow .em { min-width: 0; overflow-wrap: anywhere; }
.urow .st { color: var(--muted); font-size: 12px; }
.rinfo { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Foto de perfil predeterminada y envíos de usuarios ---------- */
.avatar{display:inline-block;width:28px;height:28px;border-radius:50%;vertical-align:middle;background-size:cover;background-position:center;flex:none}
.avatar{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='15' r='7' fill='white' fill-opacity='.92'/%3E%3Cpath d='M6 38c1-9 7-13 14-13s13 4 14 13z' fill='white' fill-opacity='.92'/%3E%3C/svg%3E")}
.av0{background-color:#2450a6}
.av1{background-color:#1d6b3a}
.av2{background-color:#a3261f}
.av3{background-color:#8a5a00}
.av4{background-color:#6b3fa0}
.av5{background-color:#0f766e}
.av6{background-color:#b0447a}
.av7{background-color:#475569}
.topbar .who{display:inline-flex;align-items:center;gap:8px}
.by{display:inline-flex;align-items:center;gap:6px}
.by .avatar{width:20px;height:20px}
dialog#bizDlg, dialog#jobDlg{width:min(520px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;background:var(--surface);color:var(--fg);border:1px solid var(--line);border-radius:12px;padding:20px}
dialog#bizDlg::backdrop, dialog#jobDlg::backdrop{background:rgba(10,18,15,.55)}
#bizForm, #jobForm{display:flex;flex-direction:column;gap:12px}
#bizForm label, #jobForm label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
#bizForm .picklist label, #jobForm .picklist label{flex-direction:row;align-items:center;gap:8px;color:var(--fg);font-size:14px}
#bizForm .picklist input, #jobForm .picklist input{width:auto}
.pickf{border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin:0;min-width:0}
.pickf legend{font-size:13px;color:var(--muted);padding:0 4px}
#bizMine{display:flex;flex-direction:column;gap:6px}

/* ---------- Perfil, comentarios y mensajes ---------- */
dialog#profDlg, dialog#msgDlg, dialog#memDlg, dialog#salesDlg {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 20px;
}
dialog#profDlg::backdrop, dialog#msgDlg::backdrop, dialog#memDlg::backdrop, dialog#salesDlg::backdrop { background: rgba(10, 18, 15, 0.55); }
.dlg { display: flex; flex-direction: column; gap: 12px; }
.dform { display: flex; flex-direction: column; gap: 10px; }
.dform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.dform h3 { margin: 4px 0 0; }
textarea { resize: vertical; font: inherit; min-height: 64px; }
.badge2 { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.badge2[hidden] { display: none; }
.cmts { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.cmtoggle { align-self: flex-start; font: inherit; font-size: 14px; background: transparent; border: 0; color: var(--accent); cursor: pointer; padding: 4px 0; }
.cmtoggle[aria-expanded="true"] { font-weight: 600; }
.cbody { display: flex; flex-direction: column; gap: 10px; }
.cmt { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.cmthead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.cmthead .avatar { width: 22px; height: 22px; }
.cmthead .st, .bub .st, .urow .st { color: var(--muted); font-size: 12px; }
.cmttext { margin: 0; color: var(--fg) !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmtacts { display: flex; gap: 12px; }
.cmtacts .link, .by .link { padding: 2px 0; font-size: 13px; }
.who2 { display: flex; align-items: center; gap: 8px; }
.mthread { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.bub { max-width: 85%; padding: 8px 10px; border-radius: 12px; display: flex; flex-direction: column; gap: 2px; }
.bub p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: inherit !important; }
.bub.me { align-self: flex-end; background: var(--accent); color: var(--accent-fg); }
.bub.me .st { color: inherit; opacity: .75; }
.bub.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); }
.convrow { width: 100%; text-align: left; font: inherit; color: var(--fg); background: var(--surface); cursor: pointer; justify-content: flex-start; }
.convrow .em { flex: 1; min-width: 0; }
.convrow .st { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.memleft { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
#memDlg .urow { flex-wrap: wrap; }
#memDlg .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.danger { color: var(--bad); border-color: var(--bad); }

/* ---------- Repartidores ---------- */
.moto { flex: none; vertical-align: -4px; }
.deliv { display: flex; align-items: center; gap: 8px; align-self: flex-start; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px 4px 10px; font-size: 13px; font-weight: 500; }
#delivChip { display: inline-flex; align-items: center; gap: 6px; }
#courBtn { display: inline-flex; align-items: center; gap: 6px; }
dialog#courDlg { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
dialog#courDlg::backdrop { background: rgba(10, 18, 15, 0.55); }
#courDlg .urow { flex-wrap: wrap; }
#courDlg .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.courrow .st { overflow-wrap: anywhere; }
.rowchk { display: flex; flex-direction: row !important; align-items: center; gap: 8px; font-size: 14px !important; color: var(--fg) !important; }
.rowchk input { width: auto; }

#courDlg .memleft { flex: 1 1 100%; align-items: flex-start; }
#courDlg .acts { flex: 1 1 100%; }
#courDlg .pill { white-space: nowrap; }

/* ---------- Mini mapa y foto de perfil propia ---------- */
.minimap { position: relative; display: block; height: 130px; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #e9e6df; text-decoration: none; }
.mmtiles { position: absolute; width: 768px; height: 768px; display: grid; grid-template-columns: repeat(3, 256px); }
.mmtiles img { display: block; width: 256px; height: 256px; max-width: none; }
.mmpin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -26px 0 0 -11px; background: #d93025; border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.mmpin::after { content: ""; position: absolute; width: 7px; height: 7px; left: 5px; top: 5px; background: #fff; border-radius: 50%; }
.mmcap { position: absolute; right: 8px; top: 8px; background: rgba(255,255,255,.95); color: #1a3b82; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.mmattr { position: absolute; left: 0; bottom: 0; background: rgba(255,255,255,.8); color: #333; font-size: 10px; padding: 0 5px; }
.minimap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar.photo { background-size: cover; background-position: center; background-repeat: no-repeat; }
.avsec { display: flex; flex-direction: column; gap: 10px; }
.avnow .avatar { width: 72px; height: 72px; }
.avgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.avpick { background: transparent; border: 2px solid transparent; border-radius: 50%; padding: 2px; cursor: pointer; line-height: 0; }
.avpick[aria-pressed="true"] { border-color: var(--accent); }
.avpick .avatar { width: 40px; height: 40px; }
.locfield { display: flex; flex-direction: column; gap: 6px; }

/* ---- Conectados ahora ---- */
.online { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.online h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.dot.on { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); flex: none; }
.pill.live { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.oncour { display: flex; flex-direction: column; gap: 10px; }
.oncour:empty, .onusers:empty { display: none; }
.ccard { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px; border-radius: 10px; border: 2px solid var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.ccard .avatar { width: 44px; height: 44px; flex: none; }
.cinfo { flex: 1 1 160px; min-width: 0; }
.cname { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.csub { font-size: 13px; color: var(--muted, var(--fg)); margin-top: 2px; overflow-wrap: anywhere; }
.cacts { display: flex; gap: 8px; flex-wrap: wrap; }
.onusers { display: flex; flex-wrap: wrap; gap: 8px; }
.uchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; max-width: 100%; }
.uchip .avatar { width: 28px; height: 28px; flex: none; }
.uchip .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.uchip.click { cursor: pointer; }
.uchip.click:hover, .uchip.click:focus-visible { border-color: var(--accent); }
@media (min-width: 700px) { .online { padding: 28px; } }
.online .hint:empty { display: none; }

/* ---- Calificar repartidores ---- */
.crbox { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.crbox .stars { font-size: 16px; }
.cstar { font: inherit; font-size: 24px; line-height: 1; padding: 4px 3px; min-width: 32px; min-height: 36px; background: transparent; border: 0; cursor: pointer; color: var(--star-off); }
.cstar.on { color: var(--star); }
.cstar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.crbox .rin { gap: 0; }
.crbox .rlabel { flex-basis: 100%; margin: 4px 0 0; }
.cstar { font-size: 22px; min-width: 30px; padding: 4px 1px; }
.crbox .rclear { margin-left: 8px; }

.admbtn { align-self: flex-start; margin-bottom: 4px; }
#am-msgs { display: flex; flex-direction: column; gap: 8px; }

/* ---- Ventas ---- */
dialog#salesDlg { width: min(640px, calc(100vw - 24px)); }
#salesDlg .dlg, #sl-main, #sl-form, #sl-dealsview { display: flex; flex-direction: column; gap: 12px; }
.slbar { display: flex; gap: 8px; flex-wrap: wrap; }
.slacts { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.sllist { display: flex; flex-direction: column; gap: 14px; }
.slcard { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); min-width: 0; }
.slcard.closed { opacity: .65; }
.slhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.slkind { font-weight: 700; font-size: 13px; border-radius: 6px; padding: 2px 8px; }
.slkind.venta { background: var(--accent-soft); color: var(--accent); }
.slkind.compro { background: color-mix(in srgb, var(--star) 22%, transparent); color: var(--fg); }
.sltitle { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.slprice { font-weight: 700; font-size: 18px; color: var(--ok); }
.sldesc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.slimgs { display: flex; gap: 8px; flex-wrap: wrap; }
.slthumb { padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: zoom-in; overflow: hidden; width: 84px; height: 84px; flex: none; }
.slthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slthumb:hover, .slthumb:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.slby { display: flex; gap: 10px; align-items: center; }
.slby .avatar { width: 36px; height: 36px; flex: none; }
.slwho { display: flex; flex-direction: column; min-width: 0; }
.slwho .st { font-size: 12px; color: var(--muted); }
.repbox { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.repbox .stars { font-size: 14px; }
.slrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.sldeal, .slcm { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.sldeal .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.dealrow { flex-wrap: wrap; align-items: flex-start; }
.dealrow .rin { flex-basis: 100%; }
#sl-form select, #sl-form input, #sl-form textarea, #sl-q { width: 100%; box-sizing: border-box; }
.dealrow .rin { gap: 0; }
.dealrow .rlabel { flex-basis: 100%; margin: 4px 0 0; }

/* ---- Fotos en grande ---- */
dialog#lbDlg { width: min(96vw, 1000px); max-width: 96vw; max-height: 96vh; padding: 10px; background: #0d1512; color: #fff; border: 0; border-radius: 12px; overflow: hidden; }
dialog#lbDlg::backdrop { background: rgba(0, 0, 0, .8); }
.lbbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lbbar strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbbar .st { color: #cfd8d3; font-size: 13px; }
#lb-stage { display: flex; align-items: center; justify-content: center; gap: 6px; }
#lb-img { max-width: 100%; max-height: calc(96vh - 90px); object-fit: contain; min-width: 0; flex: 1; border-radius: 6px; }
.lbnav { font-size: 34px; line-height: 1; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px; width: 44px; height: 44px; cursor: pointer; flex: none; }
.lbnav:hover, .lbnav:focus-visible { background: rgba(255,255,255,.3); }
@media (max-width: 520px) { .lbnav { width: 36px; height: 36px; font-size: 28px; } }

/* ---- Pestañas del panel de administración ---- */
.admtabs { flex-basis: 100%; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.admtabs button { font: inherit; font-size: 14px; white-space: nowrap; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.admtabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.admtabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tbadge { background: var(--bad); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 600; padding: 0 7px; min-width: 18px; text-align: center; }
.tbadge:empty { display: none; }
[data-tab][hidden] { display: none !important; }

@media (min-width: 980px) {
  .admin > .panel.tri { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px 28px; align-items: start; }
  .admin > .panel.tri > h3, .admin > .panel.tri > .hint { grid-column: 1 / -1; }
  .admin > .panel.tri > .mgr + .mgr { border-top: 0; padding-top: 0; }
}

/* ---- Páginas permanentes (SEO) ---- */
.plink { color: inherit; text-decoration: none; }
.plink:hover, .plink:focus-visible { text-decoration: underline; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--accent); }
.pg { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.pg h1, .pg h2 { margin: 0; overflow-wrap: anywhere; }
.pgimgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.pgimgs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.pgfacts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.pgfacts dt { color: var(--muted); font-size: 14px; }
.pgfacts dd { margin: 0; overflow-wrap: anywhere; }
.pglist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pglist.big li a { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.pglist.big img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.pg a:not(.btn), .foot a { color: var(--accent); }
.pg .cat { margin: 0; }

/* Edición en línea (panel) y opciones de repartidor (perfil) */
.inedit { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: -2px 0 6px; background: var(--card, transparent); }
.inedit label { display: grid; gap: 4px; font-size: 13px; }
.inedit label.rowchk { display: flex; gap: 6px; align-items: center; }
.inedit input[type=text], .inedit textarea, .inedit select { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; }
.inedit .picklist { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.inedit .picklist label { display: flex; gap: 4px; align-items: center; }
.urow .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dform .checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.dform .checks label { display: flex; flex-direction: row; gap: 4px; align-items: center; }
.dform .locbox { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin: 0; }
.dform select { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; }

/* Chat flotante */
a.chatfab { text-decoration: none; }
.chatfab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 40; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--accent, #2554a8); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.3); cursor: pointer; }
.chatfab.on { opacity: .85; }
.chatbadge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #c62828; color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700; }
.chatpanel { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 64px); z-index: 41; width: min(360px, calc(100vw - 32px)); height: min(480px, calc(100dvh - 120px)); display: flex; flex-direction: column; background: var(--bg, #fff); color: var(--fg, inherit); border: 1px solid var(--line, #ccc); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.3); overflow: hidden; }
.chatpanel[hidden] { display: none; }
.chathead { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line, #ccc); }
.chathead strong { flex: 1; min-width: 0; }
.chatcnt { font-size: 12px; color: var(--muted, #666); }
.chatlist { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.cmsg { display: flex; gap: 6px; align-items: flex-end; max-width: 88%; }
.cmsg.mine { align-self: flex-end; flex-direction: row-reverse; }
.cmsg .av, .cmsg img, .cmsg svg { flex: none; }
.cbub { border: 1px solid var(--line, #ccc); border-radius: 12px; padding: 6px 10px; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.cmsg.mine .cbub { background: var(--accent, #2554a8); color: #fff; border-color: transparent; }
.cwho { font-size: 11px; font-weight: 700; opacity: .75; }
.ctime { font-size: 10px; opacity: .6; text-align: right; }
.chatform { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line, #ccc); }
.chatform input { flex: 1; min-width: 0; font: inherit; padding: 8px; border: 1px solid var(--line, #ccc); border-radius: 8px; background: transparent; color: inherit; }
.chaterr { color: #c62828; font-size: 12px; padding: 0 10px; }
.chaterr:empty { display: none; }

/* Páginas de negocio: logo arriba y fotos ampliables sin descargar */
.pglogo { display: block; max-width: 420px; margin: 0 auto 14px; }
.pglogo img { width: 100%; height: auto; display: block; border-radius: 10px; }
.pgimgs img.zoom { cursor: zoom-in; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
#zoomBox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; padding: 12px; cursor: zoom-out; }
#zoomBox[hidden] { display: none; }
#zoomBox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }

/* iPhone hace zoom solo al tocar un campo con letra menor a 16 px y la página queda ampliada y descentrada */
@media (max-width: 900px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), select, textarea { font-size: 16px !important; }
}

/* Chat flotante con pestañas */
#msgBtn, #memBtn { display: none !important; }
.chatpanel { width: min(390px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 110px)); }
.chattabs { display: flex; border-bottom: 1px solid var(--line, #ccc); }
.chattab { flex: 1; position: relative; font: inherit; font-size: 13px; padding: 9px 4px; background: transparent; color: inherit; border: 0; border-bottom: 2px solid transparent; cursor: pointer; opacity: .75; }
.chattab[hidden] { display: none; }
.chattab.on { opacity: 1; font-weight: 700; border-bottom-color: var(--accent, #2554a8); }
.tabbadge { display: inline-block; margin-left: 4px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: #c62828; color: #fff; font-size: 11px; line-height: 16px; }
.tabbadge[hidden] { display: none; }
.chatbody { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chatbody form[hidden] { display: none; }
.chatsub { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line, #ccc); }
.chatsub strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chsec { margin: 4px 0 0; font-size: 13px; opacity: .8; }
.prow { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line, #ccc); border-radius: 10px; flex-wrap: wrap; }
.prow.cour { border: 2px solid var(--ok, #2e7d32); }
.prow.click { cursor: pointer; }
.prow .avatar { flex: none; width: 36px; height: 36px; }
.pinfo { flex: 1 1 140px; min-width: 0; }
.psub { font-size: 12px; opacity: .75; overflow-wrap: anywhere; }
.prate { font-size: 12px; font-weight: 700; }
.pacts { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; }
.prow.cour .pacts { flex: 1 1 100%; }
.crole { margin-left: 6px; font-size: 10px; padding: 0 6px; border-radius: 8px; background: #2554a8; color: #fff; }
.crole.adm { background: #b8860b; }
.cbub.modable { cursor: pointer; }
.modbar { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.modbar .btn { font-size: 11px; padding: 3px 8px; }

/* ===== Página de inicio (diseño azul, móvil primero) ===== */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.home, body.pg {
  --bg: #f1f1f3; --surface: #ffffff; --fg: #2b2b2b; --muted: #6f6f76; --line: #e2e2e6;
  --accent: #0b5ed7; --accent-fg: #ffffff; --accent-soft: #e3edfc; --star: #f5b301; --star-off: #d9d9d9;
  --azul-osc: #0a3d8f;
  padding: 0 0 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.home, :root:not([data-theme="light"]) body.pg {
    --bg: #0f1318; --surface: #1a2028; --fg: #e8edf3; --muted: #9aa6b4; --line: #2b3440;
    --accent: #6ea8ff; --accent-fg: #07142b; --accent-soft: #1b2a45; --star: #f5b301; --star-off: #3a4350; --azul-osc: #9cc2ff;
  }
}
:root[data-theme="dark"] body.home, :root[data-theme="dark"] body.pg {
  --bg: #0f1318; --surface: #1a2028; --fg: #e8edf3; --muted: #9aa6b4; --line: #2b3440;
  --accent: #6ea8ff; --accent-fg: #07142b; --accent-soft: #1b2a45; --star: #f5b301; --star-off: #3a4350; --azul-osc: #9cc2ff;
}
body.home .wrap { max-width: 900px; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); gap: 18px; }

/* Encabezado fijo */
.sitehead {
  position: sticky; top: 0; z-index: 30; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.10);
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px));
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.sitehead .barra { display: flex; align-items: center; justify-content: space-between; max-width: 900px; margin: 0 auto; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
.brand .punto { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.brand .bname { display: block; font: 800 24px/1 var(--font-body); color: var(--accent); letter-spacing: .5px; }
.brand .bname span { color: var(--azul-osc); }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 1px; margin-top: 3px; }
.menubtn { flex: none; width: 34px; height: 26px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; background: none; border: 0; padding: 1px 0; }
.menubtn i { display: block; height: 4px; border-radius: 2px; background: var(--muted); }
.buscador { max-width: 900px; margin: 12px auto 0; display: flex; align-items: center; border: 3px solid var(--accent); border-radius: 30px; padding: 6px 16px; background: var(--surface); color: var(--muted); }
.buscador input[type="search"] { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 4px 0; border-radius: 0; color: var(--fg); -webkit-appearance: none; appearance: none; }
.buscador svg { flex: none; width: 24px; height: 24px; }
.menupanel { max-width: 900px; margin: 12px auto 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-height: 70vh; overflow: auto; }
.menupanel .topbar { justify-content: flex-start; margin: 0; }
.menupanel[hidden] { display: none; }

/* Filtros */
body.home .search { gap: 10px; }
body.home .chips { margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
body.home .chips::-webkit-scrollbar { display: none; }
body.home .chip { border-radius: 20px; background: var(--surface); }
body.home .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* Cuadrícula de fichas compactas */
body.home .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { body.home .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.home .card { padding: 0; gap: 0; border: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.10); position: relative; cursor: pointer; transition: transform .15s; }
body.home .card:active { transform: scale(.98); }
body.home .card:not(.open) > * { display: none; }
body.home .card:not(.open) > .gal,
body.home .card:not(.open) > .ph,
body.home .card:not(.open) > h3,
body.home .card:not(.open) > .rate,
body.home .card:not(.open) > .cardtop { display: block; }
body.home .card:not(.open) > .cardtop { display: flex; order: 5; padding: 6px 10px 12px; }
body.home .card:not(.open) .badge { display: none; }
body.home .card:not(.open) .cat { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--accent); }
body.home .card:not(.open) > h3 { order: 3; padding: 10px 10px 4px; font: 700 15px/1.25 var(--font-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.home .card:not(.open) > .rate { order: 4; border: 0; padding: 0 10px; }
body.home .card:not(.open) .rin { display: none; }
body.home .card:not(.open) .rsum { display: none; }
body.home .card:not(.open) .stars { font-size: 15px; letter-spacing: 1px; }
body.home .card:not(.open) .rsumrow { gap: 6px; flex-wrap: nowrap; }
body.home .card:not(.open) .tavg { font-size: 13px; color: var(--muted); }
body.home .card:not(.open) > .gal { order: 1; }
body.home .card:not(.open) > .ph { order: 1; }
body.home .card:not(.open) .thumbs { display: none; }
body.home .card:not(.open) .cover { aspect-ratio: 3 / 2; border-radius: 0; }
body.home .ph { aspect-ratio: 3 / 2; display: grid; place-items: center; text-align: center; padding: 10px; font-weight: 800; font-size: 19px; line-height: 1.1; overflow: hidden; overflow-wrap: anywhere; }
body.home .ph span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tavg { display: none; }
body.home .card:not(.open) .tavg { display: inline; }
.cclose { display: none; }

/* Ficha abierta (ventana) */
body.home .card.open {
  position: fixed; z-index: 60; inset: 0; margin: auto; width: min(560px, calc(100vw - 24px)); height: fit-content;
  max-height: calc(100dvh - 24px); overflow: auto; padding: 16px; gap: 10px; cursor: default; border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.35); -webkit-overflow-scrolling: touch;
}
body.home .card.open > .ph { display: none; }
body.home .card.open .cclose {
  display: grid; place-items: center; position: sticky; top: 0; align-self: flex-end; margin: -6px -6px -34px 0; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; cursor: pointer;
}
.cardback { position: fixed; inset: 0; z-index: 55; background: rgba(10, 18, 15, .55); }
.cardback[hidden] { display: none; }
body.lock { overflow: hidden; }

/* Separadores y secciones */
.separador { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; color: var(--muted); font-size: 20px; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.separador svg { width: 22px; height: 22px; color: var(--accent); }
#grid:empty, #grid2:empty { display: none; }
body.home .online { border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.10); border-radius: 8px; }
body.home .online h2 { font-family: var(--font-body); font-weight: 700; }
body.home .join { border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.10); }
body.home .btn:not(.ghost) { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
body.home .foot { max-width: 900px; padding: 8px 16px 28px; font-size: 14px; }
body.home .foot a { color: var(--accent); font-weight: 700; }

/* Botón para subir */
.arriba {
  position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(22px, env(safe-area-inset-bottom, 0px)); z-index: 35;
  width: 48px; height: 48px; border-radius: 10px; background: rgba(11, 94, 215, .55); border: 0; color: #fff; font-size: 24px; cursor: pointer; display: none;
}
.arriba.ver { display: block; }
body.home, body.pg { margin: 0; }
body.home .search { gap: 6px; }
body.home .chips { padding-bottom: 2px; }
body.home .locrow { flex-wrap: nowrap; gap: 10px; }
body.home .locrow select { min-width: 0; flex: 1 1 auto; padding: 8px 12px; border-radius: 20px; }
body.home .countrow { padding-top: 2px; }
body.home .chips { margin: 0; padding-left: 0; padding-right: 0; }
html:has(body.home), html:has(body.pg), body.home, body.pg { overflow-x: clip; }
body.home .card:not(.open) > .ph { display: grid; }
body.home .card.open > * { flex-shrink: 0; }
.gwrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gwrap .gor { margin: 0; }
#gBtn { min-height: 44px; display: flex; justify-content: center; max-width: 100%; }

/* ===== Ventas estilo foro: lista de hilos ===== */
#salesDlg .sllist { gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
#salesDlg .sllist:empty { display: none; }
.slcard.fr { border: 0; border-radius: 0; padding: 0; gap: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.slcard.fr:last-child { border-bottom: 0; }
.frow { display: flex; gap: 12px; align-items: flex-start; padding: 14px 12px; cursor: pointer; }
.frow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.frow:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.frow > .avatar { width: 54px; height: 54px; flex: none; }
.frbody { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.frtitle { font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; color: var(--fg); }
.frtitle .slkind { font-size: 15px; font-weight: 600; padding: 3px 12px; border-radius: 16px; vertical-align: 2px; margin-right: 2px; }
.frtitle .slkind.venta { background: #fde8e4; color: #d8402a; }
.frtitle .slkind.compro { background: #e4eefd; color: #1f5fc4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .frtitle .slkind.venta { background: #3a201c; color: #ff8a73; }
  :root:not([data-theme="light"]) .frtitle .slkind.compro { background: #1c2a40; color: #8db8ff; }
}
:root[data-theme="dark"] .frtitle .slkind.venta { background: #3a201c; color: #ff8a73; }
:root[data-theme="dark"] .frtitle .slkind.compro { background: #1c2a40; color: #8db8ff; }
.frauthor { font-size: 16px; font-weight: 700; color: var(--accent); opacity: .85; overflow-wrap: anywhere; }
.frfoot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 2px; }
.frcount { display: inline-flex; align-items: center; gap: 6px; background: #e3f5ec; color: #1b8a55; font-weight: 700; font-size: 17px; border-radius: 18px; padding: 6px 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .frcount { background: #17332a; color: #5fd49a; } }
:root[data-theme="dark"] .frcount { background: #17332a; color: #5fd49a; }
.frtime { color: var(--muted); font-size: 15px; }
.frprice { margin-left: auto; font-weight: 700; color: var(--ok); }
.frdet { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 14px 78px; }
.frdet[hidden] { display: none; }
.slcard.fr.open { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
@media (max-width: 560px) {
  dialog#salesDlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; padding: 12px; }
  .frdet { padding-left: 12px; }
  .frow > .avatar { width: 48px; height: 48px; }
}

body.pg { padding: 0 0 40px; }
body.pg .wrap { padding-top: 16px; }
.menulinks { display: flex; flex-direction: column; }
.menulinks a { padding: 14px 6px; font-size: 17px; font-weight: 600; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); }
.menulinks a:last-child { border-bottom: 0; }
.menulinks a:hover { color: var(--accent); }
.menulinks[hidden] { display: none; }
body.pg .wrap { max-width: 900px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Ventas estilo foro en las páginas públicas */
a.frow { text-decoration: none; color: inherit; }
.frow.static { cursor: default; padding: 0 0 12px; }
.frow.static:hover { background: none; }
.frow.static h1.frtitle { margin: 0; font-size: 20px; }
.sllist.forum { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }

/* Márgenes ajustados en las páginas de Ventas */
body.pg .wrap { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
.panel.pg.vlist { padding: 4px 0 0; border: 0; background: transparent; box-shadow: none; }
.panel.pg.vlist > h1 { font-size: 24px; margin: 4px 2px 6px; }
.panel.pg.vlist > .lead, .panel.pg.vlist > .hint { margin-left: 2px; margin-right: 2px; }
.panel.pg.vlist .sllist.forum { margin-top: 10px; }
.panel.pg:not(.vlist) { padding: 16px; }

/* Barra de reputación */
.repbox { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 4px; margin: 4px 0; }
.repbar { width: 100%; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; max-width: 320px; }
.repbar span { display: block; height: 100%; border-radius: 6px; background: var(--muted); }
.repbar.top span { background: #1b9a5a; }
.repbar.good span { background: #6bb630; }
.repbar.mid span { background: #f0a500; }
.repbar.low span { background: #d8402a; }
.reptxt { font-size: 14px; color: var(--muted); }
.frrep { color: var(--star); font-weight: 700; font-size: 14px; white-space: nowrap; }
.reprate { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.reprate .rlabel { flex-basis: 100%; font-size: 14px; color: var(--muted); }
.repholder { display: flex; flex-direction: column; gap: 2px; }
.pgfacts dd .repbox { margin-top: 6px; }

/* Interruptor de apariencia */
.temasw { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 14px auto 0; }
.temasw span { width: 100%; text-align: center; font-size: 13px; color: var(--muted); }
.temasw button { font: inherit; font-size: 14px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.temasw button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 700; }
.temasw button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.pg > .temasw { margin-bottom: 28px; }

/* Panel de moderación */
.modp h1 { margin: 0 0 4px; font-size: 24px; }
.modtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.modtabs button { font: inherit; font-size: 15px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.modtabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 700; }
.modrow { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.modt { font-weight: 600; overflow-wrap: anywhere; }
.mods { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.modacts { display: flex; flex-wrap: wrap; gap: 8px; }
.moddet { margin: 0 0 8px 12px; padding-left: 12px; border-left: 3px solid var(--line); }
.modp .madd { display: flex; gap: 8px; margin: 8px 0; }
.modp .madd input { flex: 1; min-width: 0; font-size: 16px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); }
.modp .btn.danger { color: var(--bad, #c0392b); border-color: currentColor; }

/* Movimiento en Ventas (inicio) */
.vhot { margin: 6px 0 4px; }
.vhead { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--fg) !important; text-decoration: none; margin: 4px 2px 10px; }
.vhar { color: #e8562a; font-size: 24px; line-height: 1; }
.vlistbox { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.vrow { display: block; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--fg) !important; text-decoration: none; }
.vrow:first-child { border-top: 0; }
.vrow:active, .vrow:hover { background: var(--accent-soft); }
.vtop { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vt { flex: 1; min-width: 0; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp { font-weight: 800; color: #1f8a4c; white-space: nowrap; }
.vsub { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.vtop .slkind { flex: none; font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.vtop .slkind.venta { background: #fde8e4; color: #c63d24; }
.vtop .slkind.compro { background: #e3edfc; color: #0b5ed7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vtop .slkind.venta { background: #3a201c; color: #ff8a73; } :root:not([data-theme="light"]) .vtop .slkind.compro { background: #1c2a40; color: #8db8ff; } :root:not([data-theme="light"]) .vp { color: #5fd49a; } }
:root[data-theme="dark"] .vtop .slkind.venta { background: #3a201c; color: #ff8a73; }
:root[data-theme="dark"] .vtop .slkind.compro { background: #1c2a40; color: #8db8ff; }
:root[data-theme="dark"] .vp { color: #5fd49a; }

/* Filas compactas de Movimiento en Ventas */
.vhead { font-size: 17px; margin: 2px 2px 6px; }
.vhar { font-size: 19px; }
.vrow { display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-height: 36px; }
.vt { font-size: 15px; font-weight: 600; }
.vp { font-size: 15px; }
.vc { flex: none; font-size: 12px; font-weight: 700; color: #1f8a4c; background: #e3f6ec; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.vrow .slkind { flex: none; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.vrow .slkind.venta { background: #fde8e4; color: #c63d24; }
.vrow .slkind.compro { background: #e3edfc; color: #0b5ed7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vc { background: #17332a; color: #5fd49a; } :root:not([data-theme="light"]) .vrow .slkind.venta { background: #3a201c; color: #ff8a73; } :root:not([data-theme="light"]) .vrow .slkind.compro { background: #1c2a40; color: #8db8ff; } }
:root[data-theme="dark"] .vc { background: #17332a; color: #5fd49a; }
:root[data-theme="dark"] .vrow .slkind.venta { background: #3a201c; color: #ff8a73; }
:root[data-theme="dark"] .vrow .slkind.compro { background: #1c2a40; color: #8db8ff; }

/* Comentarios en la página pública de una publicación */
.pubcom h2 { margin: 0 0 8px; font-size: 20px; }
.pubcom .count { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.pubcom .pclist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pubcom textarea, .pubcom .pclogin input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); }
.pubcom .pclogin { display: flex; flex-direction: column; gap: 10px; }
.pubcom .pclogin label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.pubcom .pcrow { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.pubcom .pill { font-size: 12px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; }

/* El enlace azul de .pg no debe pintar de azul el icono del botón de chat */
.chatfab, .pg .chatfab { color: #fff !important; }

.chatpush { padding: 6px 10px; font-size: 12px; color: var(--muted, #666); border-bottom: 1px solid var(--line, #ccc); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chatsnd { padding-left: 8px; padding-right: 8px; }

/* Moto verde: el negocio acepta pedidos por repartidor (solo en la ficha compacta) */
.motoc { display: none; }
body.home .card:not(.open) .motoc { display: inline-flex; margin-left: auto; color: #16a34a; }
body.home .card:not(.open) .motoc .moto { width: 22px; height: 22px; stroke-width: 2; }
:root[data-theme="dark"] body.home .card:not(.open) .motoc { color: #4ade80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.home .card:not(.open) .motoc { color: #4ade80; } }

/* Prefijos de Ofertas con color editable desde el panel (--kc) */
.slkind { background: color-mix(in srgb, var(--kc, #6b7280) 16%, transparent); color: color-mix(in srgb, var(--kc, #6b7280) 82%, #000); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .slkind { background: color-mix(in srgb, var(--kc, #6b7280) 26%, transparent); color: color-mix(in srgb, var(--kc, #6b7280) 55%, #fff); } }
:root[data-theme="dark"] .slkind { background: color-mix(in srgb, var(--kc, #6b7280) 26%, transparent); color: color-mix(in srgb, var(--kc, #6b7280) 55%, #fff); }

/* Campana de notificaciones */
.bellbtn { position: relative; flex: none; margin-left: auto; width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--muted); border-radius: 50%; }
.bellbtn[hidden] { display: none; }
.bellbtn + .menubtn { margin-left: 0; }
.bellbadge { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e11d48; color: #fff; font: 700 11px/18px var(--font-body, sans-serif); text-align: center; }
.notifpanel { position: fixed; z-index: 60; top: calc(env(safe-area-inset-top, 0px) + 58px); right: max(8px, env(safe-area-inset-right, 0px)); width: min(92vw, 360px); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface, #fff); color: var(--fg); border: 1px solid var(--line, #ccc); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); overflow: hidden; }
.nphead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line, #ccc); }
.nplist { overflow-y: auto; }
.nplist .hint { padding: 14px 12px; margin: 0; }
.npitem { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line, #ddd); text-decoration: none; color: inherit; }
.npitem:last-child { border-bottom: 0; }
a.npitem:hover { background: var(--accent-soft, rgba(0,0,0,.05)); }
.npdot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: transparent; }
.npitem.unread .npdot { background: var(--accent, #2554a8); }
.npitem.unread .nptxt { font-weight: 600; }
.npbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nptxt { overflow-wrap: anywhere; }
.nptime { font-size: 12px; color: var(--muted, #666); }
.npfoot:not(:empty) { padding: 8px 12px; border-top: 1px solid var(--line, #ccc); }

.dealdone { margin: 0 0 6px; font-weight: 600; color: #16a34a; }

/* Foto de perfil junto a la campana */
.profav { position: relative; flex: none; margin-left: auto; width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.profav[hidden] { display: none; }
.profav .avatar { width: 30px; height: 30px; font-size: 13px; }
.profav + .bellbtn { margin-left: 0; }
.profav[hidden] + .bellbtn { margin-left: auto; }

/* Oficios */
.ofgrp { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.ofhead { margin: 0; font-size: 14px; color: var(--accent); }
.ofchip { color: var(--accent); font-weight: 600; }
.ofrow { flex-wrap: wrap; }
.ofchips { flex-wrap: wrap; overflow-x: visible; margin: 8px 0; }

/* Conectados ahora: repartidores compactos, 2 por fila */
.oncour { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.oncour .ccard:only-child { grid-column: 1 / -1; }
.oncour .ccard { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 4px 8px; padding: 8px; border-width: 1.5px; }
.oncour .ccard .avatar { width: 32px; height: 32px; }
.oncour .cinfo { min-width: 0; flex: none; }
.oncour .cname { flex-wrap: wrap; gap: 2px 4px; font-size: 14px; }
.oncour .cname .moto { width: 14px; height: 14px; }
.oncour .cname strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.oncour .cname .pill { font-size: 11px; padding: 1px 6px; }
.oncour .crbox { margin-top: 2px; }
.oncour .crbox .reptxt, .oncour .crbox .rsum { font-size: 12px; }
.oncour .csub { font-size: 12px; }
.oncour .cstar { font-size: 20px; min-width: 22px; min-height: 30px; padding: 2px 0; }
.oncour .cacts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.oncour .cacts .btn { padding: 6px 4px; font-size: 13px; min-height: 34px; text-align: center; justify-content: center; }
.oncour .cacts .btn:only-child { grid-column: 1 / -1; }
.oncour .crbox > .rsum { display: none; }
.oncour .rsumrow { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.oncour .cname .pill { white-space: normal; max-width: 100%; line-height: 1.2; }

/* Perfil del repartidor (calificaciones y comentarios) */
.courprof { cursor: pointer; }
strong.courprof:hover, strong.courprof:focus-visible { text-decoration: underline; }
.courprof:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.crhead { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.crhead .avatar { width: 48px; height: 48px; flex: none; }
.crsum { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.crbig { font-size: 34px; font-weight: 700; line-height: 1; }
.crdist { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; max-width: 360px; }
.crd { display: grid; grid-template-columns: 34px 1fr 24px; align-items: center; gap: 8px; font-size: 13px; }
.crbar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.crbar span { display: block; height: 100%; background: var(--star, #f5a300); }
.crd .n { text-align: right; color: var(--muted); }
.crh { margin: 14px 0 6px; font-size: 15px; }
.crcom { border-top: 1px solid var(--line); padding: 8px 0; }
.crtop { display: flex; align-items: center; gap: 8px; }
.crtop .avatar { width: 28px; height: 28px; flex: none; }
.crtop .cinfo { flex: 1 1 auto; }
.crtxt { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.crform { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; align-items: flex-start; }
.crform textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); }
.crcom.crhi { background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 8px; padding-left: 8px; padding-right: 8px; outline: 2px solid var(--accent); }
.crcontact { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }

.uchip .uof { margin: 0 6px 0 0; white-space: nowrap; }

.modname { color: #d9730d; font-weight: 700; }
:root[data-theme="dark"] .modname { color: #ff9f4a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .modname { color: #ff9f4a; } }
.pill.modpill { background: #fde3c8; color: #9a4a06; white-space: nowrap; margin-right: 6px; }
:root[data-theme="dark"] .pill.modpill { background: #4a3014; color: #ffb26b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.modpill { background: #4a3014; color: #ffb26b; } }

.pbellwrap { position: relative; display: inline-block; }
.pbell { display: inline-flex; align-items: center; gap: 6px; }
.pbellmenu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: min(320px, calc(100vw - 32px)); background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 10px; display: grid; gap: 6px; }
.pbellmenu[hidden] { display: none; }
.pmhead { font-weight: 700; padding: 2px 4px 4px; }
.pmrow { font: inherit; text-align: left; background: var(--accent-soft); color: var(--fg); border: 0; border-radius: 8px; padding: 10px 12px; cursor: pointer; min-height: 40px; }
.pmrow strong { color: var(--accent); margin-right: 2px; }

.btn .bico { flex: none; vertical-align: -3px; margin-right: 2px; }
#ofBtn, #pfBtn, #salesBtn, #msgBtn, #memBtn, #modBtn, #profBtn, #postBtn, #acctBtn { display: inline-flex; align-items: center; gap: 6px; }
#modBtn[hidden], #msgBtn[hidden], #memBtn[hidden], #profBtn[hidden], #postBtn[hidden] { display: none; }

/* ---- Panel en filas (menú tipo lista) ---- */
.admlist { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 8px; }
.admlist[hidden] { display: none; }
.admgrp { font-size: 13px; font-weight: 600; color: var(--muted); padding: 14px 16px 6px; background: var(--bg); text-transform: none; }
.admgrp:first-child { padding-top: 10px; }
.admrow { font: inherit; font-size: 17px; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); color: var(--fg); border: 0; border-top: 1px solid var(--line); padding: 14px 16px; min-height: 56px; cursor: pointer; }
.admgrp + .admrow { border-top: 0; }
.admrow svg:first-child { flex: none; width: 24px; height: 24px; }
.admrow .lbl { flex: 1; min-width: 0; }
.admrow .chev { flex: none; color: var(--muted); }
.admrow:hover, .admrow:focus-visible { background: var(--accent-soft); outline: none; }
.admback { display: flex; align-items: center; gap: 10px; flex-basis: 100%; }
.admback[hidden] { display: none; }
.admbackbtn { font: inherit; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); cursor: pointer; }
.admback strong { font-size: 18px; }

.pmctl { display: grid; gap: 8px; padding: 6px 4px 2px; border-top: 1px solid var(--line); }
.pmchk { display: flex; align-items: center; gap: 8px; font-size: 15px; min-height: 36px; }
.pmchk input { width: 20px; height: 20px; }

.admpush { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 8px; display: grid; gap: 4px; }
.admpush[hidden] { display: none; }
.admpush .hint { margin: 0; }

.quickbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.quickbar::-webkit-scrollbar { display: none; }
.qbtn { font: inherit; font-size: 15px; font-weight: 600; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); cursor: pointer; white-space: nowrap; }
.qbtn:hover, .qbtn:focus-visible { background: var(--accent); color: var(--accent-fg); outline: none; }
.qbtn svg { flex: none; width: 20px; height: 20px; }
.qbtn { flex: 1 1 auto; font-size: 14px; padding: 8px 8px; gap: 4px; }
.qbtn svg { width: 18px; height: 18px; }
.quickbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); overflow: visible; }

.recbox { display: grid; gap: 10px; margin-bottom: 4px; }
.recbox[hidden] { display: none; }
.rech { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; }
.rech svg { width: 22px; height: 22px; color: #e0a100; fill: #f5c542; flex: none; }
.quickbar .qbtn:last-child:nth-child(odd) { grid-column: 1 / -1; }


/* Modo «Negocios»: todas las categorías a la vista bajo la búsqueda */
.negbar { display: flex; align-items: center; gap: 10px; }
.negbar[hidden] { display: none; }
.negbar strong { font-size: 20px; }
.negbar #negpost { margin-left: auto; }
body.negmode .quickbar, body.negmode .vhot, body.negmode ~ .demo { display: none; }
body.negmode .demo { display: none; }
body.negmode #negbar { order: -2; }
body.negmode #chips { order: -1; flex-wrap: wrap; overflow-x: visible; margin: 0; padding: 2px 0 4px; }

/* «Con repartidor» en verde */
#delivChip { color: var(--ok); font-weight: 600; border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
#delivChip[aria-pressed="true"] { background: var(--ok); color: #fff; border-color: var(--ok); }
#delivChip svg { stroke: currentColor; }

/* La moto va a la derecha de la categoría */
body.home .card:not(.open) .motoc1 { display: none; }
body.home .card:not(.open) .motoc2 { display: inline-flex; margin-left: 8px; vertical-align: middle; color: #16a34a; }
body.home .card:not(.open) .motoc2 .moto { width: 22px; height: 22px; stroke-width: 2; }
:root[data-theme="dark"] body.home .card:not(.open) .motoc2 { color: #4ade80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.home .card:not(.open) .motoc2 { color: #4ade80; } }
body.home .card:not(.open) > .cardtop { justify-content: flex-start; }
body.home .card:not(.open) > .cardtop .badge { margin-left: auto; }

/* Portafolio */
.portbox { margin: 10px 0 4px; padding: 10px 0; border-top: 1px solid var(--line, #e3e6ea); }
.portd { white-space: pre-wrap; margin: 4px 0 8px; line-height: 1.45; }
.portgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 10px; }
.portph { position: relative; padding: 0; border: 0; background: var(--accent-soft); border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.portph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portph.edit { cursor: default; }
.portx { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.portview { border: 0; padding: 12px; background: #000; color: #fff; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; box-sizing: border-box; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.portview[open] { display: flex; }
.portview::backdrop { background: #000; }
.portstage { display: flex; align-items: center; gap: 6px; flex: 1; min-height: 0; width: 100%; justify-content: center; }
.portstage img { max-width: 100%; max-height: 100%; object-fit: contain; flex: 1; min-width: 0; }
.portstage .lbnav { background: rgba(255,255,255,.15); color: #fff; border: 0; font-size: 30px; width: 40px; height: 56px; border-radius: 10px; }
.portstage .lbnav[hidden] { display: none; }
.portcap { font-size: 14px; opacity: .8; }

.chatvn { display: flex; gap: 6px; align-items: center; padding: 6px 10px; font-size: 13px; border-top: 1px solid var(--line, #ccc); cursor: pointer; }
.chatvn[hidden] { display: none; }
.chatvn input { width: 18px; height: 18px; flex: none; }

.chatq { width: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--line, #ccc); border-radius: 999px; font: inherit; background: var(--card, #fff); color: inherit; }

/* Rentas */
.rentline { font-weight: 700; color: var(--ok); margin: 2px 0 4px; font-size: 15px; }
.rentdet { list-style: none; padding: 0; margin: 4px 0 8px; font-size: 14px; display: grid; gap: 2px; }
.rentdet li { margin: 0; }
body.home .card:not(.open) .rentdet { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#rentBox[hidden], .bz-only[hidden] { display: none; }
#rentBox textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--line, #ccc); border-radius: 10px; background: var(--card, #fff); color: inherit; }
body.home .card:not(.open) > .rentline { display: block; order: 3; padding: 0 10px 4px; margin: 0; font-size: 14px; }
body.home .card:not(.open) > h3 { order: 2; }

/* Modo «Rentas»: solo los negocios de renta */
body.rentmode #recbox, body.rentmode .quickbar, body.rentmode .vhot, body.rentmode .demo, body.rentmode #chips, body.rentmode #tagchips, body.rentmode [aria-label="Reparto"], body.rentmode #hashinfo { display: none; }
body.rentmode #negbar { order: -2; }

/* Rentas destacadas: solo visibles dentro del modo Rentas */
#recrent, body:not(.rentmode) #recrent { display: none; }
body.rentmode #recrent:not([hidden]) { display: grid; }
#recrent .grid { display: grid; gap: 10px; }

/* Ventanas emergentes: en iPhone 100vh incluye las barras del navegador; dvh usa solo el área visible */
@supports (height: 100dvh) {
  dialog#authDlg, dialog#bizDlg, dialog#profDlg, dialog#msgDlg, dialog#memDlg, dialog#courDlg, dialog#salesDlg, dialog#authDlg, dialog#jobDlg, dialog#profDlg, dialog#msgDlg, dialog#memDlg, dialog#courDlg, dialog#salesDlg{ max-height: calc(100dvh - 32px); }
  dialog#lbDlg { max-height: 96dvh; }
  .portview { max-height: 100dvh; }
}

/* Botón «Publicar mi negocio» del inicio */
#homepost { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 0 0 12px; }
#homepost svg { width: 20px; height: 20px; }
body.negmode #homepost, body.rentmode #homepost { display: none; }

/* Botón «Iniciar sesión» del encabezado (solo sin sesión) */
.loginhead { flex: none; margin-left: auto; white-space: nowrap; }
.loginhead[hidden] { display: none; }

/* Icono de moderación en el encabezado (solo moderadores) */
.modhead { margin-left: 0; text-decoration: none; }
.modhead svg { width: 24px; height: 24px; }
.profav[hidden] ~ .modhead:not([hidden]), .loginhead[hidden] ~ .modhead:not([hidden]) { margin-left: 0; }

/* Orden del encabezado: campana a la izquierda, foto de perfil a la derecha */
.loginhead { order: 1; }
.bellbtn { order: 1; margin-left: auto !important; }
.modhead { order: 2; margin-left: 0 !important; }
.profav { order: 3; margin-left: 0 !important; }
.menubtn { order: 4; }
.bellbtn[hidden] ~ .modhead:not([hidden]) { margin-left: auto !important; }
.bellbtn[hidden] ~ .profav:not([hidden]) { margin-left: auto !important; }
.bellbtn[hidden] ~ .modhead:not([hidden]) ~ .profav { margin-left: 0 !important; }

/* Orden final: escudo de moderación, campana, foto de perfil */
.modhead { order: 1; margin-left: auto !important; }
.bellbtn { order: 2; margin-left: 0 !important; }
.profav { order: 3; margin-left: 0 !important; }
.modhead[hidden] ~ .bellbtn:not([hidden]) { margin-left: auto !important; }
.modhead[hidden] ~ .bellbtn[hidden] ~ .profav:not([hidden]) { margin-left: auto !important; }
.bellbtn.modhead { order: 1; margin-left: auto !important; }
.bellbtn.modhead[hidden] { display: none; }
.bellbtn:not(.modhead) { order: 2; }

/* Vista previa de mi perfil */
.prevbar { display: grid; gap: 6px; padding: 12px; margin-bottom: 12px; border: 1px dashed var(--accent, #1d4ed8); border-radius: 10px; background: rgba(29, 78, 216, .07); }
.prevbar span { font-size: 13px; color: var(--muted); }
.prevbar .btn { justify-self: start; }

a.qbtn { text-decoration: none; display: inline-flex; align-items: center; }

/* Mosaico de tipos de publicación */
.kgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 8px; margin: 18px 0 14px; padding: 18px 8px; background: var(--surface); border-radius: 14px; }
.kitem { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px; background: none; border: 0; font: inherit; color: var(--text, inherit); cursor: pointer; border-radius: 12px; }
.kdot { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: #fff; box-shadow: 0 0 0 0 transparent; transition: box-shadow .15s, transform .15s; }
.kitem:hover .kdot, .kitem:focus-visible .kdot { transform: scale(1.05); }
.kitem.on .kdot { box-shadow: 0 0 0 4px var(--bg, #fff), 0 0 0 7px currentColor; }
.kitem.on { font-weight: 700; }
.klab { font-size: 16px; text-align: center; line-height: 1.2; }
.kfilt { margin: 0 0 10px; }
.slcard[hidden] { display: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

.pubofer { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; text-decoration: none; }
.pubofer svg { width: 20px; height: 20px; }

/* Filas de ofertas compactas (la mitad de alto) */
a.frow { gap: 10px; padding: 8px 12px; align-items: center; }
a.frow > .avatar { width: 38px; height: 38px; }
a.frow .frbody { gap: 1px; }
a.frow .frtitle { font-size: 15px; line-height: 1.25; }
a.frow .frtitle .slkind { font-size: 12px; padding: 1px 9px; vertical-align: 1px; }
a.frow .frtitle .pill { font-size: 11px; padding: 0 7px; vertical-align: 1px; margin-right: 0; }
a.frow .frauthor { font-size: 13px; line-height: 1.25; }
a.frow .frrep { font-size: 12px; }
a.frow .frfoot { gap: 2px 10px; margin-top: 1px; }
a.frow .frcount { font-size: 12px; padding: 1px 9px; gap: 4px; }
a.frow .frcount svg { width: 13px; height: 13px; }
a.frow .frtime { font-size: 12px; }
a.frow .frprice { font-size: 14px; }

/* Mi negocio en el perfil */
.bizbox { margin: 10px 0; }
.bizlink { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line, #d9dde3); border-radius: 12px; text-decoration: none; color: inherit; background: var(--card, transparent); }
.bizlink strong { min-width: 0; overflow-wrap: anywhere; }
.bizlink span { color: var(--accent, #1f5fc4); font-weight: 700; flex: none; }


/* Botón Emergencia */
.btn.vigia { font-weight: 700; border: 0; color: #fff; }
.btn.vigia.ok { background: #1f9d55; }
.btn.vigia.bad { background: #d62d2d; animation: vgpulse 1.2s infinite; }
@keyframes vgpulse { 0% { box-shadow: 0 0 0 0 rgba(214,45,45,.6); } 70% { box-shadow: 0 0 0 10px rgba(214,45,45,0); } 100% { box-shadow: 0 0 0 0 rgba(214,45,45,0); } }
@media (prefers-reduced-motion: reduce) { .btn.vigia.bad { animation: none; } }
.vgsub { font-size: 13px; color: var(--muted); }
.vglist { margin: 4px 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
.vgbtns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Bitácora: estilo símbolo del sistema */
.bitbox { background: #0c0c0c; color: #cccccc; border: 1px solid #3a3a3a; border-radius: 6px; max-height: 220px; overflow: auto; padding: 8px 10px; font-family: Consolas, "Lucida Console", "Courier New", monospace; font-size: 12.5px; line-height: 1.45; }
.bitline { padding: 1px 0; overflow-wrap: anywhere; }
.bitline .bt { color: #8a8a8a; }
.bitline .bw { color: #f2f2f2; font-weight: 700; }
.bitline .bw.adm { color: #3b9cff; }
.bitline .bw.mod { color: #f5c542; }
.bitline .bw.usr { color: #4ade80; }

.vghead { margin-bottom: 2px; }
.vggroup { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 6px; }
.vgrule { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.35; padding: 3px 0; cursor: pointer; }
.vgrule input { margin-top: 2px; flex: none; width: 18px; height: 18px; }

/* Campana en emergencia */
.btn.pbell.bad { background: #d62d2d; border-color: #d62d2d; color: #fff; animation: vgpulse 1.2s infinite; }
.btn.pbell.bad .tbadge { background: #fff; color: #d62d2d; }
@media (prefers-reduced-motion: reduce) { .btn.pbell.bad { animation: none; } }
.pbellmenu { max-height: 75vh; overflow-y: auto; }
.pbellmenu.vcfg > :not(#vigiaBox) { display: none; }
.vgbox { display: grid; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.vgalert { border: 1px solid #d62d2d; background: rgba(214,45,45,.08); border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.vgok { font-size: 13px; color: var(--muted); }
.pmmsg { font-weight: 700; color: var(--fg); }

/* Accesos rápidos con el mismo estilo del mosaico (círculo de color + texto) */
.quickbar { grid-template-columns: repeat(3, 1fr); gap: 18px 8px; padding: 18px 8px; margin-bottom: 14px; background: var(--surface); border-radius: 14px; }
.quickbar .qbtn, .quickbar a.qbtn { flex-direction: column; justify-content: flex-start; gap: 8px; min-height: 0; padding: 4px; border: 0; background: none; color: var(--fg); font-weight: 400; white-space: normal; text-align: center; }
.quickbar .qbtn:hover, .quickbar .qbtn:focus-visible { background: none; color: var(--fg); }
.quickbar .qbtn:hover .kdot, .quickbar .qbtn:focus-visible .kdot { transform: scale(1.05); }
.quickbar .qbtn .kdot svg { width: 30px; height: 30px; }
.quickbar .qbtn:last-child:nth-child(odd) { grid-column: auto; }



/* Escudo, campana y foto: siempre pegados a la derecha con el mismo espacio (igual en inicio y páginas internas) */
.sitehead .barra { justify-content: flex-start; }
.sitehead .barra > .brand { margin-right: auto; }
.sitehead .barra > :not(.brand) { margin-left: 0 !important; }
a.bellbtn.modhead, .sitehead a.bellbtn.modhead { color: var(--muted); }

/* Página de inicio: iconos de accesos rápidos cuadrados (esquinas apenas redondeadas). Ofertas conserva los redondos. */
.quickbar .kdot { border-radius: 14px; }

/* Empleo */
.vacfil { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 4px 0 8px; }
.vacfil label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.vac { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.vac h2 { font-size: 18px; }
.vacemp { margin: 0; color: var(--muted); }
.vacchips { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vacchips span { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.vacd { margin: 0; overflow-wrap: anywhere; }
.vacfoot { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.vacdate { font-size: 13px; color: var(--muted); }
.catsel{margin:8px 0}
.catsel select{width:100%;max-width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--fg);font:inherit}
.sr{position:absolute;left:-9999px}
.chips[hidden]{display:none}

/* Modo «Comida»: mismos ajustes que Negocios, pero solo con restaurantes y cafeterías */
body.comidamode .quickbar, body.comidamode .vhot, body.comidamode .demo, body.comidamode #homepost, body.comidamode #chips, body.comidamode #tagchips, body.comidamode .catsel, body.comidamode [aria-label="Reparto"], body.comidamode #recbox { display: none; }
body.comidamode #negbar { order: -2; }
body.comidamode #foodchips { order: -1; flex-wrap: wrap; margin: 0; padding: 2px 0 4px; }
#foodchips[hidden] { display: none; }
body.rentmode .catsel { display: none; }
.svbox label { display: flex; flex-direction: column; gap: 4px; }
.svbox label[hidden] { display: none; }
.svbox { display: flex; flex-direction: column; gap: 12px; }
.svbox[hidden] { display: none; }
.svbox textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; }
.brand .blogo { display: block; height: 40px; width: auto; max-width: 62vw; object-fit: contain; }
.nws { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; margin: 12px 0; min-width: 0; }
.nws h2 { font-size: 19px; margin: 0; overflow-wrap: anywhere; }
.nwsimg { width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; }
.nwsmeta { margin: 0; color: var(--muted); font-size: 13px; }
.nwsd { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.nwspg { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0; }
.nwfoto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; }
.nwhot { margin-bottom: 12px; }
.nwago { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.qbtn .klab.long { font-size: 12.5px; line-height: 1.15; letter-spacing: -.2px; }

/* Barra de precios del día (inicio) */
.prcbar { display: flex; align-items: stretch; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0 0 12px; min-width: 0; }
.prctitle { flex: none; display: flex; flex-direction: column; justify-content: center; padding: 6px 10px; background: #2f7d6d; color: #fff; font-weight: 800; font-size: 13px; line-height: 1.15; }
.prctitle small { font-weight: 600; font-size: 11px; opacity: .9; }
.prcview { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.prctrack { display: flex; width: max-content; animation: prcscroll 30s linear infinite; }
.prcview:hover .prctrack, .prcview:active .prctrack { animation-play-state: paused; }
.prcset { display: flex; flex: none; }
.prci { flex: none; padding: 10px 18px; font-size: 15px; white-space: nowrap; color: var(--fg); }
.prci b { font-weight: 800; }
.prci i { font-style: normal; color: var(--muted); font-size: 12px; }
.prci em { font-style: normal; font-size: 11px; margin-left: 4px; }
.prci em.up { color: #1f8a4c; } .prci em.down { color: #c0392b; }
@keyframes prcscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .prcview { overflow-x: auto; } .prctrack { animation: none; } }
.prcrow { display: grid; grid-template-columns: 1fr 80px 56px 92px auto; gap: 6px; margin: 6px 0; align-items: center; }
.prcrow input, .prcrow select { min-width: 0; width: 100%; box-sizing: border-box; }
@media (max-width: 520px) { .prcrow { grid-template-columns: 1fr 1fr 1fr; padding: 8px 0; border-top: 1px solid var(--line); } .prcrow > :first-child, .prcrow > :last-child { grid-column: 1 / -1; } }
.prcbar.gym .prctitle { background: #e0562f; }
.prsec { margin: 18px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.prsec h2 { font-size: 18px; margin: 0 0 8px; }
.pmscope { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0; }
.prcwrap { margin: 6px 0; }
.prcown { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 2px 0 8px; }
.prcown input[type=search] { flex: 1 1 180px; min-width: 0; box-sizing: border-box; }
.prcpick { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.ownrow { grid-template-columns: 1fr 1fr 1fr; }
.prcbiz { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
.prcbiz select { width: 100%; box-sizing: border-box; }
a.prci.prcl { text-decoration: none; color: var(--fg) !important; }
a.prci.prcl b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

.mnh { font-size: 18px; margin: 18px 0 6px; }
.mnlist { list-style: none; margin: 0 0 14px; padding: 0; }
.mnlist li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line, #ddd); }
.mnlist li span { min-width: 0; overflow-wrap: anywhere; }
.mnlist li b { white-space: nowrap; }
.mnlist li.mnsec { display: block; font-weight: 700; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; padding-top: 14px; border-bottom: 2px solid var(--line, #ddd); }

/* Vendedores ambulantes: mapa en vivo */
.ambmapbox { position: relative; margin: 14px 0 8px; }
.ambmap { position: relative; height: min(62vh, 480px); min-height: 300px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #e8ecdf; touch-action: none; cursor: grab; user-select: none; }
.ambtiles { position: absolute; inset: 0; }
.ambtiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; }
.ambsvg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ambtrail { fill: none; stroke: #c0392b; stroke-width: 3; stroke-dasharray: 6 5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.ambtrail.mine { stroke: #2450a6; }
.ambpins { position: absolute; inset: 0; pointer-events: none; }
.ambpin { position: absolute; transform: translate(-50%, -100%); width: 30px; height: 30px; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; }
.ambpin::before { content: ""; position: absolute; left: 50%; top: 0; width: 22px; height: 22px; margin-left: -11px; background: #c0392b; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.ambpin.mine::before { background: #2450a6; }
.ambpin.old::before { opacity: .55; }
.ambpin.sel { z-index: 3; }
.ambpinlab { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 2px; background: rgba(255,255,255,.95); color: #17231f; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 6px; white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ambpop { position: absolute; z-index: 5; min-width: 180px; max-width: 80%; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 2px; cursor: default; }
.ambpop[hidden] { display: none; }
.ambpn { color: var(--muted); font-size: 13px; }
.ambpr { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ambctl { position: absolute; right: 10px; top: 10px; z-index: 4; display: flex; flex-direction: column; gap: 6px; }
.ambctl button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.ambattr { position: absolute; left: 6px; bottom: 4px; z-index: 4; font-size: 11px; background: rgba(255,255,255,.8); color: #333; padding: 0 4px; border-radius: 4px; }
.amblist { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 18px; }
.ambrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.ambrow.old { opacity: .7; }
.ambinfo { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; overflow-wrap: anywhere; }
.ambme label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.ambpin.rep::before { background: #e08a1e; }
.ambmap.picking { cursor: crosshair; outline: 3px solid #e08a1e; outline-offset: -3px; }
.ambrepbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ambconf { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.ambmap, .ambmap * { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ambtiles img { pointer-events: none; -webkit-user-drag: none; }
.ambhome { margin: 0 0 16px; }
.ambhome .ambmap { height: 280px; min-height: 240px; touch-action: pan-y; }
.ambhome .hint { margin: 6px 0 0; }
.ambmapbox.full { position: fixed; inset: 0; z-index: 2000; margin: 0; background: var(--bg); }
.ambmapbox.full .ambmap, .ambhome .ambmapbox.full .ambmap { height: 100%; min-height: 0; border: 0; border-radius: 0; touch-action: none; }
.ambmapbox.full .ambctl { top: calc(102px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); }
.ambmapbox.full .ambattr { bottom: calc(4px + env(safe-area-inset-bottom, 0px)); }
.ambclose { position: absolute; z-index: 6; left: calc(10px + env(safe-area-inset-left, 0px)); top: calc(10px + env(safe-area-inset-top, 0px)); min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.ambclose[hidden] { display: none; }
html.ambnoscroll, html.ambnoscroll body { overflow: hidden; }
.ambbar { position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 8px calc(10px + env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) calc(10px + env(safe-area-inset-left, 0px)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0,0,0,.2); }
.ambbarbtn { flex: 1 1 0; min-height: 48px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); font: inherit; font-weight: 700; font-size: 14px; line-height: 1.2; cursor: pointer; }
.ambbarbtn.on { background: var(--accent); color: var(--accent-fg); }
.ambsheet { position: absolute; z-index: 7; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); max-height: 68%; overflow: auto; background: var(--surface); color: var(--fg); border-radius: 16px 16px 0 0; padding: 12px calc(14px + env(safe-area-inset-right, 0px)) 14px calc(14px + env(safe-area-inset-left, 0px)); box-shadow: 0 -6px 20px rgba(0,0,0,.3); }
.ambsheet[hidden] { display: none; }
.ambsheet .ambme { margin: 0; border: 0; box-shadow: none; padding: 0; background: none; }
.ambsheetx { float: right; margin-left: 8px; }
.ambmapbox.full .ambattr { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
.ambbarbtn { font-size: 13px; padding: 4px 6px; }
.ambhomecircle { fill: rgba(36,80,166,.12); stroke: #2450a6; stroke-width: 2; stroke-dasharray: 5 4; }
.ambhomepin { position: absolute; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: #2a8a4a; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 2; }
.ambhomepin .ambpinlab { top: 100%; margin-top: 3px; }
.ambklab { margin: 0 0 6px; font-weight: 600; }
.ambkinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ambkind { padding: 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; cursor: pointer; }
.ambkind[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.ambpin.emo { width: 40px; height: 46px; }
.ambpin.emo::before { content: ""; position: absolute; left: 50%; top: 0; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; background: #fff; border: 3px solid #c0392b; transform: none; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.ambpin.emo::after { content: ""; position: absolute; left: 50%; top: 35px; margin-left: -6px; border: 6px solid transparent; border-top-color: #c0392b; border-bottom: 0; }
.ambpin.emo.rep::before { background: #fff; border-color: #e08a1e; } .ambpin.emo.rep::after { border-top-color: #e08a1e; }
.ambpin.emo.mine::before { background: #fff; border-color: #2450a6; } .ambpin.emo.mine::after { border-top-color: #2450a6; }
.ambemo { position: absolute; left: 50%; top: 0; width: 34px; height: 34px; margin-left: -17px; display: flex; align-items: center; justify-content: center; font-size: 21px; line-height: 1; z-index: 1; }
.ambpin.emo .ambpinlab { margin-top: 0; }
/* En el mapa los productos se ven solos: solo el emoji, grande */
.ambpin.emo { width: 52px; height: 52px; transform: translate(-50%, -50%); }
.ambpin.emo::before, .ambpin.emo::after { display: none; }
.ambpin.emo .ambemo { left: 0; top: 0; width: 100%; height: 100%; margin: 0; font-size: 42px; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px #fff) drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.ambpin.emo .ambpinlab { display: none; }
.ambpin.emo.old { opacity: .6; }
.ambpin.emo.sel .ambemo { transform: scale(1.25); }
.ambbarmsg { flex: 0 0 52px; position: relative; padding: 0; display: flex; align-items: center; justify-content: center; }
.ambmsgbadge { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #c0392b; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ambmsgbadge[hidden] { display: none; }
/* con el mapa a pantalla completa el chat va por encima y su botón flotante se esconde (se usa el de la barra) */
html.ambnoscroll .chatfab { display: none; }
html.ambnoscroll .chatpanel { z-index: 2100; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
html.ambnoscroll .toast { z-index: 2200; }
.ambroot { margin: 0; overflow: hidden; }
.ambclose.ambportal, a.ambclose { display: inline-flex; align-items: center; text-decoration: none; }
.ambpill { position: absolute; z-index: 5; left: 50%; transform: translateX(-50%); top: calc(14px + env(safe-area-inset-top, 0px)); margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); font-size: 13px; font-weight: 600; box-shadow: 0 1px 6px rgba(0,0,0,.25); max-width: 40vw; text-align: center; }
@media (max-width: 480px) { .ambpill { top: calc(104px + env(safe-area-inset-top, 0px)); left: calc(10px + env(safe-area-inset-left, 0px)); transform: none; max-width: calc(100vw - 90px); text-align: left; } }
.ambroot .ambpill { top: calc(14px + env(safe-area-inset-top, 0px)); }
.ambbarmsg .avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; background-size: cover; background-position: center; }
.chattabs[hidden] { display: none !important; }

.ambprofhd { display: flex; align-items: center; gap: 12px; padding: 4px 2px 12px; font-size: 1.1rem; }
.ambprofhd .avatar, .ambprofhd img { width: 48px; height: 48px; }
.ambprofitem { display: block; width: 100%; text-align: left; padding: 14px 14px; margin: 0 0 8px; border: 1px solid var(--line, #d0d7e2); border-radius: 12px; background: var(--card, #fff); color: inherit; font: inherit; font-weight: 600; }
.ambprofitem.danger { color: #b42318; }

.ambpin.int .ambemo { filter: none; }
.ambpin.int { pointer-events: none; opacity: .95; }
.ambpin.int .ambpinlab { background: #fff3cd; }

/* Barra inferior del mapa: solo iconos, sin recuadros */
.ambbar { gap: 0; justify-content: space-around; }
.ambbar .ambbarbtn { border: 0; background: none; color: var(--muted); box-shadow: none; min-height: 52px; flex: 1 1 0; border-radius: 12px; }
.ambbar .ambbarbtn.on { background: var(--line, #e0e0e5); color: var(--accent); }
.ambbar .ambbarbtn:focus { outline: none; }
.ambbar .ambbarprof .avatar { width: 34px; height: 34px; }
.ambbar .ambbarbtn[hidden] { display: none; }
.ambmsgbadge { top: 4px; right: 50%; margin-right: -22px; }
html.ambnoscroll .notifpanel { z-index: 2100; top: auto; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
html.ambnoscroll .ambbarmsg { flex: 1 1 0; }

.ambpin.emo.place .ambpinlab { display: block; margin-top: 0; }
.ambpin.place .ambemo { font-size: 36px; }
.ambprofitem.adm { border-color: var(--accent); color: var(--accent); }
.ambplform label { display: block; margin: 0 0 10px; font-size: 14px; }
.ambplform input, .ambplform select { display: block; width: 100%; margin-top: 4px; font-size: 16px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); }

/* Barra de búsqueda del mapa */
.ambsearch { position: absolute; z-index: 8; left: calc(10px + env(safe-area-inset-left, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); top: calc(48px + env(safe-area-inset-top, 0px)); display: none; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.ambmapbox.full .ambsearch { display: flex; }
.ambmapbox.full:not(#ambRoot) .ambsearch { left: calc(150px + env(safe-area-inset-left, 0px)); }
.ambsic { display: flex; padding-left: 12px; color: var(--muted); }
.ambsearch input { flex: 1 1 auto; min-width: 0; border: 0; background: none; color: var(--fg); font: inherit; font-size: 16px; padding: 12px 10px; outline: none; -webkit-appearance: none; appearance: none; }
.ambsearch input::-webkit-search-cancel-button { display: none; }
.ambsx { border: 0; background: none; color: var(--muted); font-size: 18px; padding: 8px 12px; cursor: pointer; }
.ambsx[hidden] { display: none; }
.ambsres { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: 52vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.ambsres[hidden] { display: none; }
.ambsit { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--fg); font: inherit; padding: 10px 14px; cursor: pointer; }
.ambsit:last-child { border-bottom: 0; }
.ambsem { font-size: 28px; line-height: 1; flex: 0 0 auto; }
.ambstx { display: flex; flex-direction: column; min-width: 0; }
.ambstx strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ambstx span { font-size: 13px; color: var(--muted); }
.ambsnone { margin: 0; padding: 14px; color: var(--muted); font-size: 14px; }
.ambmapbox.full .ambpill { top: calc(104px + env(safe-area-inset-top, 0px)); left: calc(10px + env(safe-area-inset-left, 0px)); transform: none; max-width: calc(100vw - 90px); text-align: left; }
.ambmapbox.full .ambctl { top: calc(116px + env(safe-area-inset-top, 0px)); }

/* Calificaciones de negocios */
.ambrate { display: block; margin: 6px 0 2px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; font-size: 14px; text-align: left; cursor: pointer; }
.ambrsum { margin: 0 0 10px; font-weight: 700; font-size: 1.05rem; color: #b7791f; }
.ambrform { margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.ambrform textarea { display: block; width: 100%; margin: 8px 0; font: inherit; font-size: 16px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); resize: vertical; box-sizing: border-box; }
.ambstars { display: flex; gap: 4px; margin-top: 6px; }
.ambstar { border: 0; background: none; font-size: 36px; line-height: 1; padding: 2px 4px; color: var(--muted); cursor: pointer; }
.ambstar.on { color: #e0a100; }
.ambrit { padding: 10px 2px; border-bottom: 1px solid var(--line); }
.ambrhd { display: flex; justify-content: space-between; gap: 8px; }
.ambrst { color: #e0a100; letter-spacing: 1px; }
.ambrc { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ambrft { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }

/* mapa de Google (opcional) */
.ambgm { position: absolute; inset: 0; background: #e5e3df; }
/* iconos como antes, con más color: sin halo blanco y más saturados */
.ambpin.emo .ambemo { filter: saturate(1.6) contrast(1.1) drop-shadow(0 2px 2px rgba(0,0,0,.45)); opacity: 1; }
.ambpin.int .ambemo { filter: none; }
.ambgmov { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.ambgmov .ambsvg { inset: auto; left: -8000px; top: -8000px; width: 16000px; height: 16000px; max-width: none; max-height: none; overflow: visible; }
.ambgmov .ambpins { inset: auto; left: 0; top: 0; width: 0; height: 0; }
.ambcn { display: inline-block; margin-right: 12px; font-weight: 700; white-space: nowrap; } .ambcn:last-child { margin-right: 0; }
.ambcn { background: none; border: 0; padding: 4px 6px; margin: -4px 4px -4px -6px; border-radius: 999px; font: inherit; font-weight: 700; color: inherit; cursor: pointer; }
.ambcn.on { background: #dbe7ff; }
.ambcnp { margin-top: 8px; background: var(--surface, #fff); color: var(--fg, #222); border: 1px solid var(--line, #ddd); border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.2); padding: 8px; max-height: 40vh; overflow-y: auto; z-index: 7; }
.ambcnp.abs { position: absolute; left: calc(10px + env(safe-area-inset-left, 0px)); width: min(320px, calc(100vw - 90px)); margin: 0; }
.ambcnh { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 6px; }
.ambcnx { border: 0; background: none; font-size: 18px; padding: 4px 8px; cursor: pointer; color: inherit; }
.ambcni { display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line, #eee); padding: 9px 4px; font: inherit; color: inherit; cursor: pointer; }
.ambcni .hint { display: block; margin: 0; }
.ambsheet .ambsheetx { position: sticky; top: 0; z-index: 3; background: var(--surface); box-shadow: 0 0 0 6px var(--surface); }
.ambme label.chk { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: 15px; } .ambme label.chk input { width: auto; margin-top: 3px; }
.ambplist { margin-top: 10px; }
.ambprow { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line, #e3e3e3); }
.ambprgo { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 12px 2px; font: inherit; color: inherit; cursor: pointer; }
.ambprgo .hint { display: block; margin: 2px 0 0; }

/* nombre del vendedor en el globo del mapa: abre su perfil con calificaciones */
.ambvname { display: inline; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ambvacts { margin: 6px 0 12px; }
.ambvacts:empty { display: none; }
.ambprofme { width: 100%; border: 0; background: none; color: inherit; font: inherit; font-size: 1.1rem; text-align: left; cursor: pointer; border-radius: 12px; }
.ambprofme:active { background: var(--line); }
.ambprofmet { display: flex; flex-direction: column; gap: 2px; }
.ambsec { margin: 14px 0 4px; font-size: 1rem; }
.ambcli { margin-top: 18px; }
.ambback { margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ambback .ambstars, .ambback textarea, .ambback .ambrepbtns, .ambback .err, .ambback strong { flex-basis: 100%; }
.ambback textarea { display: block; width: 100%; font: inherit; font-size: 16px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); box-sizing: border-box; }
/* negocios fijos: pequeños y en blanco y negro */
.ambpin.emo.place { width: 30px; height: 30px; }
.ambpin.emo.place .ambemo { font-size: 20px; filter: grayscale(1) contrast(1.05) drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.ambpin.emo.place .ambpinlab { font-size: 10px; padding: 1px 5px; color: #444; }
.ambpin.emo.place.sel .ambemo { transform: scale(1.3); }

.cdel{margin-left:auto;flex:none}.cask{display:inline-flex;gap:6px;align-items:center;font-size:13px;margin-left:auto}
.cmx{background:none;border:0;opacity:.45;font-size:11px;padding:2px 4px;cursor:pointer;color:inherit;float:right}.cmx:hover{opacity:1}
.cask .btn{padding:2px 8px}

.cswipe{position:relative;overflow:hidden;border-radius:12px}
.cswipe>.cdel{position:absolute;right:0;top:0;bottom:0;width:84px;border:0;background:#c62828;color:#fff;font-weight:600;font-size:14px;cursor:pointer;margin:0}
.cswipe>.cdel.ask{background:#8e0000}
.cswipe>.click{position:relative;background:var(--card,var(--bg,#fff));transition:transform .18s;touch-action:pan-y;margin:0}
.cswipe>.click.sw{transform:translateX(-84px)}
.cswipe>.click{user-select:none;-webkit-user-select:none;-webkit-user-drag:none}

.ambpin.emo:not(.place):not(.int) .ambpinlab{display:block;top:100%;margin-top:-6px;font-size:11px;padding:1px 6px;pointer-events:none}
.ambpin.emo.place .ambpinlab{display:none!important}

.ambmedot{position:absolute;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;background:#1a73e8;border:3px solid #fff;box-shadow:0 0 0 6px rgba(26,115,232,.25),0 1px 4px rgba(0,0,0,.4);pointer-events:none}
.ambctl #ambLoc{display:flex;align-items:center;justify-content:center;color:#1a73e8}

.ambaviso{background:#fff3cd;border:1px solid #f0d36b;border-radius:10px;padding:8px 10px;margin:6px 0;color:#5c4a00;display:flex;flex-direction:column;gap:2px}
.ambaviso .ambpn{color:inherit;margin:0}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .ambaviso{background:#4a3f12;border-color:#7a6620;color:#ffe9a3}}
:root[data-theme="dark"] .ambaviso{background:#4a3f12;border-color:#7a6620;color:#ffe9a3}

/* Puntos de reunión y productos de vecinos */
.ambpin.emo.place.reu{width:40px;height:40px}
.ambpin.emo.place.reu .ambemo{font-size:30px;filter:drop-shadow(0 1px 3px rgba(0,0,0,.45))}
.ambpin.emo.place.reu .ambpinlab{display:block!important;font-size:11px;font-weight:600;padding:1px 6px;color:#222}
.mklist{display:flex;flex-direction:column;gap:12px;margin-top:10px}
.mkcard{border:1px solid var(--line,#ddd);border-radius:14px;padding:10px;background:var(--card,var(--bg,#fff))}
.mkphotos .mkbig{width:100%;max-height:260px;object-fit:cover;border-radius:10px;display:block;background:#eee}
.mkthumbs{display:flex;gap:6px;margin-top:6px}.mkthumbs img{width:56px;height:56px;object-fit:cover;border-radius:8px;opacity:.6;cursor:pointer;border:2px solid transparent}.mkthumbs img.on{opacity:1;border-color:var(--accent,#0b5fd9)}
.mkhead{display:flex;justify-content:space-between;gap:8px;align-items:baseline;margin-top:8px}
.mkprice{font-weight:700;color:#1b7f3a;white-space:nowrap}
.mkdesc{margin:4px 0;white-space:pre-line;overflow-wrap:anywhere}
.mkpoint{display:block;width:100%;text-align:left;background:#eef4ff;border:0;border-radius:10px;padding:8px 10px;margin:6px 0;color:#1a3f8f;font:inherit;cursor:pointer}
.mksel,.mksearch{width:100%;margin-top:10px;font:inherit;padding:10px;border:1px solid var(--line,#ccc);border-radius:10px;background:var(--bg,#fff);color:inherit;box-sizing:border-box}
.mkform{display:flex;flex-direction:column;gap:10px}.mkform label{display:flex;flex-direction:column;gap:4px;font-weight:600}
.mkform input,.mkform textarea,.mkform select{font:inherit;padding:10px;border:1px solid var(--line,#ccc);border-radius:10px;background:var(--bg,#fff);color:inherit;font-weight:400;box-sizing:border-box;width:100%}
.mkstrip{display:flex;gap:8px;flex-wrap:wrap}
.mkslot{position:relative;width:84px;height:84px}.mkslot img{width:100%;height:100%;object-fit:cover;border-radius:10px}
.mkrm{position:absolute;top:-6px;right:-6px;width:24px;height:24px;border-radius:50%;border:0;background:#c62828;color:#fff;font-size:12px;cursor:pointer}
.mkadd{width:84px;height:84px;border-radius:10px;border:2px dashed var(--line,#bbb);background:none;font-size:30px;color:var(--accent,#0b5fd9);cursor:pointer}
.mkerr{color:#c62828;min-height:1.2em}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .mkpoint{background:#1e2a44;color:#bcd0ff}}
:root[data-theme="dark"] .mkpoint{background:#1e2a44;color:#bcd0ff}

.mkchks{display:flex;flex-direction:column;gap:6px;margin:4px 0 10px}.mkchk{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line,#ccc);border-radius:10px;font-weight:400}.mkchk input{width:20px;height:20px;margin:0}
.mkdd{width:100%;text-align:left;font:inherit;padding:12px;border:1px solid var(--line,#ccc);border-radius:10px;background:var(--bg,#fff);color:inherit;margin:4px 0 6px;cursor:pointer;box-sizing:border-box}.mkchks{max-height:220px;overflow:auto}
.ambprofitem{display:flex;align-items:center;gap:12px;text-align:left}.ambpico{display:inline-flex;flex:0 0 auto;width:26px;justify-content:center;opacity:.85}
.mkmini{margin-top:10px;border-top:1px solid var(--line,#ddd);padding-top:8px}.mkminih{display:block;font-size:13px;margin-bottom:6px}
.mkminib{max-height:34vh;overflow-y:auto;-webkit-overflow-scrolling:touch}
.mkminir{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:none;border:0;border-radius:10px;padding:6px;font:inherit;color:inherit;cursor:pointer}
.mkminir:active{background:var(--line,#e6e6ea)}.mkminir img{width:44px;height:44px;border-radius:8px;object-fit:cover;background:var(--line,#e6e6ea);flex:0 0 auto}
.mkmint{display:flex;flex-direction:column;min-width:0}.mkmint b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mkmint em{font-style:normal;font-size:12px;opacity:.7}
.mkst{display:inline-block;font-size:12px;font-weight:700;border-radius:999px;padding:3px 10px;margin:2px 0 4px}.mkst.t{background:#fff3cd;color:#7a5b00}.mkst.v{background:#e3e3e8;color:#444}
.mksold .mkbig,.mksold .mkthumbs{filter:grayscale(1);opacity:.6}.mksold .mkhead,.mksold .mkdesc{opacity:.6}
.mkstate{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:8px 0}
.mkstb{font:inherit;font-size:13px;padding:7px 12px;border-radius:999px;border:1px solid var(--line,#ccc);background:var(--bg,#fff);color:inherit;cursor:pointer}.mkstb.on{background:var(--accent,#1a5fd1);border-color:var(--accent,#1a5fd1);color:#fff}
.mkbuyers{border:1px solid var(--line,#ccc);border-radius:12px;padding:10px;margin:4px 0 8px;display:flex;flex-direction:column;gap:6px}.mkbuyers[hidden]{display:none}
.mkbuyer{text-align:left;font:inherit;padding:10px;border-radius:10px;border:1px solid var(--line,#ccc);background:var(--bg,#fff);color:inherit;cursor:pointer}.mkbuyer.other{opacity:.8}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .mkst.t{background:#4a3c10;color:#ffe08a}:root:not([data-theme="light"]) .mkst.v{background:#3a3a40;color:#ddd}}
:root[data-theme="dark"] .mkst.t{background:#4a3c10;color:#ffe08a}:root[data-theme="dark"] .mkst.v{background:#3a3a40;color:#ddd}
.mkdistline{margin:6px 0 2px;font-size:13px;font-weight:600;color:#1a3f8f}@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .mkdistline{color:#bcd0ff}}:root[data-theme="dark"] .mkdistline{color:#bcd0ff}
/* destello azul: solo vendedores que comparten su ubicación en vivo (no los avisos de vecinos) */
.ambpin.emo.live::before{display:block;content:"";position:absolute;left:3px;top:3px;width:46px;height:46px;margin:0;border:0;border-radius:50%;background:rgba(26,115,232,.28);box-shadow:0 0 0 0 rgba(26,115,232,.55);transform:none;animation:ambglow 1.8s ease-out infinite;pointer-events:none}
@keyframes ambglow{0%{box-shadow:0 0 0 0 rgba(26,115,232,.55)}70%{box-shadow:0 0 0 14px rgba(26,115,232,0)}100%{box-shadow:0 0 0 0 rgba(26,115,232,0)}}
@media (prefers-reduced-motion: reduce){.ambpin.emo.live::before{animation:none}}
.mkform label.mkchk{flex-direction:row;align-items:center;font-weight:400}.mkchks .hint{margin:2px 4px}
.ambbar .ambbarshop svg{width:30px;height:30px;padding:7px;box-sizing:content-box;border:2px solid currentColor;border-radius:50%}
.ambbar .ambbarshop .ambmsgbadge{top:0;margin-right:-30px}
.ambbar .ambbarshop.on{background:none}.ambbar .ambbarshop.on svg{background:var(--line,#e0e0e5);border-color:var(--accent,#2450a6)}
.mkcat{display:inline-block;font-size:12px;font-weight:600;background:#eef4ff;color:#1a3f8f;border-radius:999px;padding:3px 10px;margin:2px 6px 4px 0}
.mkcats{display:flex;gap:6px;overflow-x:auto;padding:8px 0 4px;-webkit-overflow-scrolling:touch}.mkcatb{flex:0 0 auto;font:inherit;font-size:13px;padding:6px 12px;border-radius:999px;border:1px solid var(--line,#ccc);background:var(--bg,#fff);color:inherit;cursor:pointer;white-space:nowrap}.mkcatb.on{background:var(--accent,#1a5fd1);border-color:var(--accent,#1a5fd1);color:#fff}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .mkcat{background:#1e2a44;color:#bcd0ff}}:root[data-theme="dark"] .mkcat{background:#1e2a44;color:#bcd0ff}
.mkchks{max-height:none;overflow:visible}.mkchk.mkall{background:#eef4ff;font-weight:600}
/* negocios: icono de local + lo que venden (los puntos de reunión conservan su 🤝 y nombre) */
.ambpin.emo.place.shop{width:34px;height:34px}
.ambpin.emo.place.shop .ambemo{display:flex;align-items:center;justify-content:center;background:#fff;border:2px solid #2450a6;border-radius:50%;filter:drop-shadow(0 1px 3px rgba(0,0,0,.35));box-sizing:border-box;font-size:0}
.ambpin.emo.place.shop.sel .ambemo{transform:scale(1.2)}
.ambpin.emo.place.shop .ambpinlab{display:block!important;font-size:11px;font-weight:700;padding:1px 6px;color:#17231f;margin-top:2px;top:100%}
.ambpin.emo.place.reu .ambpinlab{display:none!important}
.ambtabs{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 12px;padding-right:96px}
.ambtabs{flex-wrap:nowrap;gap:6px}.ambtabs .mkstb{white-space:nowrap}
.mkform label.mkchk{flex-direction:row;font-weight:600}.mkst.d{background:#e3f5e8;color:#1b6b34}
.mkdist{font-weight:400;color:#1b6b34;white-space:nowrap}
.reprate{margin:2px 0 4px;font-weight:700}.reprow{display:flex;align-items:center;gap:2px;margin:4px 0 8px}.reprow .hint{margin:0 6px 0 0}.repstar{border:0;background:none;font-size:26px;line-height:1;padding:2px 3px;cursor:pointer;color:#c28a00}
.reproute{fill:none;stroke:#2450a6;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;opacity:.9}
.reproute.straight{stroke-dasharray:8 7;opacity:.7}
.reptrail{fill:none;stroke:#1b7f3a;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.reptrip{position:absolute;left:10px;right:10px;z-index:7;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;border-radius:14px;background:var(--bg,#fff);color:var(--fg,#222);border:1px solid var(--line,#ccc);box-shadow:0 4px 16px rgba(0,0,0,.2)}
.reptrip[hidden]{display:none}
.reptriptx{flex:1 1 100%;font-weight:700}
.chatsub{flex-wrap:wrap}.chatsub .repgo{flex:1 1 100%}
.repgobox{flex:1 1 100%;display:flex;flex-direction:column;gap:6px}.repgobox .hint{margin:0;font-size:12px}.repgobox .btn[disabled]{opacity:.45}
.reppop{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(0,0,0,.55)}
.reppopcard{width:100%;max-width:360px;background:var(--bg,#fff);color:var(--fg,#222);border-radius:18px;padding:18px;box-shadow:0 10px 40px rgba(0,0,0,.35)}
.reppopcard h3{margin:0 0 6px;font-size:20px}
.reppopstars{display:flex;justify-content:center;gap:4px;margin:12px 0 16px}
.repstar.big{font-size:42px;padding:2px 4px}
.chatsub{flex-shrink:0}

#toast,.toast{z-index:100001}

.ordtag{display:inline-block;margin:2px 0 4px;padding:3px 9px;border-radius:999px;background:var(--accent,#2a5bd7);color:#fff;font-size:12px;font-weight:700;line-height:1.3}
.hasord{border-color:var(--accent,#2a5bd7)!important}

.reptxt{font-size:12px;color:var(--muted,#667);margin:1px 0 2px;overflow-wrap:anywhere}
.repsub{flex:1 1 100%;order:9;margin:0}



.ambkimg{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.ambkimg.sm{display:inline-block;width:26px;height:auto;vertical-align:middle}
.ambpin.emo .ambemo:has(.ambkimg){font-size:0}
.ambpin.emo:has(.ambkimg){width:68px;height:52px;margin-left:-34px}
.ambpin.emo .ambemo:has(.ambkimg){filter:drop-shadow(0 2px 3px rgba(0,0,0,.5))!important}
.ambpin.k-costco .ambpinlab{background:#e31837!important;color:#fff!important;border:1px solid #fff}
.ambtabs{gap:4px;padding-right:84px}.ambtabs .mkstb{padding:7px 7px;font-size:12px;flex:0 1 auto;min-width:0}
.ambtabs{clear:both;padding-right:0;gap:6px;flex-wrap:nowrap;margin-top:10px}.ambtabs .mkstb{flex:1 1 0;padding:8px 4px;font-size:13px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ambtabs .mkstb{flex:1 1 auto;padding:8px 6px;font-size:12.5px}

.ambtabs{flex-wrap:wrap}.ambtabs .mkstb{flex:1 1 44%}.ambpltab h3{margin:14px 0 6px;font-size:15px}.ambpltab .ambprow{flex-wrap:wrap}

.ordline{fill:none;stroke:#e67e22;stroke-width:4;stroke-dasharray:2 8;stroke-linecap:round;opacity:.95}

.ordline.mine{stroke:#2450a6;stroke-width:5;stroke-dasharray:10 7}

.ambclose{display:none!important}

.ambavail{margin:10px 0;padding:8px 10px;border:2px solid #e67e22;border-radius:14px;background:rgba(230,126,34,.08)}.ambavrow{display:block;width:100%;text-align:left;padding:8px 0;border-top:1px solid rgba(0,0,0,.08)}.ambavrow:first-of-type{border-top:0}

/* Panel de administración del mapa: se esconde lo que era solo del directorio */
.panel.tri,
#genPanel,
#comPanel,
#salesPanel,
label[for="s-comments"],
label[for="s-posts"],
label[for="s-cats"],
label[for="s-deliv"],
label[for="s-tagsv"],
label[for="s-order"],
label[for="s-loc"],
label[for="s-sales"],
label[for="s-salesname"],
label[for="s-movtext"],
label[for="s-pmlabel"],
#s-sbtn-box,
#s-kinds-box{display:none!important}

.ambpend { position: absolute; z-index: 6; left: calc(12px + env(safe-area-inset-left, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); min-height: 48px; border: 0; border-radius: 14px; background: #b3261e; color: #fff; font: 700 15px/1.2 inherit; box-shadow: 0 6px 18px rgba(0,0,0,.28); padding: 10px 14px; cursor: pointer; }
.ambpend[hidden] { display: none; }

.ambpin.shop { overflow: visible; }
.ambjobbadge { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-size: 20px; line-height: 1; background: #fff; border: 2px solid #2450a6; border-radius: 999px; padding: 2px 5px; box-shadow: 0 2px 6px rgba(0,0,0,.25); pointer-events: none; }
.ambjobcard { border: 1px solid var(--line, #d9e0dd); border-radius: 14px; padding: 12px; margin: 10px 0; display: grid; gap: 6px; }

.ambrnchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ambter { fill: rgba(42,138,74,.28); stroke: #2a8a4a; stroke-width: 2.5; stroke-linejoin: round; }
.ambter.pend { fill: rgba(230,160,0,.22); stroke: #d98e00; stroke-dasharray: 6 4; }
.ambter.draft { fill: rgba(36,80,166,.22); stroke: #2450a6; stroke-dasharray: 5 4; }
.ambterdot { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: #2450a6; color: #fff; border: 2px solid #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.ambterlab { position: absolute; transform: translate(-50%, -50%); background: rgba(255,255,255,.92); color: #17231f; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 5px; pointer-events: none; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ambterlab.area { background: #2450a6; color: #fff; font-size: 12px; }
.ambpin.terpin .ambpinlab { display: block; top: 100%; margin-top: -6px; font-size: 11px; padding: 1px 6px; }
.ambterbar { position: absolute; left: 8px; right: 8px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: rgba(255,255,255,.96); color: #17231f; padding: 8px 10px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.35); font-size: 13px; font-weight: 600; }
.ambterbar span { flex: 1 1 100%; }
.ambsoonchk { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 6px 0; }
.ambpin.shop.soon .ambemo { filter: grayscale(1) brightness(.95); border-color: #777 !important; opacity: .9; }
.ambpin.shop.soon .ambpinlab { background: #e4e4e4 !important; color: #555 !important; }
.ambsoonbadge { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); background: #444; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.ambhrs { margin: 6px 0; text-align: left; }
.ambhrshd { display: flex; align-items: center; gap: 4px; width: 100%; background: #eff3f5; border: 0; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; color: #17231f; cursor: pointer; text-align: left; }
.ambhrsst { font-weight: 700; } .ambhrsst.op { color: #1a7f37; } .ambhrsst.cl { color: #d93025; } .ambhrsst.soonc { color: #c77700; }
.ambhrsar { margin-left: auto; transition: transform .15s; } .ambhrshd.open .ambhrsar { transform: rotate(180deg); }
.ambhrstb { background: #eff3f5; border-radius: 0 0 10px 10px; padding: 2px 10px 8px; margin-top: -4px; font-size: 13px; }
.ambhrsrow { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; } .ambhrsrow.today { font-weight: 700; }
.ambhrsedit { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.ambhrsedrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .ambhrsedrow.off input[type=time] { opacity: .35; }
.ambhrsday { flex: 0 0 110px; display: flex; align-items: center; gap: 4px; margin: 0; font-weight: 600; }
.ambhrsedrow input[type=time] { width: 105px; padding: 6px; }
.ambplform label.ambsoonchk, .ambplform label.ambhrsday { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; }
.ambplform .ambsoonchk input[type=checkbox], .ambplform .ambhrsday input[type=checkbox] { width: 22px !important; height: 22px; flex: 0 0 22px; margin: 0; padding: 0; }
.ambplform .ambhrsday { flex: 0 0 120px; }
.ambplform .ambhrsedrow input[type=time] { width: 112px !important; flex: 0 0 auto; }
.ambplform .ambhrsedrow { gap: 6px 8px; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.ambplform .ambhrsday { flex: 1 1 100% !important; }
.ambplform .ambhrsedrow input[type=time] { width: 130px !important; }
.ambverol { margin: 8px 0 8px 18px; padding: 0; font-size: 14px; line-height: 1.5; }
.ambverpv { display: block; width: 100%; max-width: 360px; border-radius: 12px; margin: 10px 0; }
.ambverok { color: #1a7f37; font-weight: 700; }
.ambpin.terpin { width: 40px; height: 44px; }
.ambpin.terpin .ambemo { display: block; font-size: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.ambpin.terpin .ambemo img { display: block; width: 36px; height: 40px; pointer-events: none; -webkit-user-drag: none; }
.ambpin.terpin.pend .ambemo { filter: grayscale(.6) drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.ambpin.terpin { z-index: 3; }
.ambpin.terpin { width: 44px; height: 48px; overflow: visible; }
.ambpin.terpin .ambemo, .ambpin.terpin .ambemo img { width: 44px; height: 48px; }
.ambpin.terpin .ambemo { background: none !important; border: 0 !important; border-radius: 0 !important; }
.ambpin.terpin .ambpinlab { display: block !important; top: 100%; margin-top: 0; font-size: 11px; padding: 1px 6px; z-index: 4; }
.ambpin.emo.place.terpin { width: 44px; height: 48px; }
.ambpin.emo.place.terpin .ambemo { filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); width: 44px; height: 48px; font-size: 0; }
.ambpin.emo.place.terpin.pend .ambemo { filter: grayscale(.7) opacity(.8) drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.ambpin.emo.place.terpin .ambpinlab { display: block !important; top: 100%; margin-top: 0; font-size: 11px; font-weight: 700; padding: 1px 6px; color: #17231f; }
.ambpin.emo.place.terpin { width: 52px; height: 57px; }
.ambpin.emo.place.terpin .ambemo, .ambpin.emo.place.terpin .ambemo img { width: 52px; height: 57px; }
.ambpin.emo.place.shop.soon { filter: grayscale(1) contrast(.85) brightness(1.02); opacity: .85; }
.ambpin.emo.place.shop.soon .ambemo { border-color: #8a8a8a !important; background: #ececec !important; filter: none; }
.ambpin.emo.place.shop.soon .ambemo svg { filter: grayscale(1) brightness(1.4) contrast(.7); opacity: .75; }
.ambpin.emo.place.shop.soon .ambpinlab { background: #e0e0e0 !important; color: #666 !important; }
.ambsoonbadge { background: #666; font-size: 10px; letter-spacing: .02em; }
.ambpin.emo.place.terpin { width: 60px; height: 66px; }
.ambpin.emo.place.terpin .ambemo, .ambpin.emo.place.terpin .ambemo img { width: 60px; height: 66px; }
.ambpin.emo.place.rnpin { width: 34px; height: 34px; }
.ambpin.emo.place.rnpin .ambemo { display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid #c0392b; border-radius: 50%; font-size: 18px; width: 34px; height: 34px; box-sizing: border-box; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.ambpin.emo.place.rnpin.venta .ambemo { border-color: #1a7f37; }
.ambpin.emo.place.rnpin .ambpinlab { display: block !important; top: 100%; margin-top: 2px; font-size: 11px; font-weight: 700; padding: 1px 6px; color: #fff; background: #c0392b; max-width: 150px; }
.ambpin.emo.place.rnpin.venta .ambpinlab { background: #1a7f37; }
.ambfibrange { fill: rgba(30,150,80,.18); stroke: #1e9650; stroke-width: 2.5; stroke-dasharray: 8 5; }
.ambfibline { stroke: #2450a6; stroke-width: 2.5; stroke-dasharray: 5 4; }
.ambpin.emo.place.fibpin { width: 34px; height: 34px; }
.ambpin.emo.place.fibpin .ambemo { display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid #1e9650; border-radius: 50%; font-size: 18px; width: 34px; height: 34px; box-sizing: border-box; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.ambpin.emo.place.fibpin.sel .ambemo { transform: scale(1.2); background: #e8f7ee; }
.ambpin.emo.place.fibpin .ambpinlab { display: block !important; top: 100%; margin-top: 2px; font-size: 11px; font-weight: 700; padding: 1px 6px; color: #17231f; max-width: 150px; }
.ambfibres { margin: 10px 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: #f0f2f5; }
.ambfibres.ok { background: #e6f6ec; border: 1px solid #1e9650; }
.ambfibres.far { background: #fff4e0; border: 1px solid #d98e00; }
.ambfibres p { margin: 4px 0; }
.ambpin.emo.place.rnpin.localpin .ambemo { background: none; border: 0; border-radius: 0; width: 36px; height: 34px; }
.ambpin.emo.place.rnpin.localpin .ambemo img { display: block; width: 34px; height: 32px; pointer-events: none; -webkit-user-drag: none; }
.ambpin.emo.place.rnpin.localpin { width: 40px; height: 38px; }
.ambpin.emo.place.rnpin.localpin .ambemo { width: 40px; height: 38px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); display: flex; align-items: center; justify-content: center; }
.ambpin.emo.place.rnpin.localpin .ambemo img { width: 38px; height: 36px; }
.ambpin.emo.place.rnpin.localpin { width: 30px; height: 28px; }
.ambpin.emo.place.rnpin.localpin .ambemo { width: 30px; height: 28px; }
.ambpin.emo.place.rnpin.localpin .ambemo img { width: 28px; height: 26px; }
.ambpin.emo.place.fibpin { width: 30px; height: 52px; }
.ambpin.emo.place.fibpin .ambemo { width: 30px; height: 52px; background: none !important; border: 0 !important; border-radius: 0; font-size: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); display: block; transform-origin: bottom center; }
.ambpin.emo.place.fibpin .ambemo img { display: block; width: 28px; height: 51px; margin: 0 auto; pointer-events: none; -webkit-user-drag: none; }
.ambpin.emo.place.fibpin.sel .ambemo { transform: scale(1.15); background: none !important; }
.ambpin.emo.place.fibpin { width: 26px; height: 64px; }
.ambpin.emo.place.fibpin .ambemo { width: 26px; height: 64px; }
.ambpin.emo.place.fibpin .ambemo img { width: 24px; height: 64px; }
.ambpin.emo.place.fibpin { overflow: visible; }
.ambfibbadge { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); background: #ffd800; color: #111; font-size: 11px; font-weight: 800; line-height: 1; padding: 3px 7px; border-radius: 6px; border: 1.5px solid #111; white-space: nowrap; pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.ambpin.emo.place.fibpin { width: 20px; height: 48px; }
.ambpin.emo.place.fibpin .ambemo { width: 20px; height: 48px; }
.ambpin.emo.place.fibpin .ambemo img { width: 18px; height: 48px; }
.ambfibpaid { fill: rgba(240,140,20,.16); stroke: #e0800f; stroke-width: 2.5; stroke-dasharray: 8 5; }
.ambterlab.paid { background: #ffe9c7; color: #6a3a00; }

.ambpostn { display: block; margin: 6px 0 2px; font-weight: 700; }
.ambjst { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: #e8eefc; color: #1d3f9c; margin: 4px 0; }
.ambjst.st-p { background: #fff1c2; color: #6a4b00; } .ambjst.st-c { background: #d6f3dd; color: #14602a; } .ambjst.st-x { background: #eee; color: #666; }
.ambjthread { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.ambjmsg { max-width: 88%; padding: 7px 11px; border-radius: 14px; background: #eef0f3; align-self: flex-start; font-size: 14px; }
.ambjmsg.mine { background: #dbe8ff; align-self: flex-end; }
.ambjmsg em { display: block; font-size: 11px; color: #777; font-style: normal; margin-top: 2px; }
/* maletín de empleo: solo el icono, arriba del negocio (y arriba de la etiqueta de inauguración si la hay) */
.ambpin .ambjobbadge, .ambpin.shop .ambjobbadge { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; font-size: 16px; top: -20px; z-index: 3; filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); }
.ambpin.shop.soon .ambjobbadge { top: -34px; }
.ambattr.off { display: none !important; }

/* logo En Timilpan (sin fondo) en la esquina superior izquierda de la barra de búsqueda */
.ambslogo { position: absolute; left: 0; top: -36px; width: 62px; height: auto; pointer-events: none; z-index: 2; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.ambsearch .ambsic { margin-left: 0; }

/* Modo oscuro automatico (segun el telefono): mapa OpenStreetMap y credito */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ambtiles img { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.7); }
  :root:not([data-theme="light"]) .ambmapbox { background: #1d2a26; }
  :root:not([data-theme="light"]) .ambattr { background: rgba(24,34,31,.85); color: #c9d6d0; }
}
:root[data-theme="dark"] .ambtiles img { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.7); }
:root[data-theme="dark"] .ambmapbox { background: #1d2a26; }
:root[data-theme="dark"] .ambattr { background: rgba(24,34,31,.85); color: #c9d6d0; }

/* Modo oscuro: barra de menu morada */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .ambbar { background: #3a1f6b; border-top-color: #5a35a0; box-shadow: 0 -2px 12px rgba(0,0,0,.5); }
:root:not([data-theme="light"]) .ambbar .ambbarbtn { color: #cdbcf2; }
:root:not([data-theme="light"]) .ambbar .ambbarbtn.on { background: rgba(255,255,255,.16); color: #fff; }
:root:not([data-theme="light"]) .ambbar .ambbarshop.on svg { background: rgba(255,255,255,.16); border-color: #fff; }
}
:root[data-theme="dark"] .ambbar { background: #3a1f6b; border-top-color: #5a35a0; box-shadow: 0 -2px 12px rgba(0,0,0,.5); }
:root[data-theme="dark"] .ambbar .ambbarbtn { color: #cdbcf2; }
:root[data-theme="dark"] .ambbar .ambbarbtn.on { background: rgba(255,255,255,.16); color: #fff; }
:root[data-theme="dark"] .ambbar .ambbarshop.on svg { background: rgba(255,255,255,.16); border-color: #fff; }

/* Modo oscuro: hojas/menus del mapa en morado */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .ambsheet { --card: #3a1f6b; --line: #5a35a0; --muted: #cdbcf2; --accent: #cdbcf2; --accent-soft: #4a2a85; background: #2a1650; color: #f1ebff; border-top: 1px solid #5a35a0; }
:root:not([data-theme="light"]) .ambprofitem { background: #3a1f6b; border-color: #5a35a0; color: #f1ebff; }
:root:not([data-theme="light"]) .ambprofitem.danger { color: #ff9a8f; }
:root:not([data-theme="light"]) .ambprofitem.adm { border-color: #cdbcf2; color: #cdbcf2; }
:root:not([data-theme="light"]) .ambprofme:active { background: #3a1f6b; }
}
:root[data-theme="dark"] .ambsheet { --card: #3a1f6b; --line: #5a35a0; --muted: #cdbcf2; --accent: #cdbcf2; --accent-soft: #4a2a85; background: #2a1650; color: #f1ebff; border-top: 1px solid #5a35a0; }
:root[data-theme="dark"] .ambprofitem { background: #3a1f6b; border-color: #5a35a0; color: #f1ebff; }
:root[data-theme="dark"] .ambprofitem.danger { color: #ff9a8f; }
:root[data-theme="dark"] .ambprofitem.adm { border-color: #cdbcf2; color: #cdbcf2; }
:root[data-theme="dark"] .ambprofme:active { background: #3a1f6b; }

/* Repartidor en moto: icono propio en el mapa */
.ambpin.emo.rider.motopin .ambemo { width: 56px; height: 50px; margin: 0; font-size: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
.ambpin.emo.rider.motopin .ambemo img { display: block; width: 56px; height: 50px; pointer-events: none; -webkit-user-drag: none; }
.ambpin.emo.rider.motopin { width: 56px; height: 50px; }
.ambpin.emo.rider.motopin .ambemo { left: 0; top: 0; }
.ambpin.emo.live.motopin::before { left: 5px; top: 1px; }

/* Todos los iconos de la barra con circulo (igual que el de la tienda) */
.ambbar .ambbarbtn > svg { width: 30px; height: 30px; padding: 7px; box-sizing: content-box; border: 2px solid currentColor; border-radius: 50%; }
.ambbar .ambbarbtn.on:not(.ambbarprof) { background: none; }
.ambbar .ambbarbtn.on:not(.ambbarprof) > svg { background: var(--line, #e0e0e5); border-color: var(--accent, #2450a6); }
@media (max-width: 360px) { .ambbar .ambbarbtn > svg { width: 26px; height: 26px; padding: 6px; } .ambbar .ambbarshop svg { width: 26px; height: 26px; padding: 6px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambbar .ambbarbtn.on:not(.ambbarprof) > svg { background: rgba(255,255,255,.16); border-color: #fff; } }
:root[data-theme="dark"] .ambbar .ambbarbtn.on:not(.ambbarprof) > svg { background: rgba(255,255,255,.16); border-color: #fff; }

/* Foto de perfil en la barra: circulo verde */
.ambbar .ambbarprof .avatar { width: 48px; height: 48px; box-sizing: border-box; border: 2px solid #22a45d; padding: 3px; background-clip: content-box; background-origin: content-box; border-radius: 50%; }
.ambbar .ambbarprof.on { background: none; }
.ambbar .ambbarprof.on .avatar { background-color: transparent; box-shadow: inset 0 0 0 40px rgba(34,164,93,.18); }
@media (max-width: 360px) { .ambbar .ambbarprof .avatar { width: 42px; height: 42px; } }

/* Perfil sin sesion: circulo azul (con sesion queda el verde de la foto) */
.ambbar .ambbarprof > svg { color: #2563eb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambbar .ambbarprof > svg { color: #7db0ff; } }
:root[data-theme="dark"] .ambbar .ambbarprof > svg { color: #7db0ff; }

.ambtabsttl { margin: 4px 0 10px; font-size: 1.35rem; line-height: 1.2; }
.ambsheet .ambtabsttl { min-height: 44px; display: flex; align-items: center; margin: 0 0 6px; }
.ambsheet .ambtabs { clear: both; margin-top: 10px; }

/* Barra: circulos mas firmes y color propio de cada icono al presionar / activo */
.ambbar .ambbarbtn[data-sec="ambMe"] { --ic: #16a34a; }
.ambbar .ambbarbtn[aria-label="Repartidores"] { --ic: #ea580c; }
.ambbar .ambbarbtn[data-sec="ambHomeSet"] { --ic: #2563eb; }
.ambbar .ambbarshop { --ic: #7c3aed; }
.ambbar .ambbarbtn[aria-label="Mensajes privados"] { --ic: #0891b2; }
.ambbar .ambbarbell { --ic: #dc2626; }
.ambbar .ambbarbtn:not(.ambbarprof) { color: #3d4642; }
.ambbar .ambbarbtn:not(.ambbarprof) > svg { border-width: 2.5px; transition: color .12s, background-color .12s, border-color .12s; }
.ambbar .ambbarbtn:not(.ambbarprof):active, .ambbar .ambbarbtn:not(.ambbarprof).on { color: var(--ic, #2450a6); }
.ambbar .ambbarbtn:not(.ambbarprof):active > svg, .ambbar .ambbarbtn:not(.ambbarprof).on > svg { border-color: var(--ic, #2450a6); background: color-mix(in srgb, var(--ic, #2450a6) 15%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ambbar .ambbarbtn:not(.ambbarprof) { color: #efe8ff; }
  :root:not([data-theme="light"]) .ambbar .ambbarbtn[data-sec="ambMe"] { --ic: #4ade80; }
  :root:not([data-theme="light"]) .ambbar .ambbarbtn[aria-label="Repartidores"] { --ic: #fb923c; }
  :root:not([data-theme="light"]) .ambbar .ambbarbtn[data-sec="ambHomeSet"] { --ic: #7db0ff; }
  :root:not([data-theme="light"]) .ambbar .ambbarshop { --ic: #d8b4fe; }
  :root:not([data-theme="light"]) .ambbar .ambbarbtn[aria-label="Mensajes privados"] { --ic: #22d3ee; }
  :root:not([data-theme="light"]) .ambbar .ambbarbell { --ic: #fb7185; }
  :root:not([data-theme="light"]) .ambbar .ambbarbtn:not(.ambbarprof):active, :root:not([data-theme="light"]) .ambbar .ambbarbtn:not(.ambbarprof).on { color: var(--ic); }
  :root:not([data-theme="light"]) .ambbar .ambbarbtn:not(.ambbarprof):active > svg, :root:not([data-theme="light"]) .ambbar .ambbarbtn:not(.ambbarprof).on > svg { border-color: var(--ic); background: color-mix(in srgb, var(--ic) 20%, transparent); }
}
:root[data-theme="dark"] .ambbar .ambbarbtn:not(.ambbarprof) { color: #efe8ff; }
:root[data-theme="dark"] .ambbar .ambbarbtn[data-sec="ambMe"] { --ic: #4ade80; }
:root[data-theme="dark"] .ambbar .ambbarbtn[aria-label="Repartidores"] { --ic: #fb923c; }
:root[data-theme="dark"] .ambbar .ambbarbtn[data-sec="ambHomeSet"] { --ic: #7db0ff; }
:root[data-theme="dark"] .ambbar .ambbarshop { --ic: #d8b4fe; }
:root[data-theme="dark"] .ambbar .ambbarbtn[aria-label="Mensajes privados"] { --ic: #22d3ee; }
:root[data-theme="dark"] .ambbar .ambbarbell { --ic: #fb7185; }
:root[data-theme="dark"] .ambbar .ambbarbtn:not(.ambbarprof):active, :root[data-theme="dark"] .ambbar .ambbarbtn:not(.ambbarprof).on { color: var(--ic); }
:root[data-theme="dark"] .ambbar .ambbarbtn:not(.ambbarprof):active > svg, :root[data-theme="dark"] .ambbar .ambbarbtn:not(.ambbarprof).on > svg { border-color: var(--ic); background: color-mix(in srgb, var(--ic) 20%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambbar .ambbarbtn.on:not(.ambbarprof) { background: none; } }
:root[data-theme="dark"] .ambbar .ambbarbtn.on:not(.ambbarprof) { background: none; }

/* Circulo ligeramente transparente (el icono sigue firme); al presionar / activo vuelve a color pleno */
.ambbar .ambbarbtn:not(.ambbarprof):not(.on):not(:active) > svg { border-color: color-mix(in srgb, currentColor 30%, transparent); }

.ambbizrow { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ambbizrow .ambprgo { width: 100%; text-align: left; }

.ambpanrep { display: flex; flex-direction: column; gap: 12px; }
.ambpanrep > .btn { align-self: flex-start; }

.mkpansum { margin: 8px 0 4px; font-weight: 600; }

/* Icono de Mercado en morado */
.ambbar .ambbarbtn.ambbarshop:not(.ambbarprof) { color: #7c3aed; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambbar .ambbarbtn.ambbarshop:not(.ambbarprof) { color: #d8b4fe; } }
:root[data-theme="dark"] .ambbar .ambbarbtn.ambbarshop:not(.ambbarprof) { color: #d8b4fe; }

/* citas: calendario verde / rojo */
.ambcalnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.ambcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ambcal > p { grid-column: 1 / -1; }
.ambcalh { text-align: center; font-size: 12px; font-weight: 700; opacity: .6; padding: 2px 0; }
.ambcald { border: 2px solid transparent; border-radius: 10px; padding: 8px 0; font: inherit; font-size: 14px; font-weight: 700; text-align: center; background: #eef0f1; color: #8a9591; cursor: default; }
.ambcald.e { background: transparent; border: 0; }
.ambcald.g { background: #dcf5e3; color: #11742f; cursor: pointer; } .ambcald.r { background: #fde0de; color: #b3261e; cursor: pointer; }
.ambcald.sel { border-color: #16a34a; box-shadow: 0 0 0 2px #16a34a55; }
.ambcalleg { text-align: center; } .ambcalg { color: #16a34a; } .ambcalr { color: #dc2626; }
.ambslots { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ambslot { border: 2px solid transparent; border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 700; }
.ambslot.g { background: #dcf5e3; color: #11742f; cursor: pointer; } .ambslot.r { background: #fde0de; color: #b3261e; text-decoration: line-through; opacity: .8; }
.ambslot.sel { border-color: #16a34a; box-shadow: 0 0 0 2px #16a34a55; }
.ambcalpick { display: block; margin: 6px 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambcald { background: #3a2a5c; color: #b9aedb; } :root:not([data-theme="light"]) .ambcald.e { background: transparent; } :root:not([data-theme="light"]) .ambcald.g, :root:not([data-theme="light"]) .ambslot.g { background: #12422a; color: #6ee7a0; } :root:not([data-theme="light"]) .ambcald.r, :root:not([data-theme="light"]) .ambslot.r { background: #4d1b1b; color: #ff9b94; } }
:root[data-theme="dark"] .ambcald { background: #3a2a5c; color: #b9aedb; } :root[data-theme="dark"] .ambcald.e { background: transparent; } :root[data-theme="dark"] .ambcald.g, :root[data-theme="dark"] .ambslot.g { background: #12422a; color: #6ee7a0; } :root[data-theme="dark"] .ambcald.r, :root[data-theme="dark"] .ambslot.r { background: #4d1b1b; color: #ff9b94; }

.ambprow.ambcita { display: block; padding: 10px 0; } .ambprow.ambcita > strong { display: block; } .ambprow.ambcita > .hint { display: block; margin: 2px 0; } .ambprow.ambcita .ambpr { margin-top: 8px; }

.ambcrrow { display: flex; gap: 8px; } .ambcrrow input { flex: 1 1 40%; min-width: 0; } .ambcrrow select { flex: 1 1 50%; min-width: 0; }

.ambtrst { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin: 2px 0 6px; } .ambtrst.on { background: #dcf5e3; color: #11742f; } .ambtrst.off { background: #eef0f1; color: #667; }
.ambtrrv { margin-top: 6px; } .ambtrrv p { margin: 4px 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambtrst.on { background: #12422a; color: #6ee7a0; } :root:not([data-theme="light"]) .ambtrst.off { background: #3a2a5c; color: #b9aedb; } }
:root[data-theme="dark"] .ambtrst.on { background: #12422a; color: #6ee7a0; } :root[data-theme="dark"] .ambtrst.off { background: #3a2a5c; color: #b9aedb; }

/* gimnasios con entrenadores particulares: icono del entrenador arriba del pin */
.ambpin.shop .ambtrain { position: absolute; left: 50%; top: -31px; transform: translateX(-50%); width: 24px; height: 31px; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.ambpin.shop.hastr .ambjobbadge { left: calc(50% + 22px); top: -26px; }

.ambprow.ambnews { display: block; } .ambprow.ambnews .ambprgo { width: 100%; text-align: left; }

/* insignia de novedades del mapa */
.ambbar .ambnewsbadge { background: #dc2626; }
.ambprofitem { position: relative; }
.ambnewsdot { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; box-sizing: border-box; }

/* negocios cerrados */
.ambpin.emo.place.shop.closed { filter: grayscale(1) contrast(.85); opacity: .7; }
.ambpin.shop.closed .ambpinlab { background: #e4e4e4 !important; color: #555 !important; }
.ambclosed { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: #f3dcdc; color: #8a1f1f; font-weight: 700; font-size: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambclosed { background: #4a2326; color: #ffc9c9; } :root:not([data-theme="light"]) .ambpin.shop.closed .ambpinlab { background: #3a3a3a !important; color: #ddd !important; } }
:root[data-theme="dark"] .ambclosed { background: #4a2326; color: #ffc9c9; }
:root[data-theme="dark"] .ambpin.shop.closed .ambpinlab { background: #3a3a3a !important; color: #ddd !important; }

/* lista que se despliega al dejar presionado el mapa */
.ambkpop { position: absolute; z-index: 7; width: 340px; overflow-y: auto; box-sizing: border-box; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.3); padding: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.ambkpop[hidden] { display: none; }
.ambkpt { grid-column: 1 / -1; margin: 2px 6px 4px; font-weight: 700; font-size: 13px; color: var(--muted); }
.ambkpi { text-align: left; padding: 8px 8px; line-height: 1.2; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 15px; cursor: pointer; }
.ambkpi { -webkit-tap-highlight-color: transparent; }
.ambkpi:active { background: var(--line); }
@media (hover: hover) and (pointer: fine) { .ambkpi:hover { background: var(--line); } }   /* en celular el :hover se queda pegado tras tocar */

/* chat: más espacio para la conversación */
.chatpanel { height: min(640px, calc(100dvh - 96px)); }
html.ambnoscroll .chatpanel { left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); width: auto; top: calc(8px + env(safe-area-inset-top, 0px)); height: auto; bottom: calc(var(--ambbarh, 84px) + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin-left: auto; }
.chathead { padding: 6px 10px; }
.chathead .btn.small, .chatpush .btn.small, .chatsub .btn.small { padding: 5px 10px; min-height: 0; font-size: 14px; line-height: 1.2; }
.chatpush { padding: 4px 10px; font-size: 12px; gap: 6px; }
.chatpush p, .chatpush span { margin: 0; }
.chatsub { max-height: 32%; overflow-y: auto; padding: 4px 10px; gap: 6px; }
.repgobox { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.repgobox .btn { flex: 1 1 46%; padding: 7px 8px; font-size: 14px; }
.repgobox .hint { flex: 1 1 100%; font-size: 12px; line-height: 1.3; }
.chatlist { min-height: 38%; }
.chatform { padding: 6px 8px; }

.repgray, .repgray[disabled] { background: #d9d9de !important; border-color: #b9b9c0 !important; color: #8a8a92 !important; opacity: 1; cursor: not-allowed; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .repgray, :root:not([data-theme="light"]) .repgray[disabled] { background: #3a3a40 !important; border-color: #55555c !important; color: #8d8d96 !important; } }
:root[data-theme="dark"] .repgray, :root[data-theme="dark"] .repgray[disabled] { background: #3a3a40 !important; border-color: #55555c !important; color: #8d8d96 !important; }

/* icono del punto de reunión (imagen ligera) */
.ambpin.emo.place.reu { width: 52px; height: 34px; }
.ambpin.emo.place.reu .ambemo { display: block; font-size: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.ambpin.emo.place.reu .ambemo img { display: block; width: 52px; height: auto; pointer-events: none; -webkit-user-drag: none; }

/* botón «Novedades» al final del buscador */
.ambsnews { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; margin: 4px 6px 4px 2px; padding: 8px 12px; border: 0; border-left: 1px solid var(--line); border-radius: 999px; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ambsnews:active { background: var(--line); }
.ambsnews .ambmsgbadge { top: -2px; right: -2px; }
@media (max-width: 400px) { .ambsnews { padding: 8px 9px; gap: 4px; font-size: 13px; } }

.ambsnews.open { background: var(--line); }
.ambnewspanel { position: absolute; top: calc(100% + 6px); right: -6px; width: min(360px, calc(100vw - 20px)); max-height: min(60vh, 420px); overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.3); padding: 8px 10px 10px; font-weight: 400; text-align: left; cursor: default; z-index: 9; }
.ambnewspanel::before { content: ""; position: absolute; top: -7px; right: 38px; width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.ambnphd { font-weight: 800; font-size: 15px; padding: 4px 2px 8px; }
.ambnewspanel .ambplist { margin: 0; }
.ambsnews .ambmsgbadge { position: static; top: auto; right: auto; margin-left: 2px; flex: 0 0 auto; }

.ambsbell { position: relative; flex: 0 0 auto; width: 40px; height: 40px; margin: 0 4px 0 0; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: #dc2626; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ambsbell[hidden] { display: none; }
.ambsbell:active { background: var(--line); }
.ambsbell .ambmsgbadge { position: absolute; top: 0; right: 0; margin: 0; }
:root[data-theme="dark"] .ambsbell { color: #fb7185; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambsbell { color: #fb7185; } }
@media (max-width: 359px) { .ambsnews { font-size: 0; gap: 0; } .ambsnews svg { margin: 0; } .ambsnews .ambmsgbadge { font-size: 12px; margin-left: 4px; } }

.ambsnews { position: static; }
.ambnewspanel { left: 0; right: 0; width: auto; box-sizing: border-box; }
.ambnewspanel::before { right: auto; left: var(--arrow, 60%); }
.ambsbell { width: 42px; height: 42px; border: 2px solid #dc2626; background: rgba(220,38,38,.08); margin-right: 6px; }
.ambsbell:active { background: rgba(220,38,38,.2); }
:root[data-theme="dark"] .ambsbell { border-color: #fb7185; background: rgba(251,113,133,.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambsbell { border-color: #fb7185; background: rgba(251,113,133,.12); } }

.ambsnews { position: relative; }
.ambsnews .ambmsgbadge { position: absolute; top: -9px; left: 50%; right: auto; margin: 0; transform: translateX(-50%); box-shadow: 0 0 0 2px var(--surface); }
.ambsbell, :root[data-theme="dark"] .ambsbell { border: 0; background: none; width: 40px; height: 40px; margin-right: 4px; }
.ambsbell:active { background: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambsbell { border: 0; background: none; } }

.ambsbell, :root[data-theme="dark"] .ambsbell { color: #b4b9c2; }
.ambsbell.has, :root[data-theme="dark"] .ambsbell.has { color: #dc2626; }
:root[data-theme="dark"] .ambsbell.has { color: #fb7185; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambsbell { color: #8b929e; } :root:not([data-theme="light"]) .ambsbell.has { color: #fb7185; } }
:root[data-theme="dark"] .ambsbell { color: #8b929e; }
:root[data-theme="dark"] .ambsbell.has { color: #fb7185; }

.ambpins.fibfocus > *:not(.fibpin):not(.ambhomepin):not(.fibzlab):not(.fibtest) { display: none !important; }
.ambmapbox.fibfocus .ambpill { display: none !important; }
.ambpins.terfocus > *:not(.terselpin):not(.ambhomepin) { display: none !important; }
.ambmapbox.terfocus .ambpill { display: none !important; }
.ambpins.anyfocus > *:not(.sel):not(.terselpin):not(.ambhomepin):not(.fibzlab):not(.int) { display: none !important; }
.ambmapbox.anyfocus .ambpill { display: none !important; }

.ambpop, .ambkpop { position: absolute; }
.ambpopx { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--line); color: var(--fg); font: 700 15px/1 var(--font-body, sans-serif); cursor: pointer; -webkit-tap-highlight-color: transparent; z-index: 2; }
.ambpopx:active { filter: brightness(.9); }
.ambpop > strong:first-of-type { padding-right: 36px; }
.ambkpop .ambkpt { padding-right: 34px; }

.ambsw { margin-left: auto; flex: 0 0 auto; position: relative; width: 46px; height: 28px; border-radius: 999px; background: #c5cad3; transition: background .15s; }
.ambsw i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.ambsw.on { background: #1e9650; }
.ambsw.on i { transform: translateX(18px); }
:root[data-theme="dark"] .ambsw { background: #565d6b; } :root[data-theme="dark"] .ambsw.on { background: #2fb36a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambsw { background: #565d6b; } :root:not([data-theme="light"]) .ambsw.on { background: #2fb36a; } }

/* Semáforo de la base de datos */
.dbh { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0 12px; }
.dbhrow { display: flex; align-items: center; gap: 10px; font-size: 15px; border-radius: 999px; padding: 10px 16px; color: #fff; background: #6b7280; }
.dbh.ok .dbhrow { background: #16a34a; }
.dbh.bad .dbhrow { background: #dc2626; }
.dbhrow b { color: #fff; font-weight: 600; }
.dbdot { display: block; width: 12px; height: 12px; border-radius: 50%; flex: none; background: #fff; opacity: .9; }
.dbh.bad .dbdot { animation: dbp 1.1s ease-in-out infinite; }
@keyframes dbp { 50% { opacity: .25; } }
.dbtop { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 8px 14px; margin: 0 0 10px; font: 600 13px/1 inherit; color: #fff; background: #6b7280; cursor: pointer; }
.dbtop.ok { background: #16a34a; }
.dbtop.bad { background: #dc2626; }
.dbtop.bad .dbdot { animation: dbp 1.1s ease-in-out infinite; }
.dbtop .dbdot { width: 10px; height: 10px; }
.urow.dbfail { border-color: #dc2626; background: rgba(220,38,38,.08); }
.urow.dbfail .em > div:first-child, .urow.dbfail .st { color: #dc2626 !important; }
.urow.dbfail .em > div:first-child { font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .urow.dbfail .em > div:first-child, :root:not([data-theme="light"]) .urow.dbfail .st { color: #f87171 !important; } }
:root[data-theme="dark"] .urow.dbfail .em > div:first-child, :root[data-theme="dark"] .urow.dbfail .st { color: #f87171 !important; }

/* «Tengo hambre» */
.ambhung { display: flex; align-items: center; gap: 8px; }
.ambhung .ambhinfo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ambhung .btn.small { flex: 0 0 auto; padding: 8px 12px; }
.ambnewspanel > .hint { margin: 0 2px 8px; }
.ambbar .ambbarbtn { position: relative; }

/* ===== «Tengo hambre»: tarjetas y pantalla estilo app de comida ===== */
.hgcard { display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hgimg { position: relative; width: 100%; aspect-ratio: 10 / 7; max-height: 62vh; border-radius: 22px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.hgimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hgimg.hgph { display: grid; place-items: center; background: linear-gradient(135deg, var(--hg, #f59e0b), color-mix(in srgb, var(--hg, #f59e0b) 60%, #000)); border: 0; }
.hgemo { font-size: 72px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.hgtop { position: absolute; top: 12px; right: 0; background: #111; color: #ffd400; font: italic 800 17px/1 var(--font-display, system-ui); letter-spacing: .02em; padding: 12px 18px; border-radius: 14px 0 0 14px; }
.hgname { margin: 10px 4px 0; font: 700 22px/1.2 var(--font-display, system-ui); color: var(--fg); overflow-wrap: anywhere; }
.hgsub { margin: 2px 4px 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.hgmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 4px 0; font-size: 16px; color: var(--fg); }
.hgmeta > span { display: inline-flex; align-items: center; gap: 4px; }
.hgdot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); display: inline-block; }
.hgfree { background: #ffe14d; color: #111; font-weight: 800; font-size: 15px; padding: 3px 8px; border-radius: 3px; letter-spacing: .01em; }
.hgdeal { display: inline-block; margin: 10px 4px 0; background: #ff4d1c; color: #fff; font-weight: 800; font-size: 17px; padding: 8px 14px; border-radius: 4px 12px 12px 4px; }
.hgpreview { margin: 6px 0 14px; pointer-events: none; }
.hgmine { margin-bottom: 18px; }
.hgmine.off .hgcard { opacity: .5; }
.hgmine .hgcard { cursor: default; }

.hgscr { position: fixed; inset: 0; z-index: 3000; background: var(--surface); color: var(--fg); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.hghead { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 0 10px; background: var(--surface); }
.hgback { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--line); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.hgsearch { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.10); color: var(--fg); }
.hgsearch input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 17px; color: var(--fg); padding: 0; }
.hgsearch input::-webkit-search-cancel-button { display: none; }
.hgchips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; margin: 0 -2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hgchips::-webkit-scrollbar { display: none; }
.hgchip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface); color: var(--fg); font: inherit; font-size: 16px; font-weight: 500; box-shadow: 0 3px 10px rgba(0,0,0,.12); cursor: pointer; }
.hgchip.on { background: var(--accent); color: var(--accent-fg); }
select.hgchip { appearance: none; -webkit-appearance: none; padding-right: 16px; }
.hgcount { margin: 8px 2px 14px; font: 700 26px/1.2 var(--font-display, system-ui); }
.hgitems { display: flex; flex-direction: column; gap: 26px; }
.hgfoot { text-align: center; }
.hgact { position: fixed; inset: 0; z-index: 3001; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
.hgact[hidden] { display: none; }
.hgactbox { width: 100%; background: var(--surface); color: var(--fg); border-radius: 22px 22px 0 0; padding: 20px max(18px, env(safe-area-inset-left, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.hgactbox h3 { margin: 0; font-size: 22px; }
.hgactbox p { margin: 0; }
.hgacto { font-weight: 700; font-size: 17px; }
.hgchips .hgchip, .hgchips select.hgchip { width: auto; min-width: 0; flex: 0 0 auto; margin: 0; }
.hgchips select.hgchip { max-width: none; }
.ambplform label.check { display: flex; align-items: center; gap: 8px; }
.ambplform label.check input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 0; }

.hgpick{display:flex;flex-direction:column;gap:8px;margin:0 0 12px}
.hgpickb{display:block;width:100%;text-align:left;padding:12px 14px;border-radius:14px;border:2px solid var(--line);background:var(--surface);color:var(--fg);font:inherit;font-size:15px;cursor:pointer}
.hgpickb.on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--surface));font-weight:600}

.hgrow { display: flex; align-items: center; gap: 10px; }
.hgrow .hgsearch { flex: 1; min-width: 0; }
.hgtitle { display: flex; align-items: center; gap: 10px; }
.hgtitle .hgtico { font-size: 30px; line-height: 1; }
.hgtitle h2 { margin: 0; font: 800 26px/1.1 var(--font-display, system-ui); letter-spacing: -.01em; }

/* Repartidores de mayor rango: tarjeta azul */
.repcard.rk2 { background: #15803d; border-color: #166534; color: #fff; }
.repcard.rk2 .mkdesc, .repcard.rk2 .hint, .repcard.rk2 .reprate, .repcard.rk2 .mkprice, .repcard.rk2 strong { color: #fff; }
.repcard.rk2 .hint { opacity: .85; }
.repcard.rk2 .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.repcard.rk2 .btn:not(.ghost) { background: #fff; color: #15803d; }
.repcard.rk2 .mkst { background: rgba(255,255,255,.18); color: #fff; }
.reprk { display: inline-block; margin: 2px 0 6px; padding: 3px 10px; border-radius: 999px; background: #fff; color: #0b5bd3; font-weight: 700; font-size: 13px; }
.repbank { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid var(--line); color: var(--fg); }
.repcard.rk2 .repbank { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; }
.repcard.rk2 .repbank .btn.ghost { color: #fff; border-color: rgba(255,255,255,.7); }

.chatnp { display: flex; flex-direction: column; gap: 10px; }
.chatnpc { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; width: 100%; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; }
.chatnpc.rk2 { background: #15803d; border-color: #166534; color: #fff; }
.chatnpc.rk2 .hint, .chatnpc.rk2 strong { color: #fff; }
.chatnpc.rk2 .btn { background: #fff; color: #15803d; }
.csys { text-align: center; margin: 10px 0; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.cmod .cbub { border: 2px solid #0b5bd3; }
.cmodn { font-size: 12px; font-weight: 700; opacity: .8; margin-bottom: 2px; }
.chelp { margin: 4px 0 0; font-weight: 600; }

/* tarjetas de chat: pedido en curso = verde; pedido finalizado = amarillo */
.cswipe, .prow { flex-shrink: 0; }
.prow.ordopen { background: #d7f5df !important; border-color: #22a14a !important; color: #0f3d1d; }
.prow.ordopen .hint, .prow.ordopen .muted, .prow.ordopen .pinfo { color: #14532d; }
.prow.ordopen .ordtag { background: #16a34a; }
.prow.ordclosed { background: #fff3bf !important; border-color: #f2c200 !important; color: #3d3200; }
.prow.ordclosed .hint, .prow.ordclosed .muted, .prow.ordclosed .pinfo { color: #6b5a00; }
.prow.ordclosed .ordtag { background: #b78900; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prow.ordopen { background: #0f3a1d !important; border-color: #22a14a !important; color: #d7f5df; } :root:not([data-theme="light"]) .prow.ordclosed { background: #4a3f0a !important; border-color: #b8960c !important; color: #fff3bf; } }
:root[data-theme="dark"] .prow.ordopen { background: #0f3a1d !important; border-color: #22a14a !important; color: #d7f5df; }
:root[data-theme="dark"] .prow.ordclosed { background: #4a3f0a !important; border-color: #b8960c !important; color: #fff3bf; }
.chsec2 { margin: 14px 2px 6px; font-size: 14px; font-weight: 700; }
.reprkrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reprk.reptrust { background: #0b5bd3; color: #fff; }
.repwarn { color: #b45309; font-weight: 600; }
.reprk.repbronze { background: #b87333; color: #fff; }
.repgar { display: block; font-size: 12.5px; line-height: 1.35; margin: 4px 0; }
.chatsub { max-height: 50%; }

.ambrtbar button, .ambrtview button { flex: 0 0 auto; }
.ambrtin { flex: 1 1 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #b9c4bf; border-radius: 8px; font-size: 14px; }
.chofer { flex: 1 1 100%; }
.chofrow { display: flex; gap: 6px; } .chofrow input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #b9c4bf; border-radius: 8px; font-size: 14px; }
.chofrow input { flex: 1 1 0; width: 0; } .chofrow button { flex: 0 0 auto; }
.rtfocus #ambCount, .rtfocus .ambcount { display: none !important; }

.reptabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; } .reptabs .mkstb { flex: 1 1 0; padding: 8px 6px; font-size: 13px; text-align: center; white-space: normal; line-height: 1.2; }
.repmapbtn { display: block; width: 100%; margin: 0 0 10px; }
.ambactview button { flex: 0 0 auto; }


.chfolder{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:none;border:0;font:inherit;cursor:pointer;color:inherit;padding:8px 2px}.chfolder .badge2{margin-left:auto;position:static}

.ambrttot{font-weight:700}

/* Pedido con repartidor en curso: una cajita 📦 sobre el icono de chat */
.ambbar .ambbarbtn { position: relative; }
.ambooBox { position: absolute; top: 2px; left: 50%; margin-left: -30px; font-size: 16px; line-height: 1; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.ambooBox[hidden] { display: none; }

/* Chat de pedido: panel más ordenado y compacto */
.chatpush.thr { display: none; }
.chatpush { justify-content: space-between; }
.chatpush .btn.small { padding: 3px 9px; font-size: 12.5px; }
.repchips { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.repchips span { margin: 0; font-size: 12px; line-height: 1.35; opacity: .9; }
.repgobox .repcancel { flex: 0 0 auto; margin-left: auto; padding: 3px 9px; font-size: 12.5px; opacity: .85; }

.chattab.live { color: #0f6b3a; opacity: 1; font-weight: 700; background: #d9f3e3; }
.chattab.live.on { border-bottom-color: #1e9e57; }
.chattab.live .tabbadge { background: #1e9e57; }
@media (prefers-color-scheme: dark) { .chattab.live { color: #8fe0b0; background: #123b25; } }

.ambzone { fill: rgba(36,160,90,.18); stroke: #1d8a4e; stroke-width: 3; stroke-dasharray: 8 6; stroke-linejoin: round; }
.ambzone.draw { fill: rgba(36,80,166,.14); stroke: #2450a6; }
.ambzonept { fill: #fff; stroke: #2450a6; stroke-width: 3; }

.ambrtpanel { top: 150px; right: auto; bottom: auto; left: 8px; width: min(calc(100% - 76px), 300px); display: block; padding: 8px 10px; z-index: 7; }
.ambrtpanel .rtprow { margin-bottom: 6px; } .ambrtpanel .rtprow:last-child { margin-bottom: 0; }
.ambrtpanel label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.ambrtpanel input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #c9d2dc; border-radius: 10px; font-size: 14px; }
.ambrtpanel .rtpres { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; max-height: 150px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ambrtpanel .rtpit { text-align: left; padding: 7px 10px; border: 0; border-radius: 8px; background: #eef3fb; color: #17231f; font-size: 13px; }
.ambpin .rtquit { position: absolute; left: calc(100% + 4px); top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 6px 10px; border: 0; border-radius: 999px; background: #c0392b; color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.3); z-index: 9; cursor: pointer; }
.ambrtpanel input.rtblue { color: #1a56db; font-weight: 700; }
.ambrtpanel .rtphead { display: flex; justify-content: flex-end; margin: -2px 0 4px; }
.ambrtpanel .rtpmin { border: 0; background: #eef3fb; color: #1a56db; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.ambrtpanel.min { width: auto; padding: 4px; border-radius: 999px; }
.ambrtpanel.min .rtphead { margin: 0; }
.ambrtpanel.min .rtpmin { padding: 8px 14px; font-size: 13px; }
.ambpin.int.rtpt { pointer-events: auto; cursor: pointer; }
.ambordwin .ordttl { display: block; font-size: 14px; margin-bottom: 4px; }
.ambordwin .ordln { margin: 2px 0; font-size: 12.5px; }
.ambordwin .ordrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.ambordwin .ordrow input { flex: 1 1 110px; min-width: 0; }
.ambordwin .ordft { border-top: 1px solid #e3e8ef; padding-top: 6px; }
.ambordwin .ordcancel { color: #c0392b; border-color: #e6b8b2; }
.ambordwin .rtphead { display: flex; justify-content: flex-end; margin: -2px 0 4px; }
.ambrtpanel.ambordwin { max-height: calc(100% - 330px); overflow-y: auto; }
.ambrtpanel.ambordwin.min { max-height: none; overflow: visible; }

.repordbox{display:flex;flex-direction:column;gap:8px;margin:8px 0}.repordit{display:flex;flex-direction:column;gap:3px;padding:10px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc}.repordit .btn{align-self:flex-start;margin-top:4px}

.ambrtpanel .rtphead,.ambordwin .rtphead{gap:6px;flex-wrap:wrap}

.ordleg.done{stroke:#94a3b8;stroke-width:4;stroke-dasharray:none;opacity:.8}.ordleg.cur{stroke:#ea580c;stroke-width:6;stroke-dasharray:none}.ordleg.next{stroke:#2563eb;stroke-width:4;stroke-dasharray:2 9}.ordtot{font-weight:700}

.ambsitw{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.ambsitw .ambsit{flex:1 1 180px;min-width:0}.ambsal{flex:0 0 auto;margin:0 8px 6px}

.ambctl #ambLay{display:flex;align-items:center;justify-content:center;color:#6d28d9}.ambctl #ambLay.on{background:#6d28d9;color:#fff;border-color:#6d28d9}
.amblayers{position:absolute;right:58px;top:10px;z-index:6;display:flex;flex-direction:column;gap:6px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px;box-shadow:0 4px 16px rgba(0,0,0,.25);max-width:min(260px,calc(100% - 80px))}
.ambmapbox.full .amblayers{top:calc(102px + env(safe-area-inset-top, 0px));right:calc(58px + env(safe-area-inset-right, 0px))}
.amblayers strong{font-size:13px;color:var(--muted,#666)}.amblayer{border:1px solid var(--line);background:var(--surface);color:var(--fg);border-radius:10px;padding:9px 10px;font-size:14px;text-align:left;cursor:pointer}.amblayer.on{background:#6d28d9;color:#fff;border-color:#6d28d9}
.ambmapbox.full .amblayers{top:calc(116px + env(safe-area-inset-top, 0px))}

.cmswipe{position:relative;overflow:hidden;flex-shrink:0}
.cmswipe>.cmdel{position:absolute;right:0;top:0;bottom:0;width:84px;border:0;border-radius:10px;background:#c62828;color:#fff;font-weight:600;font-size:14px;cursor:pointer;margin:0}
.cmswipe>.cmdel.ask{background:#8e0000}
.cmswipe>.cmsg{position:relative;transition:transform .18s;touch-action:pan-y;-webkit-user-select:none;user-select:none}
.cmswipe>.cmsg.sw{transform:translateX(-84px)}
.cmswipe>.cmdel{visibility:hidden}.cmswipe.open>.cmdel{visibility:visible}
.ambsugh{font-weight:700;margin:2px 0 4px;padding:6px 12px 0}

/* Mercado en cuadrícula (tarjetas compactas con foto grande; al tocar una se abre con todo el detalle) */
.mkgridttl{margin:12px 0 0;font-size:17px}
.mkphotos{position:relative}
.mknew{position:absolute;left:8px;top:8px;background:#fff;color:#7a3e00;border:1px solid #f3c98b;border-radius:999px;font-size:12px;font-weight:700;padding:2px 9px;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.mknoimg{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#eef4ff,#fdf1e3);border-radius:10px;min-height:120px}.mknoimg .mkph{font-size:46px}
.mklist.mkgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.mkgrid>.mkcard{display:flex;flex-direction:column;padding:0;overflow:hidden;border-radius:16px;box-shadow:0 2px 8px rgba(0,0,0,.12);cursor:pointer;min-width:0}
.mkgrid>.mkcard .mkphotos{order:1}.mkgrid>.mkcard .mkphotos .mkbig{aspect-ratio:1/1;max-height:none;border-radius:0}
.mkgrid>.mkcard .mknoimg{aspect-ratio:1/1;border-radius:0}
.mkgrid>.mkcard .mkhead{order:2;flex-direction:column-reverse;gap:1px;margin:0;padding:8px 10px 10px;align-items:flex-start}
.mkgrid>.mkcard .mkhead strong{font-size:14px;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mkgrid>.mkcard .mkprice{font-size:16px}
.mkgrid>.mkcard:not(.open) .mkthumbs,.mkgrid>.mkcard:not(.open) .mkcat,.mkgrid>.mkcard:not(.open) .mkdesc,.mkgrid>.mkcard:not(.open) .hint,.mkgrid>.mkcard:not(.open) .mkdistline,.mkgrid>.mkcard:not(.open) .mkpoint,.mkgrid>.mkcard:not(.open) .ambpr,.mkgrid>.mkcard:not(.open) .mkstate,.mkgrid>.mkcard:not(.open) .mkbuyers{display:none!important}
.mkgrid>.mkcard:not(.open) .mkst{margin:0 10px 8px;align-self:flex-start;order:3}
.mkgrid>.mkcard.open{grid-column:1/-1;padding:10px;cursor:default}
.mkgrid>:not(.mkcard){grid-column:1/-1}
.mkgrid>.mkcard.open .mkhead{flex-direction:row;padding:0;margin-top:8px;align-items:baseline}
.mkgrid>.mkcard.open .mkphotos .mkbig{aspect-ratio:auto;max-height:260px;border-radius:10px}
.mkgrid>.mkcard.open .mknoimg{aspect-ratio:auto;border-radius:10px}
.mkgrid>.mkcard.open .mkhead strong{display:block;-webkit-line-clamp:unset;font-size:16px}

/* Mini currículum: tarjeta azul pastel */
.ambcv,.cvbox{background:#e3f0ff;border:1px solid #b9d7fb;border-radius:16px;padding:12px 14px;margin:12px 0;color:#1d2b3a}
.ambcv .ambsec,.cvbox .crh{margin-top:0;color:#17406b}
.ambcv .hint,.cvbox .hint{color:#4a6580}
.ambcv .ambrsum,.cvbox .portd{color:#1d2b3a}
.ambcv .btn.ghost{background:#fff}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .ambcv,:root:not([data-theme="light"]) .cvbox{background:#1b2f47;border-color:#2f4d73;color:#e6eef8}
:root:not([data-theme="light"]) .ambcv .ambsec,:root:not([data-theme="light"]) .cvbox .crh{color:#a9cdf5}
:root:not([data-theme="light"]) .ambcv .hint,:root:not([data-theme="light"]) .cvbox .hint{color:#9db6d1}
:root:not([data-theme="light"]) .ambcv .ambrsum,:root:not([data-theme="light"]) .cvbox .portd{color:#e6eef8}
:root:not([data-theme="light"]) .ambcv .btn.ghost{background:transparent}}
:root[data-theme="dark"] .ambcv,:root[data-theme="dark"] .cvbox{background:#1b2f47;border-color:#2f4d73;color:#e6eef8}
:root[data-theme="dark"] .ambcv .ambsec,:root[data-theme="dark"] .cvbox .crh{color:#a9cdf5}
:root[data-theme="dark"] .ambcv .hint,:root[data-theme="dark"] .cvbox .hint{color:#9db6d1}
:root[data-theme="dark"] .ambcv .ambrsum,:root[data-theme="dark"] .cvbox .portd{color:#e6eef8}
:root[data-theme="dark"] .ambcv .btn.ghost{background:transparent}
