:root{
  --bg:#f7f1e9;
  --paper:#fff;
  --text:#2b211c;
  --muted:#796c63;
  --coffee:#2d190f;
  --green:#17492a;
  --green-soft:#e7f1e9;
  --chip:#efe6dd;
  --line:#e8ddd3;
  --danger:#a84535;
  --shadow:0 14px 38px rgba(55,34,22,.09);
  --shadow-soft:0 8px 24px rgba(55,34,22,.07);
}

*{box-sizing:border-box}
html,body{
  margin:0;
  min-height:100%;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}
body{overflow-x:hidden}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
button,select{cursor:pointer}
button:disabled{cursor:wait;opacity:.65}
img{max-width:100%}
.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.topbar{
  height:68px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:18px;
  padding:0 28px;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:40;
  backdrop-filter:blur(12px);
}
.brand{
  font-family:Georgia,serif;
  font-size:25px;
  font-weight:700;
  color:var(--coffee);
}
.nav{display:flex;gap:28px;font-size:14px}
.nav a{
  padding:23px 0 20px;
  border-bottom:3px solid transparent;
}
.nav a.active{
  color:var(--green);
  border-color:var(--green);
}
.topbar-actions{
  justify-self:end;
  display:flex;
  align-items:center;
  gap:10px;
}
.map-link{
  background:var(--green);
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  font-weight:750;
  font-size:14px;
}

main{
  max-width:1280px;
  margin:0 auto;
  padding:42px 24px 90px;
}
.intro{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:28px;
  margin-bottom:28px;
}
.eyebrow,.filter-eyebrow{
  text-transform:uppercase;
  letter-spacing:.14em;
  font-weight:850;
  font-size:11px;
  color:var(--green);
  margin-bottom:10px;
}
.intro h1{
  font-family:Georgia,serif;
  font-size:48px;
  line-height:1.04;
  margin:0;
  color:var(--coffee);
  letter-spacing:-.8px;
}
.intro p{
  max-width:760px;
  font-size:17px;
  line-height:1.55;
  color:var(--muted);
  margin:13px 0 0;
}
.counter{
  flex:0 0 auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 14px;
  font-size:13px;
  color:var(--muted);
}

.discovery-panel{
  display:grid;
  gap:12px;
  padding:15px;
  margin-bottom:18px;
  background:rgba(255,255,255,.7);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow-soft);
}
.search-box{
  height:54px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:15px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 13px;
}
.search-icon{
  font-size:22px;
  color:var(--muted);
}
.search-box input{
  border:0;
  outline:0;
  background:transparent;
  width:100%;
  min-width:0;
  font-size:15px;
  color:var(--text);
}
.clear-search{
  width:32px;
  height:32px;
  border:0;
  border-radius:50%;
  background:#f3ece6;
  color:var(--muted);
  font-size:22px;
  line-height:1;
}

.quick-controls{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.quick-chip,.filter-btn,.select-wrap select{
  min-height:40px;
  border:1px solid var(--line);
  background:#fff;
  color:#51443c;
  border-radius:999px;
  padding:8px 13px;
  white-space:nowrap;
}
.quick-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-weight:700;
}
.quick-chip .dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#8f8279;
}
.quick-chip.active{
  border-color:var(--green);
  background:var(--green);
  color:#fff;
}
.quick-chip.active .dot{background:#7be09d}
.select-wrap{
  position:relative;
  display:inline-flex;
}
.select-wrap select{
  appearance:none;
  padding-right:34px;
  outline:0;
}
.select-wrap::after{
  content:"⌄";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-55%);
  pointer-events:none;
  color:var(--muted);
}
.filter-btn{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-weight:800;
}
.filter-count{
  min-width:20px;
  height:20px;
  display:inline-grid;
  place-items:center;
  border-radius:999px;
  padding:0 5px;
  background:var(--green);
  color:#fff;
  font-size:11px;
}
.location-status{
  font-size:12px;
  color:var(--muted);
  padding:0 3px;
}

