/* v3.4: neutral surfaces, brand accents and readable semantic states. */
:root, :root[data-theme="day"] {
  --night:#F5F4F0; --night-2:#ECEEF2; --card:#FFFFFF; --card-line:#7C8492;
  --cream:#202735; --cream-dim:#505B6C; --magenta:#B51E60; --mango:#895000;
  --lime:#226A3A; --sky:#126481; --urgent:#B42335; --radius:18px;
  --brand-purple:#6940A5; --button-bg:#B51E60; --button-text:#FFFFFF;
  --positive-bg:#226A3A; --positive-text:#FFFFFF; --badge-bg:#F4BB63; --badge-text:#352400;
  --soft-brand:#F8EAF0; --soft-positive:#E6F2E9; --soft-warning:#FFF2DA;
  --soft-info:#E9F3F8; --shadow:0 5px 18px rgba(32,39,53,.06);
  --bg:var(--night); --line:var(--card-line); --dim:var(--cream-dim); --warn:var(--mango);
}
:root[data-theme="night"] {
  --night:#171C24; --night-2:#242C38; --card:#202833; --card-line:#798493;
  --cream:#F4F6F8; --cream-dim:#C1CAD5; --magenta:#FF8AB7; --mango:#F4BB63;
  --lime:#9DDFAD; --sky:#8ED6F0; --urgent:#FF9AA8;
  --brand-purple:#C6AEF7; --button-bg:#B51E60; --button-text:#FFFFFF;
  --positive-bg:#226A3A; --positive-text:#FFFFFF; --badge-bg:#F4BB63; --badge-text:#352400;
  --soft-brand:#392A37; --soft-positive:#253B31; --soft-warning:#3C3427;
  --soft-info:#263640; --shadow:0 5px 18px rgba(0,0,0,.14);
}
body { line-height:1.5; }
button, input, select, textarea { font:inherit; }
button, select, .detail-links a, .lang-btn, .auth-link { min-height:44px; }
button, a, select, input, textarea { -webkit-tap-highlight-color:transparent; }
:where(button,a,input,select,textarea,[tabindex]):focus-visible {
  outline:3px solid var(--brand-purple); outline-offset:3px;
}
button:disabled { opacity:.6; cursor:not-allowed; }
input[type=checkbox], input[type=radio] { accent-color:var(--button-bg); }
.topbar { background:var(--card); gap:12px; padding:12px max(16px,calc((100vw - 1080px)/2)); }
.topbar-right { flex-wrap:wrap; justify-content:flex-end; gap:12px; }
.theme-control { display:flex; align-items:center; gap:8px; }
.theme-control label { margin:0; font-size:12px; text-transform:none; color:var(--cream-dim); }
.theme-control select { width:auto; max-width:220px; font-size:12px; font-weight:600; padding:8px 10px; }
.auth-area { flex-wrap:wrap; }
header { padding:30px 16px 12px; }
header::before { display:none; }
.brand { font-size:clamp(40px,8vw,56px); color:var(--brand-purple); }
.brand .co { color:var(--magenta); }
.tagline { font-size:15px; margin-top:10px; }
.cable-wrap,.filters,.toolbar,.grid,.sponsored-section,.site-footer { max-width:1080px; }
.cable { padding-top:16px; }
.cable-line { top:36px; }
.station { min-height:76px; }
.station .dot { width:42px; height:42px; font-size:20px; }
.station .label { font-size:12px; max-width:100px; color:var(--cream-dim); }
.station.active .dot { background:var(--soft-brand); border-color:var(--brand-purple); box-shadow:0 0 0 3px var(--soft-brand); }
.station.active .label { color:var(--cream); font-weight:800; }
.filter-title,.admin-link { color:var(--cream-dim); }
.filter-title { font-size:12px; }
.chip { min-height:44px; font-size:13px; background:var(--card); color:var(--cream-dim); }
.chip.active,.tab-btn.active { background:var(--brand-purple); color:var(--night); border-color:var(--brand-purple); }
.chip:hover,.tab-btn:hover,.lang-btn:hover,.btn-ghost:hover,.user-action-btn:hover { border-color:var(--brand-purple); color:var(--cream); }
.chip.active:hover,.tab-btn.active:hover { color:var(--night); }
.search { background:var(--card); min-height:48px; font-size:16px; }
.grid { gap:20px; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); }
.card { padding:12px; gap:10px; box-shadow:var(--shadow); }
.card:hover { border-color:var(--brand-purple); }
.card .thumb { height:auto; aspect-ratio:3/2; border-radius:12px; }
.card h3 { font-family:Inter,sans-serif; font-size:18px; font-weight:800; line-height:1.3; letter-spacing:-.02em; }
.card-title-btn { display:block; width:100%; text-align:left; border:0; background:transparent; color:inherit; padding:0; font:inherit; letter-spacing:inherit; cursor:pointer; white-space:normal; }
.card-title-btn:hover { color:var(--brand-purple); }
.card .cat-tag,#detailCatTag { color:var(--cream-dim) !important; font-size:11px; font-weight:700; line-height:1.5; }
.meta { gap:6px; }
.meta-pill { font-size:12px; padding:4px 9px; background:var(--night-2); color:var(--cream-dim); white-space:normal; }
.card .links-row a { font-size:13px; min-height:44px; display:inline-flex; align-items:center; text-decoration:underline; text-underline-offset:3px; }
.btn-primary,.fab { background:var(--button-bg); color:var(--button-text); }
.btn-primary:hover,.fab:hover { background:#96144D; }
.fab { box-shadow:0 6px 20px rgba(0,0,0,.18); bottom:max(18px,env(safe-area-inset-bottom)); }
.btn-approve { background:var(--positive-bg); color:var(--positive-text); }
.btn-reject { color:var(--urgent); border-color:var(--urgent); }
.badge-sponsored,.badge-patrocinado { background:var(--badge-bg); color:var(--badge-text); }
.badge-today,#confirmOk { background:var(--button-bg) !important; color:#fff !important; }
.promo-banner { background:var(--soft-warning); color:var(--mango); }
.lineup-banner { background:var(--soft-info); color:var(--sky); }
.safety-banner-inner { background:var(--soft-warning); color:var(--cream); }
.user-action-btn.active,.user-action-btn.active.fav { background:var(--soft-brand); color:var(--cream); }
.user-action-btn.active.been { background:var(--soft-positive); color:var(--cream); }
.modal { background:var(--card); box-shadow:0 12px 45px rgba(0,0,0,.2); }
.close-x { width:44px; height:44px; top:8px; right:8px; border-radius:50%; background:var(--card); color:var(--cream); }
.modal h2 { padding-right:32px; }
.detail-gallery { scroll-snap-type:x mandatory; gap:12px; padding-bottom:6px; }
.detail-gallery img { width:85%; height:auto; aspect-ratio:3/2; scroll-snap-align:start; }
.detail-gallery img:only-child { width:100%; }
.detail-desc { color:var(--cream); font-size:15px; }
.detail-links a { display:inline-flex; align-items:center; background:var(--night-2); }
.business-status { display:flex; gap:8px; align-items:center; padding:12px 14px; border-radius:12px; margin-top:14px; font-size:14px; font-weight:600; border:1px solid var(--card-line); }
.business-status[hidden] { display:none; }
.business-status[data-state="open"] { background:var(--soft-positive); color:var(--lime); }
.business-status[data-state="closed"] { background:var(--night-2); color:var(--cream-dim); }
.site-footer a { text-decoration:underline; text-underline-offset:3px; }
code { background:var(--night-2); color:var(--cream); }
@media(max-width:680px) {
  .topbar-right { width:100%; justify-content:space-between; }
  .theme-control { order:3; width:100%; justify-content:space-between; }
  .theme-control select { flex:1; max-width:240px; }
  .grid { gap:16px; }
  .modal-actions,.tabs { flex-wrap:wrap; }
  .modal-actions .btn { white-space:normal; }
}
@media(max-width:520px) {
  .grid { grid-template-columns:1fr; }
  .card { padding:12px; }
  .card .thumb { aspect-ratio:16/10; }
  .overlay { padding:12px 8px; }
  .detail-gallery img { width:90%; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none !important; scroll-behavior:auto !important; }
}

/* v3.4.2: desktop density pass. Keep mobile/touch layouts generous, while
   making the desktop experience feel closer to the previous 80% browser zoom. */
@media (min-width: 900px) {
  .topbar {
    gap:10px;
    padding:10px max(16px,calc((100vw - 960px)/2));
  }
  .topbar-right { gap:10px; }
  .theme-control { gap:6px; }
  .theme-control label { font-size:11px; }
  .theme-control select {
    max-width:190px;
    font-size:11px;
    padding:6px 8px;
  }

  header { padding:22px 16px 8px; }
  .brand { font-size:clamp(38px,5vw,46px); }
  .tagline { font-size:13px; margin-top:7px; }

  .cable-wrap,
  .filters,
  .toolbar,
  .grid,
  .sponsored-section,
  .site-footer { max-width:960px; }

  .cable { padding-top:10px; }
  .cable-line { top:31px; }
  .station { min-height:64px; gap:5px; }
  .station .dot { width:34px; height:34px; font-size:16px; }
  .station .label { font-size:10.5px; max-width:82px; }

  .filters { margin-top:12px; }
  .filter-row { gap:8px; }
  .filter-title { font-size:11px; margin-bottom:6px; }
  .chip {
    min-height:38px;
    font-size:12px;
    padding:6px 12px;
  }

  .toolbar { margin-top:14px; }
  .search {
    min-height:44px;
    font-size:14px;
    padding:9px 12px;
  }

  .grid {
    gap:16px;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    margin-top:16px;
  }
  .card { padding:10px; gap:8px; }
  .card .thumb { border-radius:10px; }
  .card h3 { font-size:16px; line-height:1.22; }
  .card .cat-tag,#detailCatTag { font-size:10px; }
  .meta { gap:5px; }
  .meta-pill { font-size:11px; padding:3px 8px; }
  .card .links-row { gap:8px; }
  .card .links-row a { font-size:12px; min-height:36px; }

  .fab {
    min-height:42px;
    padding:10px 16px;
    font-size:12.5px;
    bottom:16px;
    right:16px;
  }

  .modal { max-width:min(820px,calc(100vw - 48px)); }
  .detail-gallery img { width:78%; }
}

/* v3.5: clearer navigation, first-visit city choice, smart empty states and municipality picker. */
.city-control{display:flex;align-items:center;gap:8px;min-width:0}
.city-control label{margin:0;color:var(--cream-dim);font-size:12px;font-weight:800;white-space:nowrap}
.city-control .city-select{min-width:150px;max-width:210px}
.section-question{max-width:960px;margin:6px auto -4px;padding:0 16px;text-align:center;color:var(--cream);font-size:13px;font-weight:800}
.filter-question{color:var(--cream);font-weight:800;text-transform:none;letter-spacing:0;font-size:12px}
.filter-summary{max-width:960px;margin:10px auto 0;padding:0 16px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;color:var(--cream-dim);font-size:12px}
.filter-summary[hidden]{display:none}
.filter-summary .summary-text{background:var(--night-2);border:1px solid var(--card-line);border-radius:999px;padding:6px 10px;color:var(--cream-dim)}
.filter-summary .summary-clear{min-height:34px;border:0;background:transparent;color:var(--brand-purple);font-weight:800;cursor:pointer;padding:4px 8px;text-decoration:underline;text-underline-offset:3px}
.smart-empty{max-width:620px;background:var(--card);border:1px solid var(--card-line);border-radius:18px;padding:24px;margin:30px auto;box-shadow:var(--shadow)}
.smart-empty .display{font-size:22px;color:var(--cream)}
.smart-empty p{margin:8px 0 0;line-height:1.55}
.empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:16px}
.empty-actions .btn{min-height:42px}
.city-welcome-modal{max-width:560px;text-align:center;padding:28px}
.city-welcome-modal .sub{margin-bottom:18px}
.city-welcome-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.city-welcome-btn{border:1px solid var(--card-line);background:var(--night-2);color:var(--cream);border-radius:14px;padding:12px 14px;font-weight:800;cursor:pointer;text-align:left}
.city-welcome-btn:hover,.city-welcome-btn:focus-visible{border-color:var(--brand-purple)}
.city-welcome-btn .count{display:block;color:var(--cream-dim);font-size:11px;font-weight:600;margin-top:3px}
.municipality-picker{position:relative}
.municipality-picker input[type=text]{padding-right:38px}
.municipality-suggestions{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:20;background:var(--card);border:1px solid var(--card-line);border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.18);max-height:260px;overflow:auto;padding:6px}
.municipality-suggestions[hidden]{display:none}
.municipality-option{width:100%;border:0;background:transparent;color:var(--cream);border-radius:9px;padding:9px 10px;text-align:left;cursor:pointer;min-height:44px}
.municipality-option:hover,.municipality-option:focus-visible{background:var(--night-2)}
.municipality-option strong{display:block;font-size:13px}
.municipality-option span{display:block;color:var(--cream-dim);font-size:11.5px;margin-top:2px}
.municipality-empty{padding:12px;color:var(--cream-dim);font-size:12px;text-align:center}
.geo-market-note{display:block;margin-top:5px;color:var(--brand-purple);font-weight:700}

