:root {
  --ink: #0a0a0b;
  --ink-soft: #5c5f66;
  --paper: #f3f4f6;
  --paper-2: #ffffff;
  --line: #e5e7eb;
  --rosa: #e4007c;
  --rosa-dark: #b80064;
  --gold: #c49a3c;
  --green: #0f7b4a;
  --blue: #1c4b8c;
  --danger: #b42318;
  --shadow: 0 1px 0 rgba(10, 10, 11, .06);
  --radius: 14px;
  --max: 1120px;
  --sans: "Figtree", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Figtree", sans-serif;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body { overflow-x: hidden; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
html { -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
textarea, select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 16px;
  line-height: 1.3;
}

.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; }
.brand img, .brand svg { width: 28px; height: 28px; }
.nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nav a, .nav summary {
  padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem; cursor: pointer;
}
.nav details { position: relative; }
.nav details ul {
  position: absolute; right: 0; top: 110%; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; list-style: none; margin: 0; padding: 8px; min-width: 220px;
}
.nav details li a { display: block; }
.search-pill {
  border: 1px solid var(--line); background: var(--paper-2); border-radius: 999px; padding: 8px 12px; min-width: 140px;
}
.search-pill input {
  border: 0; padding: 0; background: transparent; width: 140px; font-size: 16px;
}

.hero { padding: 10px 0 6px; }
.kicker { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .65rem; color: var(--rosa); }
.hero h1, .page-title {
  font-family: var(--display); font-size: clamp(1.35rem, 3.6vw, 1.9rem); line-height: 1.05;
  letter-spacing: -.03em; margin: 2px 0 6px;
}
.lede { font-size: .9rem; color: var(--ink-soft); max-width: 40rem; margin: 0; }
.cta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; font-size: .9rem;
}
.btn-rosa { background: var(--rosa); color: #fff; }
.btn-rosa:hover { background: var(--rosa-dark); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5d; color: #fff; }
.btn-plus {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; border-radius: 999px; min-height: 36px; padding: 0 12px;
  font-weight: 800; white-space: nowrap; text-align: center; line-height: 1; touch-action: manipulation;
  font-size: .82rem;
}
.btn-plus span {
  display: flex; align-items: center; justify-content: center;
  width: 100%; color: #fff; font-weight: 800; text-align: center; line-height: 1;
}

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 4px;
}
.stat {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px;
}
.stat b { display: block; font-family: var(--display); font-size: 1.05rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-soft); font-size: .7rem; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 6px; vertical-align: middle; transform-origin: 50% 50%; }

