/* The app (redesign): the Map tab's home, the pill tab bar, search. Native app only:
   everything is scoped to .is-home or .app-tabs, so the website is unchanged. */
@font-face{font-family:'Archivo';src:url(fonts/archivo.woff2) format('woff2');font-weight:100 900;font-stretch:62% 125%;font-display:swap}
:root{--glass:#fffdf9d9;--glass-strong:#fffdf9f0;--shadow-soft:0 2px 14px #3a2a1a1f;--display:'Archivo',var(--sans,system-ui),sans-serif}

/* ---- the pill tab bar ---- */
.bottom-nav.app-tabs{position:fixed;left:50%;bottom:calc(14px + env(safe-area-inset-bottom));transform:translateX(-50%);width:min(300px,calc(100% - 40px));height:66px;padding:5px;border:0;border-radius:999px;background:var(--glass);backdrop-filter:blur(22px) saturate(1.6);-webkit-backdrop-filter:blur(22px) saturate(1.6);box-shadow:0 8px 30px #3a2a1a2a,inset 0 0 0 .5px #ffffffcc;display:flex;gap:2px;z-index:60}
.bottom-nav.app-tabs a{flex:1;border-radius:999px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:600 12px var(--sans,system-ui);color:#9b8f86;text-decoration:none;position:relative;min-width:0}
.bottom-nav.app-tabs a .icon{width:22px;height:22px}
.bottom-nav.app-tabs a.active{background:#fff;color:var(--orange);box-shadow:0 2px 10px #3a2a1a1a}
.bottom-nav.app-tabs a.active:after,.bottom-nav.app-tabs a.active:before{display:none}
.bottom-nav.app-tabs .tab-dot{position:absolute;top:10px;right:calc(50% - 18px);width:8px;height:8px;border-radius:50%;background:var(--orange)}

/* ---- the home: the map fills the screen ---- */
.map-workspace.is-home{position:fixed;inset:0;display:block;padding:0;margin:0;max-width:none;width:auto;height:auto;z-index:1;background:#efe6d8}
.is-home .map-split{position:absolute;inset:0;display:block;height:auto;margin:0;padding:0}
.is-home .map-pane{position:absolute;inset:0;border:0;border-radius:0;height:auto;min-height:0}
.is-home #cart-map{position:absolute;inset:0;height:auto;border-radius:0}
.is-home .hm-fade{position:absolute;top:0;left:0;right:0;height:calc(150px + env(safe-area-inset-top));background:linear-gradient(#faf7f2f0 35%,#faf7f200);z-index:20;pointer-events:none}
.is-home .hm-top{position:absolute;top:calc(8px + env(safe-area-inset-top));left:0;right:0;height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;z-index:30;pointer-events:none}
.is-home .hm-top>*{pointer-events:auto}
.hm-round{width:46px;height:46px;border-radius:50%;border:0;padding:0;display:grid;place-items:center;color:var(--ink);background:var(--glass);backdrop-filter:blur(14px) saturate(1.4);-webkit-backdrop-filter:blur(14px) saturate(1.4);box-shadow:var(--shadow-soft),inset 0 0 0 .5px #ffffffaa;cursor:pointer}
.hm-round .icon{width:21px;height:21px}
.hm-round:active{transform:scale(.94)}
.is-home .hm-logo{height:38px;width:auto}
.is-home .hm-chips{position:absolute;top:calc(70px + env(safe-area-inset-top));left:0;right:0;display:flex;gap:8px;overflow-x:auto;padding:4px 16px 10px;z-index:30;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.is-home .hm-chips::-webkit-scrollbar{display:none}
.hm-chip{flex:none;height:42px;border-radius:999px;padding:0 15px 0 11px;display:flex;align-items:center;gap:7px;font:600 15px var(--sans,system-ui);color:var(--ink);border:0;background:var(--glass);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 2px 10px #3a2a1a14,inset 0 0 0 .5px #ffffffaa;cursor:pointer;white-space:nowrap}
.hm-chip img{width:26px;height:26px}
.hm-chip .icon{width:18px;height:18px}
.hm-chip b{min-width:20px;height:20px;border-radius:999px;background:#fff;color:var(--orange);font-size:12px;display:grid;place-items:center;padding:0 5px}
.hm-chip.is-on{background:var(--orange);color:#fff;box-shadow:0 3px 12px #ba4b2a55}
.is-home .hm-here{position:absolute;top:calc(128px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);height:42px;padding:0 20px;border:0;border-radius:999px;background:var(--glass-strong);box-shadow:0 3px 14px #3a2a1a22;font:700 14.5px var(--sans,system-ui);color:var(--orange);z-index:31}
.is-home .hm-here[hidden]{display:none}
/* the right-hand buttons and the trail pill float above the cards */
.is-home .hm-side{position:absolute;left:16px;right:16px;bottom:calc(392px + env(safe-area-inset-bottom));display:flex;justify-content:space-between;align-items:center;z-index:30;pointer-events:none;transition:bottom .45s cubic-bezier(.2,.9,.25,1)}
.is-home .hm-side>*{pointer-events:auto}
.is-home .hm-locate{margin-left:auto;background:var(--orange);color:#fff;width:52px;height:52px;box-shadow:0 6px 18px #ba4b2a55}
.hm-trailpill{height:46px;border-radius:999px;border:0;padding:0 18px 0 14px;display:flex;align-items:center;gap:8px;background:var(--ink);color:#fff;font:700 15px var(--sans,system-ui);box-shadow:0 6px 18px #2f262255}
.hm-trailpill .icon{width:18px;height:18px}
/* ---- the cards ---- */
.is-home .hm-cards{position:absolute;left:0;right:0;bottom:calc(92px + env(safe-area-inset-bottom));height:290px;display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 calc(50% - 149px);z-index:30;scrollbar-width:none;transition:transform .45s cubic-bezier(.2,.9,.25,1),opacity .3s}
.is-home .hm-cards::-webkit-scrollbar{display:none}
.hm-card{flex:none;width:298px;height:282px;scroll-snap-align:center;position:relative;background:var(--glass);backdrop-filter:blur(18px) saturate(1.4);-webkit-backdrop-filter:blur(18px) saturate(1.4);border-radius:30px;box-shadow:0 10px 30px #3a2a1a2e,inset 0 0 0 .5px #ffffffcc;padding:11px;display:flex;flex-direction:column;transition:transform .3s}
.hm-card:not(.is-selected){transform:scale(.96)}
.hm-card-photo{position:relative;display:block;height:186px;border-radius:21px;overflow:hidden;background:var(--peach)}
.hm-card-photo img{width:100%;height:100%;object-fit:cover;display:block}
.hm-ribbon{position:absolute;left:10px;bottom:10px;background:var(--orange);color:#fff;font:700 12px var(--sans,system-ui);padding:6px 10px;border-radius:999px;display:flex;gap:5px;align-items:center;box-shadow:0 3px 10px #ba4b2a55;max-width:calc(100% - 20px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-ribbon .icon{width:14px;height:14px;flex:none}
.hm-fav,.hm-add{position:absolute;top:21px;width:40px;height:40px;border-radius:50%;border:0;display:grid;place-items:center;background:#fffdf9e6;color:var(--ink);box-shadow:0 2px 8px #0002;z-index:2}
.hm-fav{left:21px}.hm-add{right:21px}
.hm-fav .icon,.hm-add .icon{width:20px;height:20px}
.hm-fav.is-on{color:#fff;background:var(--orange)}.hm-fav.is-on .icon{fill:currentColor}
.hm-add.is-on{color:#fff;background:var(--ink)}
.hm-card-body{display:block;padding:10px 6px 0;color:var(--ink);text-decoration:none;min-width:0}
.hm-card-name{display:block;font-family:var(--display);font-weight:800;font-stretch:92%;font-size:20px;letter-spacing:-.01em;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-card-meta{display:flex;align-items:center;gap:10px;margin-top:5px;font-size:14px;min-width:0}
.hm-status{font-weight:700;white-space:nowrap}
.hm-status.open{color:var(--green)}.hm-status.closed,.hm-status.soldout{color:var(--muted)}
.hm-dist{display:flex;align-items:center;gap:3px;color:#3f7fbf;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.hm-dist .icon{width:13px;height:13px;flex:none}
.hm-icons{margin-left:auto;display:flex;gap:2px;flex:none}.hm-icons img{width:24px;height:24px}
/* ---- hiding the cards ---- */
.is-home .hm-handle{position:absolute;left:50%;bottom:calc(388px + env(safe-area-inset-bottom));transform:translateX(-50%);width:64px;height:24px;border:0;border-radius:999px;background:var(--glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 2px 10px #3a2a1a22;z-index:31;display:grid;place-items:center;transition:bottom .45s cubic-bezier(.2,.9,.25,1),opacity .3s}
.is-home .hm-handle i{width:30px;height:4px;border-radius:2px;background:#b9ab9c}
.is-home .hm-show{position:absolute;left:50%;bottom:calc(98px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(20px);opacity:0;pointer-events:none;height:46px;padding:0 22px;border:0;border-radius:999px;background:var(--glass-strong);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 3px 14px #3a2a1a22;font:700 15px var(--sans,system-ui);color:var(--ink);z-index:31;transition:transform .35s,opacity .3s}
.is-home.is-cards-hidden .hm-cards{transform:translateY(130%);opacity:0;pointer-events:none}
.is-home.is-cards-hidden .hm-handle{opacity:0;pointer-events:none}
.is-home.is-cards-hidden .hm-show{transform:translateX(-50%);opacity:1;pointer-events:auto}
.is-home.is-cards-hidden .hm-side{bottom:calc(156px + env(safe-area-inset-bottom))}
/* the app's own map controls stay out of the home's way */
.is-home .map-zoom,.is-home .map-controls,.is-home .map-count,.is-home .map-switch,.is-home .map-sheet{display:none}
.is-home .maplibregl-ctrl-top-right{top:auto;bottom:calc(400px + env(safe-area-inset-bottom));right:auto;left:12px;z-index:29;transition:bottom .45s cubic-bezier(.2,.9,.25,1)}
.is-home.is-cards-hidden .maplibregl-ctrl-top-right{bottom:calc(156px + env(safe-area-inset-bottom))}
.is-home .maplibregl-ctrl-attrib.maplibregl-compact{min-height:24px;background:#fffdf9d9;border-radius:999px;margin:0;font-size:11px;color:#6b564a}
.is-home .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show){width:24px;padding:0}
.is-home .maplibregl-ctrl-attrib.maplibregl-compact-show{padding:5px 30px 5px 12px;max-width:calc(100vw - 40px);border-radius:14px}
.is-home .maplibregl-compact-show .maplibregl-ctrl-attrib-inner{white-space:normal}
.is-home .maplibregl-ctrl-attrib-button{border-radius:50%}
.is-home .maplibregl-ctrl-attrib a{color:inherit}
/* ---- list view ---- */
.is-home .cart-map-results{display:none}
.map-workspace.is-home.is-list .cart-map-results{display:block;position:absolute;inset:0;z-index:25;overflow-y:auto;background:var(--paper);padding:calc(128px + env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom));border:0;max-height:none;height:auto}
.map-workspace.is-home.is-list .map-pane{display:block}   /* the header lives in the pane; the list covers the map */
.is-home.is-list #cart-map{visibility:hidden}
.is-home.is-list .hm-fade{z-index:26}.is-home.is-list .hm-top{z-index:27}
.is-home.is-list .hm-cards,.is-home.is-list .hm-handle,.is-home.is-list .hm-show,.is-home.is-list .hm-side,.is-home.is-list .hm-here{display:none}
.is-home.is-list .hm-fade{background:linear-gradient(var(--paper) 70%,#faf7f200)}
.hm-list-head h2{font-family:var(--display);font-weight:800;font-stretch:92%;font-size:22px;letter-spacing:-.01em;margin:4px 2px 12px}
.hm-list{display:flex;flex-direction:column;gap:14px}
.hm-list .hm-card{width:auto;height:auto;transform:none}
.hm-list .hm-card-photo{height:190px}
.hm-list-sub{font:700 13px var(--sans,system-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:26px 2px 12px}
.hm-list .cart-map-empty{background:var(--white);border-radius:24px;padding:20px}
/* ---- search, full screen ---- */
.is-home .hm-search{position:fixed;inset:0;z-index:70;background:var(--paper);padding:calc(14px + env(safe-area-inset-top)) 16px 20px;overflow-y:auto;animation:hm-in .22s ease-out}
.is-home .hm-search[hidden]{display:none}
.hm-town{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--white);font:700 15px var(--sans,system-ui);color:var(--ink)}
.hm-town .icon{width:16px;height:16px;color:var(--orange)}
.hm-search-row{display:flex;align-items:center;gap:12px;margin-top:12px}
.hm-search-row .map-search{position:relative;flex:1;display:flex;align-items:center;gap:8px;height:50px;border-radius:999px;background:var(--white);border:1px solid var(--line);padding:0 16px;box-shadow:none}
.hm-search-row .map-search input{flex:1;min-width:0;border:0;background:none;font-size:17px;outline:0;padding:0}
.hm-search-row .map-suggest{position:absolute;top:56px;left:0;right:0}
.hm-cancel{border:0;background:none;color:var(--orange);font:600 16px var(--sans,system-ui);padding:8px 2px}
.hm-recent{margin-top:22px}
.hm-recent-head{display:flex;justify-content:space-between;align-items:center}
.hm-recent-head h2{font:700 13px var(--sans,system-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0}
.hm-recent ul{list-style:none;margin:6px 0 0;padding:0}
.hm-recent li{display:flex;align-items:center;border-bottom:1px solid var(--line)}
.hm-recent-q{flex:1;display:flex;align-items:center;gap:10px;text-align:left;border:0;background:none;padding:15px 0;font:600 17px var(--sans,system-ui);color:var(--ink)}
.hm-recent-q .icon{width:17px;height:17px;color:var(--muted)}
.hm-recent-none{color:var(--muted);margin-top:10px}
.is-searching .hm-search~*{visibility:hidden}
@keyframes hm-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.is-home *{transition:none!important;animation:none!important}}
/* the tab bar hides while searching */
html:has(.is-searching) .bottom-nav.app-tabs{display:none}
/* short phones: smaller cards */
@media (max-height:700px){.is-home .hm-cards{height:236px}.hm-card{height:228px}.hm-card-photo{height:136px}.is-home .hm-handle{bottom:calc(334px + env(safe-area-inset-bottom))}.is-home .hm-side{bottom:calc(338px + env(safe-area-inset-bottom))}}
@media (max-width:340px){.hm-card{width:264px}.is-home .hm-cards{padding:0 calc(50% - 132px)}}

/* ---- filters and the trail: bottom sheets over the map (the tab bar steps aside) ---- */
html:has(.is-home.has-filters) .bottom-nav.app-tabs,html:has(.is-home.has-trail) .bottom-nav.app-tabs{display:none}
.is-home.has-filters:after,.is-home.has-trail:after{content:'';position:fixed;inset:0;background:#2f201b59;z-index:64;animation:home-in .2s}
.is-home .map-panel{position:fixed;top:auto;left:0;right:0;bottom:0;max-height:88dvh;z-index:65;border-radius:28px 28px 0 0;background:var(--paper);box-shadow:0 -10px 40px #2f201b26;padding-bottom:env(safe-area-inset-bottom);animation:sheet-up .38s cubic-bezier(.2,.9,.3,1)}
.is-home .map-panel-head{position:relative;border:0;background:none;padding:22px 18px 8px}
.is-home .map-panel-head:before{content:'';position:absolute;top:8px;left:50%;width:40px;height:5px;margin-left:-20px;border-radius:3px;background:var(--line)}
.is-home .map-panel-head h2{font-family:var(--display);font-weight:800;font-stretch:90%;font-size:26px;letter-spacing:-.015em}
.is-home .map-panel-body{padding:6px 18px 18px;gap:14px}
.is-home .map-panel-foot{background:var(--paper);border-top:1px solid var(--line);padding:12px 18px}
.is-home .map-panel-foot .btn-primary{flex:1}
/* the filter lists: rows with the category art */
.is-home .map-panel .check{display:flex;align-items:center;gap:12px;min-height:50px;font-size:16px;border-radius:14px}
.is-home .map-panel .check input{width:22px;height:22px;accent-color:var(--orange);flex:none}
.is-home .map-panel .map-art{width:30px;height:30px;flex:none}
.is-home .map-panel .map-menu-type{padding-left:34px!important;font-size:15px!important;min-height:44px}
.is-home .map-panel .map-menu-type .map-art{width:24px;height:24px}
.is-home .map-panel details,.is-home .map-panel fieldset,.is-home .map-panel .map-filter-group{border:0;border-radius:20px;background:var(--white);box-shadow:0 2px 12px #3a2a1a10}
.is-home .map-panel .map-menu-filter{height:44px;border-radius:999px;border:1.5px solid var(--line);padding:0 16px;font-size:15px;margin:4px 0 6px}
/* the trail: stops as cards */
.is-home .map-trail .map-stop{border:0;border-radius:20px;background:var(--white);box-shadow:0 2px 12px #3a2a1a10;padding:10px 12px}
.is-home .map-trail .btn{min-height:46px}

/* search: scan a shop's QR sign (the app's camera scanner) */
.hm-scan{display:flex;align-items:center;gap:14px;width:100%;margin-top:14px;padding:14px 16px;border:0;border-radius:20px;background:var(--white);box-shadow:0 2px 12px #3a2a1a12;text-align:left;color:var(--ink)}
.hm-scan .icon{width:26px;height:26px;color:var(--orange);flex:none}
.hm-scan span{display:flex;flex-direction:column;gap:2px}.hm-scan b{font-size:16px}.hm-scan small{color:var(--muted);font-size:13.5px}