@media(max-width:680px){
  .topbar{align-items:flex-start}
  .city-control{width:100%;justify-content:space-between}
  .city-control .city-select{flex:1;max-width:none}
  .section-question{margin-top:10px}
  .city-welcome-options{grid-template-columns:1fr}
  .filter-summary{justify-content:flex-start}
}
@media(min-width:900px){
  .section-question{max-width:960px;font-size:12px;margin-top:4px}
  .city-control label{font-size:11px}
  .city-control .city-select{min-width:135px;max-width:190px}
  .filter-summary{max-width:960px;margin-top:8px;font-size:11.5px}
  .smart-empty{margin-top:22px;padding:20px}
}
/* v3.5 JS class aliases */
.filter-summary .filter-summary-text{background:var(--night-2);border:1px solid var(--card-line);border-radius:999px;padding:6px 10px;color:var(--cream-dim)}
.filter-summary .filter-summary-clear{min-height:34px;border:0;background:transparent;color:var(--brand-purple);font-weight:800;cursor:pointer;padding:4px 8px;text-decoration:underline;text-underline-offset:3px}
.smart-empty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:16px}
.smart-empty-actions .btn{min-height:42px}
.municipality-status{padding:12px;color:var(--cream-dim);font-size:12px;text-align:center}
.smart-empty{grid-column:1/-1;width:100%}