.board { margin: 10px 0 28px; display: grid; gap: 6px; }
.row-card {
  display: grid; grid-template-columns: 44px 44px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px;
  min-width: 0;
}
.row-card.is-1 { border-color: #d4a017; background: linear-gradient(90deg, #fff8e1 0%, #fff 42%); box-shadow: inset 4px 0 0 #d4a017; }
.row-card.is-2 { border-color: #9aa3ad; background: linear-gradient(90deg, #f3f5f7 0%, #fff 42%); box-shadow: inset 4px 0 0 #8e99a4; }
.row-card.is-3 { border-color: #c4844a; background: linear-gradient(90deg, #f8efe6 0%, #fff 42%); box-shadow: inset 4px 0 0 #c4844a; }
.pos { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.04em; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.pos.gold { color: #c49a3c; }
.pos.silver { color: #6b7680; }
.pos.bronze { color: #b56b3c; }
.logo-box {
  width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: #9ca3af;
  display: grid; place-items: center; flex-shrink: 0;
}
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.meta { min-width: 0; overflow: hidden; }
.biz-name, .meta a, .meta strong {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
  font-size: .92rem;
}
.meta small { display: block; color: var(--ink-soft); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font-family: var(--display); font-weight: 800; font-size: .98rem; letter-spacing: -.03em; text-align: right; font-variant-numeric: tabular-nums; }
.price-col { display: grid; justify-items: end; gap: 4px; min-width: 0; }

.section-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 20px 0 8px;
}
.section-h h2 { font-family: var(--display); font-size: 1.15rem; margin: 0; letter-spacing: -.03em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: .88rem;
}
.chip:hover { border-color: var(--ink); }
.chip-hot { border-color: var(--rosa); background: #fff0f7; }

.form {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 24px; padding: 22px; display: grid; gap: 12px; max-width: 640px; width: 100%; min-width: 0;
}
label { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; min-width: 0; }
input[type="checkbox"], input[type="radio"] { width: auto; }
input[type="file"] { width: 100%; }
.help { font-weight: 500; color: var(--ink-soft); font-size: .82rem; }
.alert { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.alert-error { background: #fde8e6; color: var(--danger); }
.alert-ok { background: #e5f6ec; color: var(--green); }
.alert-warn { background: #fff4d6; }

.crumb { display: flex; gap: 8px; flex-wrap: wrap; color: var(--ink-soft); font-weight: 600; font-size: .9rem; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-soft); margin-top: 40px; }

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #f4efe6; padding: 20px 16px; }
.side a { display: block; padding: 9px 10px; border-radius: 10px; color: #fff; }
.side a:hover, .side a.active { background: #22232b; color: #fff; }
.admin-main { padding: 24px; background: #f3f4f6; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.badge { display: inline-flex; border-radius: 999px; padding: 3px 8px; font-size: .75rem; font-weight: 800; }
.badge-on { background: #e5f6ec; color: var(--green); }
.badge-off { background: #eee; color: #666; }
.badge-live { background: #fde8e6; color: var(--danger); }

@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .row-card {
    grid-template-columns: 32px 40px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }
  .logo-box { width: 40px; height: 40px; border-radius: 10px; }
  .pos { font-size: 1rem; }
  .price-col {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 2px;
  }
  .meta small { display: none; }
  .nav .hide-sm { display: none; }
  .admin-shell { grid-template-columns: 1fr; }
  .search-pill { display: none; }
  .form { padding: 16px; border-radius: 16px; }
  .page-title, .hero h1 { font-size: 1.35rem; overflow-wrap: anywhere; }
  .btn-plus { width: auto; min-width: 0; flex: 0 0 auto; }
  .wrap { width: min(var(--max), calc(100% - 20px)); }
  .wa-row { grid-template-columns: 1fr; }
  .hero-top, .rank-toolbar { flex-wrap: wrap; }
  .podium { display: none !important; }
  .podium-mobile { display: grid !important; }
}

.live-dot {
  animation: livePulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(15, 123, 74, .55);
}
@keyframes livePulse {
  0% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(15, 123, 74, .45); }
  70% { opacity: .55; transform: scale(1.25); box-shadow: 0 0 0 6px rgba(15, 123, 74, 0); }
  100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(15, 123, 74, 0); }
}

.origin {
  display: inline-flex; align-items: center; margin: 2px 0 0;
  font-size: .65rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 6px; border: 1px solid var(--line); max-width: 100%;
}
.origin-mexico { background: var(--ink); color: #fff; border-color: var(--ink); }
.origin-state { background: #e8f0ff; color: var(--blue); }
.origin-city { background: #fde7f3; color: var(--rosa); }

.row-card { transition: transform .45s cubic-bezier(.22,.61,.36,1), opacity .35s ease; }
.row-card.enter { animation: rowIn .55s cubic-bezier(.22,.61,.36,1); }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(-18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.views-line { color: var(--ink-soft); font-weight: 600; font-size: .78rem; margin: 4px 0 0; }

.rank-banner {
  background: var(--ink); color: #fff; border-radius: 20px; padding: 18px 20px; margin: 22px 0 12px;
  display: grid; gap: 4px;
}
.rank-banner .kicker { color: #ffb6d9; }
.rank-banner strong { font-family: var(--display); font-size: 1.6rem; letter-spacing: -.03em; }
.rank-banner .help { color: #d9d3c8; }

.form { overflow-wrap: anywhere; }
.buy-page { padding: 16px 0 64px; min-width: 0; }
.buy-form { max-width: 100%; }
.form-block { display: grid; gap: 12px; padding-bottom: 8px; }
.form-block h2 { font-family: var(--display); margin: 8px 0 0; font-size: 1.2rem; }
.form-private { border-top: 1px dashed var(--line); padding-top: 14px; }

.stepper {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 8px; align-items: center;
}
.step-btn {
  height: 56px; width: 56px; border: 0; border-radius: 16px; background: var(--ink); color: #fff;
  font-size: 1.6rem; font-weight: 800; cursor: pointer; user-select: none; touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding: 0;
}
.step-star { background: var(--rosa); font-size: 1.35rem; }
.step-value {
  min-height: 56px; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: clamp(1.05rem, 4vw, 1.5rem); font-weight: 800; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; line-height: 1; text-align: center; padding: 0 8px;
}
.wa-row { display: grid; grid-template-columns: minmax(140px, .9fr) 1.1fr; gap: 8px; min-width: 0; }
.btn-pay { width: 100%; }

.place-hero, .place-card {
  display: flex; gap: 16px; align-items: center; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin: 16px 0;
}
.place-num { font-family: var(--display); font-size: clamp(2.4rem, 8vw, 4.5rem); line-height: .85; letter-spacing: -.05em; font-weight: 800; font-variant-numeric: tabular-nums; }
.place-1 .place-num, .place-hero.place-1 .place-num { color: var(--gold); }
.place-2 .place-num { color: #7d8796; }
.place-3 .place-num { color: #b56b3c; }
.tag-award {
  display: inline-flex; margin: 4px 6px 0 0; padding: 4px 8px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800;
}
.tag-local { background: var(--rosa); }
.place-list { display: grid; gap: 10px; }
.place-card small { display: block; color: var(--ink-soft); }
.biz-logo { width: 96px; height: 96px; margin-bottom: 16px; }

.hero-top, .rank-toolbar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.view-switch {
  display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex-shrink: 0;
}
.view-switch a {
  padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800;
}
.view-switch a.is-on { background: var(--ink); color: #fff; }
.crumb { padding-top: 10px; }

.podium-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 12px 0 20px; }
.podium-filters label { min-width: 160px; }
.is-hidden { display: none; }
.podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  grid-template-areas: "p2 p1 p3";
  gap: 12px;
  align-items: end;
}
.podium-slot {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 20px; padding: 18px; text-align: center;
  display: grid; gap: 8px; justify-items: center;
}
.podium-slot h2 { margin: 0; font-size: 1.05rem; }
.podium-copy { min-width: 0; }
.podium-rank { font-family: var(--display); font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.podium-slot img, .podium-logo img, .pm-logo img { width: 100%; height: 100%; object-fit: contain; }
.podium-logo { width: 88px; height: 88px; border-radius: 20px; }
.podium-medal {
  font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.slot-1 .podium-medal { color: #c49a3c; }
.slot-2 .podium-medal { color: #6b7680; }
.slot-3 .podium-medal { color: #b56b3c; }
.slot-1 { grid-area: p1; min-height: 340px; border-color: #d4a017; background: #fff8e1; }
.slot-2 { grid-area: p2; min-height: 280px; border-color: #9aa3ad; background: #f3f5f7; }
.slot-3 { grid-area: p3; min-height: 240px; border-color: #c4844a; background: #f8efe6; }

.podium-mobile { display: none; gap: 16px; margin: 8px 0 32px; }
.pm-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px 18px;
}
.pm-card h2 { margin: 0; font-size: 1.15rem; line-height: 1.2; }
.pm-card .btn { width: 100%; min-height: 44px; }
.pm-card .price { text-align: center; font-size: 1.2rem; }
.pm-medal {
  font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.pm-logo { width: 104px; height: 104px; border-radius: 24px; }
.pm-1 { border-color: #d4a017; background: #fff8e1; }
.pm-1 .pm-medal, .pm-1 .price { color: #9a740c; }
.pm-2 { border-color: #9aa3ad; background: #f4f6f8; }
.pm-2 .pm-medal { color: #5c6670; }
.pm-3 { border-color: #c4844a; background: #f8efe6; }
.pm-3 .pm-medal { color: #8a4e24; }

.logo-status { font-weight: 700; font-size: .85rem; }
.logo-status.is-missing { color: var(--danger); }
.logo-status.is-ok { color: var(--green); }

.request-board { list-style: none; padding: 0; display: grid; gap: 8px; }
.request-board li {
  display: flex; gap: 12px; align-items: center; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}

.admin-edit { max-width: 640px; }
.admin-edit .btn { margin-right: 8px; margin-top: 8px; }
.admin-city-form {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.admin-city-form input { width: 140px; min-width: 0; }