.results-toolbar{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:0 2px 16px;
}
.results-label{
  font-weight:800;
  color:var(--coffee);
}
.sort-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:13px;
}
.sort-wrap select{
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  color:var(--text);
  padding:8px 32px 8px 10px;
  outline:0;
}

.cafes-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  transition:opacity .15s ease;
}
.cafes-grid.is-loading{opacity:.45}
.cafe-card{
  min-width:0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:.16s transform,.16s box-shadow;
}
.cafe-card:hover{
  transform:translateY(-3px);
  box-shadow:0 20px 46px rgba(55,34,22,.13);
}
.photo-wrap{
  aspect-ratio:16/10;
  background:linear-gradient(135deg,#9b7b64,#dfcdbf);
  position:relative;
  overflow:hidden;
}
.photo-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.photo-fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:#fff;
  font-size:42px;
}
.photo-top-left{
  position:absolute;
  left:11px;
  top:11px;
  display:flex;
  align-items:flex-start;
  gap:6px;
  flex-wrap:wrap;
  max-width:72%;
}
.featured-badge,.open-badge{
  border-radius:999px;
  padding:6px 9px;
  font-size:10px;
  font-weight:850;
  box-shadow:0 4px 14px rgba(0,0,0,.09);
  backdrop-filter:blur(7px);
}
.featured-badge{
  background:rgba(255,255,255,.92);
  color:var(--green);
}
.open-badge.open{
  background:rgba(23,73,42,.93);
  color:#fff;
}
.open-badge.closed{
  background:rgba(255,255,255,.9);
  color:#735f52;
}
.card-engagement{
  position:absolute;
  right:10px;
  top:10px;
  display:flex;
  gap:6px;
}
.engagement-btn{
  min-width:38px;
  height:36px;
  border:1px solid rgba(255,255,255,.62);
  border-radius:999px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  background:rgba(255,255,255,.9);
  color:#55473f;
  box-shadow:0 4px 14px rgba(0,0,0,.09);
  backdrop-filter:blur(8px);
  font-weight:850;
}
.like-btn.active{color:#a6352f}
.favorite-btn.active{color:#b17a12}

.card-body{padding:16px 17px 17px}
.card-kicker{
  min-height:22px;
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
}
.dot-separator{opacity:.55}
.distance-pill{
  margin-left:auto;
  background:var(--green-soft);
  color:var(--green);
  font-weight:850;
  padding:4px 7px;
  border-radius:999px;
  font-size:10px;
}
.cafe-card h2{
  font-family:Georgia,serif;
  font-size:25px;
  line-height:1.12;
  margin:5px 0 0;
  color:var(--coffee);
}
.desc{
  margin:9px 0 0;
  color:#62544b;
  font-size:14px;
  line-height:1.48;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  min-height:42px;
}
.metrics{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:11px;
  min-height:18px;
  font-size:11px;
  font-weight:750;
}
.rating{color:#7b5c19}
.popular{color:#8f4c27}
.badges{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:11px;
}
.badge{
  background:var(--chip);
  padding:5px 8px;
  border-radius:999px;
  font-size:10px;
  color:#58483e;
}
.card-footer{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid #f0e8e0;
}
.address{
  min-width:0;
  max-width:55%;
  font-size:11px;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.card-links{
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
  font-size:12px;
  font-weight:800;
}
.map-card-link{color:#65574e}
.details-link{color:var(--green)}

.loading-state,.empty-state,.load-error{
  text-align:center;
  padding:66px 20px;
  color:var(--muted);
}
.loading-state{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.spinner{
  width:22px;
  height:22px;
  border-radius:50%;
  border:2px solid #dccfc4;
  border-top-color:var(--green);
  animation:spin .75s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.empty-icon{font-size:46px}
.empty-state h2,.load-error h2{
  color:var(--coffee);
  margin:10px 0 5px;
}
.empty-state p,.load-error p{margin:0 0 16px}
.reset-btn,.apply-btn{
  min-height:42px;
  border-radius:12px;
  padding:9px 14px;
  font-weight:800;
}
.reset-btn{
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
}
.apply-btn{
  border:1px solid var(--green);
  background:var(--green);
  color:#fff;
}

.filter-backdrop{
  position:fixed;
  inset:0;
  z-index:60;
  background:rgba(32,23,18,.34);
  opacity:0;
  transition:opacity .18s ease;
}
.filter-backdrop.show{opacity:1}
.filter-panel{
  position:fixed;
  z-index:70;
  top:76px;
  right:max(18px,calc((100vw - 1280px)/2 + 24px));
  width:min(460px,calc(100vw - 36px));
  max-height:calc(100vh - 94px);
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:0 24px 80px rgba(44,29,19,.23);
  transform:translateY(-8px) scale(.985);
  opacity:0;
  pointer-events:none;
  transition:.18s ease;
}
.filter-panel.open{
  transform:none;
  opacity:1;
  pointer-events:auto;
}
.filter-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:20px 20px 14px;
  border-bottom:1px solid var(--line);
}
.filter-panel-head h2{
  font-family:Georgia,serif;
  margin:0;
  font-size:28px;
  color:var(--coffee);
}
.filter-eyebrow{margin-bottom:4px}
.close-filter{
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:#f3ece6;
  font-size:24px;
  color:var(--muted);
}
.filter-panel-scroll{
  overflow:auto;
  padding:2px 20px 20px;
}
.filter-section{
  padding:18px 0 0;
}
.filter-section h3,.feature-group h4{
  margin:0 0 10px;
  color:var(--coffee);
}
.filter-section h3{font-size:15px}
.feature-group{
  padding:14px 0;
  border-top:1px solid #f0e8e0;
}
.feature-group:first-child{border-top:0}
.feature-group h4{
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
}
.check-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.check-option{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  font-size:12px;
  cursor:pointer;
}
.check-option:has(input:checked){
  border-color:#afc9b6;
  background:#eef6f0;
  color:var(--green);
}
.check-option input{
  accent-color:var(--green);
  margin:0;
}
.filter-panel-footer{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:14px 20px 20px;
  border-top:1px solid var(--line);
  background:#fff;
  border-radius:0 0 22px 22px;
}
.filters-open{overflow:hidden}

@media(max-width:980px){
  .topbar{
    grid-template-columns:1fr auto;
    padding:0 18px;
  }
  .nav{display:none}
  .cafes-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .intro h1{font-size:40px}
}

@media(max-width:720px){
  .topbar{
    height:58px;
    padding:0 10px;
    gap:8px;
  }
  .brand{font-size:21px}
  .map-link{
    padding:8px 10px;
    font-size:12px;
  }
  .topbar-actions{gap:5px}

  main{
    padding:24px 10px calc(82px + env(safe-area-inset-bottom));
  }
  .intro{
    display:block;
    margin-bottom:18px;
  }
  .intro h1{
    font-size:34px;
    letter-spacing:-.4px;
  }
  .intro p{
    font-size:14px;
    margin-top:9px;
  }
  .counter{
    display:inline-block;
    margin-top:13px;
  }

  .discovery-panel{
    padding:10px;
    border-radius:18px;
    gap:10px;
  }
  .search-box{
    height:50px;
    border-radius:13px;
  }
  .quick-controls{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }
  .quick-chip,.filter-btn,.select-wrap select{
    width:100%;
    min-width:0;
    min-height:39px;
    justify-content:center;
    padding:7px 8px;
    font-size:12px;
  }
  .type-select-wrap{width:100%}
  .type-select-wrap select{text-align:center}
  .filter-btn{justify-content:center}

  .results-toolbar{
    align-items:flex-end;
    margin:0 2px 12px;
  }
  .sort-wrap{
    display:grid;
    gap:3px;
    justify-items:end;
  }
  .sort-wrap>span{font-size:10px}
  .sort-wrap select{
    max-width:155px;
    font-size:12px;
    padding:7px 25px 7px 8px;
  }

  .cafes-grid{
    grid-template-columns:1fr;
    gap:12px;
  }
  .cafe-card{
    border-radius:18px;
  }
  .cafe-card:hover{
    transform:none;
    box-shadow:var(--shadow);
  }
  .photo-wrap{aspect-ratio:16/9}
  .card-body{padding:13px 14px 14px}
  .cafe-card h2{font-size:23px}
  .desc{
    min-height:0;
    -webkit-line-clamp:2;
  }
  .card-footer{
    align-items:center;
  }
  .address{max-width:48%}
  .card-links{gap:8px;font-size:11px}

  .filter-panel{
    top:auto;
    right:0;
    left:0;
    bottom:0;
    width:100%;
    max-height:min(84vh,720px);
    border-radius:22px 22px 0 0;
    border-left:0;
    border-right:0;
    border-bottom:0;
    transform:translateY(100%);
    opacity:1;
  }
  .filter-panel.open{transform:none}
  .filter-panel-footer{
    padding-bottom:calc(14px + env(safe-area-inset-bottom));
    border-radius:0;
  }
  .check-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:390px){
  .quick-controls{
    grid-template-columns:1fr 1fr;
  }
  .photo-top-left{
    max-width:65%;
  }
  .featured-badge,.open-badge{
    padding:5px 7px;
    font-size:9px;
  }
  .engagement-btn{
    height:34px;
    min-width:36px;
    padding:0 8px;
  }
}


/* QUICK_FILTER_CUSTOMIZATION_V1 */
.quick-filter-items{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.customize-quick-btn{
  min-height:40px;
  border:1px dashed #cbbdaf;
  background:rgba(255,255,255,.6);
  color:#6e5d52;
  border-radius:999px;
  padding:8px 13px;
  font-weight:750;
  white-space:nowrap;
}
.customize-quick-btn:hover{
  background:#fff;
  border-color:#a99a8d;
}
.quick-setup-section{
  padding-top:12px;
}
.filter-section-title-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
}
.filter-section-title-row p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
.text-btn{
  border:0;
  background:transparent;
  color:var(--green);
  padding:2px 0;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.quick-setup-grid{
  display:grid;
  gap:14px;
  margin-top:12px;
}
.quick-setup-group{
  display:grid;
  gap:8px;
}
.quick-setup-group h4{
  margin:0;
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.quick-setup-options{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.quick-setup-option{
  position:relative;
  cursor:pointer;
}
.quick-setup-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.quick-setup-option span{
  display:inline-flex;
  min-height:34px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 10px;
  background:#fff;
  color:#5b4c42;
  font-size:11px;
  font-weight:700;
}
.quick-setup-option input:checked+span{
  border-color:#9fbba6;
  background:var(--green-soft);
  color:var(--green);
}
.quick-setup-option input:checked+span::before{
  content:"✓";
  margin-right:5px;
  font-weight:900;
}

@media(max-width:720px){
  .quick-controls{
    display:flex;
    align-items:center;
    gap:7px;
    overflow-x:auto;
    overflow-y:hidden;
    flex-wrap:nowrap;
    padding-bottom:2px;
    scrollbar-width:none;
  }
  .quick-controls::-webkit-scrollbar{display:none}
  .quick-filter-items{
    display:contents;
  }
  .quick-chip,
  .customize-quick-btn,
  .filter-btn,
  .type-select-wrap{
    flex:0 0 auto;
    width:auto;
  }
  .type-select-wrap select{
    width:auto;
    max-width:170px;
  }
  .filter-btn{
    width:auto;
  }
  .customize-quick-btn{
    min-height:39px;
    font-size:12px;
  }
  .quick-setup-options{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .quick-setup-option span{
    width:100%;
    justify-content:center;
    text-align:center;
  }
}
/* CAFES_LOADING_INDICATOR_FIX_V1 */
[hidden]{
  display:none!important;
}

/* Spinner exists only while a request is actually running. */
.loading-state[hidden]{
  display:none!important;
}