/* v3.5.1: polished app bar. The controls keep the same behaviour, but read as
   a compact navigation surface instead of a row of form fields. */
.topbar{
  border-bottom:1px solid color-mix(in srgb,var(--card-line) 55%,transparent);
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}
.city-control,.theme-control,.auth-area{
  background:var(--night-2);
  border:1px solid color-mix(in srgb,var(--card-line) 78%,transparent);
  border-radius:999px;
}
.city-control{
  gap:6px;
  padding:4px 6px 4px 12px;
}
.city-control label{
  color:var(--cream-dim);
  letter-spacing:.01em;
}
.city-control .city-select,
.theme-control select{
  min-height:36px;
  border:0 !important;
  background:transparent !important;
  color:var(--cream);
  box-shadow:none !important;
  padding:6px 28px 6px 8px;
}
.city-control .city-select:hover,
.theme-control select:hover{
  color:var(--brand-purple);
}
.theme-control{
  padding:4px 6px 4px 11px;
  gap:5px;
}
.theme-control label{
  color:var(--cream-dim);
  font-weight:750;
}
.auth-area{
  min-height:44px;
  padding:3px 5px;
  gap:2px;
}
.auth-area .auth-sep{display:none}
.auth-link{
  min-height:36px;
  border-radius:999px;
  padding:7px 10px;
  color:var(--cream-dim);
  transition:background .16s ease,color .16s ease;
}
.auth-link:hover{
  background:var(--card);
  color:var(--cream);
}
.auth-link.primary{
  background:var(--soft-brand);
  color:var(--brand-purple);
}
.auth-link.primary:hover{
  background:var(--card);
  color:var(--brand-purple);
}
.auth-user{
  max-width:125px;
  padding:0 8px;
  color:var(--cream-dim);
}
.lang-btn{
  width:44px;
  min-width:44px;
  padding:0;
  border-radius:999px;
  background:var(--night-2);
  border-color:color-mix(in srgb,var(--card-line) 78%,transparent);
  color:var(--cream);
}
.lang-btn:hover{
  background:var(--soft-brand);
  color:var(--brand-purple);
}

@media(min-width:900px){
  .topbar{
    padding-top:9px;
    padding-bottom:9px;
  }
  .city-control,.theme-control,.auth-area{min-height:42px}
  .city-control .city-select{min-width:122px;max-width:172px}
  .theme-control select{max-width:168px}
}

@media(max-width:680px){
  .topbar{gap:8px;padding:9px 12px}
  .city-control{
    width:100%;
    min-height:46px;
    padding-left:13px;
  }
  .city-control .city-select{min-width:0;max-width:none;flex:1}
  .topbar-right{
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
  }
  .theme-control{
    order:1;
    width:100%;
    min-width:0;
  }
  .theme-control label{display:none}
  .theme-control select{max-width:none;min-width:0;width:100%;flex:1}
  .lang-btn{order:2}
  .auth-area{
    order:3;
    grid-column:1/-1;
    width:100%;
    justify-content:center;
    border-radius:14px;
    padding:4px;
  }
  .auth-user{max-width:42vw}
}
