:root{--o:#fc6704;--od:#c24400;--ink:#1b1f24;--mut:#5c6670;--line:#e4e7eb;--bg:#f6f5f2;--dark:#1a1a1a;--hd:56px;--dh:26px;--bb:0px;--sab:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}
html,body{margin:0;height:100%;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--ink);font-size:14px;background:var(--bg);overflow:hidden}
button{font:inherit;cursor:pointer;color:inherit}
[hidden]{display:none!important}
/* top bar */
#top{position:fixed;top:0;left:0;right:0;height:var(--hd);background:var(--dark);color:#fff;display:flex;align-items:center;gap:10px;padding:0 12px;z-index:1300}
.brand img{height:40px;width:auto;display:block;background:#fff;border-radius:6px;padding:2px}
.ttl{display:flex;flex-direction:column;line-height:1.15;white-space:nowrap}
.ttl b{font-size:16px}.ttl span{font-size:11.5px;color:#c9cdd2}
.srch{flex:1;min-width:0;max-width:420px;margin-left:auto}
#q{width:100%;height:40px;padding:0 12px;border:0;border-radius:20px;font:inherit;font-size:16px;background:#fff;color:var(--ink)}
#q:focus{outline:3px solid var(--o)}
/* disclaimer */
.disc{position:fixed;top:var(--hd);left:0;right:0;min-height:var(--dh);z-index:1250;background:#fff8e1;border-bottom:1px solid #f3e1a5;color:#6b4f00;font-size:12px;padding:4px 12px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.disc .short{}
.disc button{background:none;border:0;padding:0 2px;color:var(--od);font-weight:700;text-decoration:underline;font-size:12px}
.disc.open{white-space:normal;box-shadow:0 4px 12px rgba(0,0,0,.15)}
.disc .full{margin-top:4px}
/* layout */
#app{position:absolute;top:calc(var(--hd) + var(--dh));left:0;right:0;bottom:var(--bb);display:flex}
#map{flex:1;height:100%;background:#dfe6ea}
#side{width:380px;min-width:380px;background:#fff;box-shadow:2px 0 10px rgba(0,0,0,.08);display:flex;flex-direction:column;z-index:1000}
.shead{display:flex;align-items:center;justify-content:space-between;padding:12px 16px 4px}
.shead b{font-size:15px}
.x{width:44px;height:44px;border:0;background:#f0f2f4;border-radius:22px;font-size:18px}
.fbody{padding:4px 16px 10px}
.fgroup{margin-top:8px}
.fgroup .lbl{font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:var(--mut);margin-bottom:5px;font-weight:700}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--o);background:#fff3e8;border-radius:18px;padding:5px 10px 5px 7px;cursor:pointer;user-select:none;font-size:13px;min-height:34px}
.chip.off{opacity:.45;background:#f3f4f6;border-color:var(--line)}
.chip .n{color:var(--mut);font-size:11px}
.toggle{display:flex;align-items:center;gap:8px;font-size:14px;margin-top:10px;cursor:pointer;min-height:36px}
.toggle input{width:20px;height:20px;accent-color:var(--o)}
.ffoot{display:flex;gap:8px;padding:0 16px 10px}
.btn{border-radius:24px;min-height:44px;padding:0 16px;font-weight:700;border:1.5px solid var(--dark);background:#fff}
.btn.pri{background:var(--dark);color:#fff;flex:1}
#fApply,#fClose{display:none}
#filters{border-bottom:1px solid var(--line)}
#sheet{display:flex;flex-direction:column;flex:1;min-height:0}
.grab{display:none}
#count{font-size:12px;color:var(--mut);padding:7px 16px;border-bottom:1px solid var(--line);background:var(--bg)}
#list{overflow-y:auto;flex:1;overscroll-behavior:contain}
.row{display:flex;gap:10px;padding:10px 16px;border-bottom:1px solid #eef0f3;cursor:pointer;align-items:flex-start}
.row:hover{background:#fff7f0}
.row .ic{flex:0 0 18px;margin-top:3px}
.row .t{flex:1;min-width:0}
.row .nm{font-weight:700;font-size:15px}
.row .m{color:var(--mut);font-size:12.5px;margin-top:2px}
.row .p{font-size:13px;font-weight:700;white-space:nowrap;text-align:right;max-width:90px}
.acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.acts a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border-radius:22px;font-size:14px;font-weight:700;text-decoration:none;border:1.5px solid var(--dark);color:var(--dark);background:#fff}
.acts a.dir{background:var(--o);border-color:var(--o);color:#1a1a1a}
.row.wrr-hl{background:#fff3e8;box-shadow:inset 4px 0 0 var(--o)}
/* card */
#card{position:fixed;z-index:1400;background:#fff;border-radius:16px;box-shadow:0 6px 28px rgba(0,0,0,.28);padding:14px 16px 12px;left:396px;bottom:24px;width:380px;max-height:calc(100% - 140px);overflow-y:auto;line-height:1.45}
#card .ty{font-size:11.5px;text-transform:uppercase;letter-spacing:.5px;color:var(--mut);font-weight:700;padding-right:44px}
#card h3{margin:2px 44px 2px 0;font-size:18px}
#card .x{position:absolute;top:8px;right:8px}
#card .pr{margin:6px 0;font-weight:700;font-size:15px}
#card .pr span{display:inline-block;width:11px;height:11px;border-radius:50%;margin-right:6px}
#card details{margin-top:8px;font-size:13px}
#card summary{cursor:pointer;font-weight:700;color:var(--od);min-height:36px;display:flex;align-items:center}
#card ul{margin:4px 0 6px;padding-left:18px}
#card .nt{font-size:13px;color:#8a4b00;margin:4px 0}
#card .src{font-size:11px;color:var(--mut);margin-top:6px}
/* legend */
#keyBtn{position:fixed;z-index:1100;right:10px;bottom:32px;height:36px;padding:0 14px;border-radius:18px;border:0;background:#fff;box-shadow:0 1px 6px rgba(0,0,0,.3);font-weight:700}
#legend{position:fixed;z-index:1100;right:10px;bottom:74px;background:#fff;padding:10px 12px;border-radius:10px;box-shadow:0 2px 10px rgba(0,0,0,.25);font-size:12.5px;line-height:1.55;max-height:60vh;overflow:auto}
#legend b{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--mut);margin:2px 0 3px}
#legend .it{display:flex;align-items:center;gap:6px}
/* bottom bar (desktop: only Near me floats on the map) */
#bbar{position:fixed;z-index:1100;left:392px;top:calc(var(--hd) + var(--dh) + 84px);display:flex;gap:8px}
#bbar button{display:none;align-items:center;gap:6px;border:0;background:#fff;border-radius:18px;height:36px;padding:0 14px;box-shadow:0 1px 6px rgba(0,0,0,.3);font-weight:700;position:relative}
#bbar #bNear{display:inline-flex}
#fDot{position:absolute;top:6px;right:calc(50% - 26px);width:9px;height:9px;border-radius:50%;background:var(--o)}
#toast{position:fixed;z-index:1600;left:50%;transform:translateX(-50%);bottom:110px;background:var(--dark);color:#fff;padding:10px 16px;border-radius:20px;font-size:14px;max-width:90vw;text-align:center}
.cmk{background:none;border:none}
.lbl-tt{background:rgba(255,255,255,.92);border:none;box-shadow:0 1px 3px rgba(0,0,0,.25);font-size:11px;padding:1px 5px;font-weight:600;color:#1d232b}
.lbl-tt:before{display:none}
.marker-cluster-small,.marker-cluster-medium,.marker-cluster-large{background:rgba(29,35,43,.18)}
.marker-cluster-small div,.marker-cluster-medium div,.marker-cluster-large div{background:rgba(29,35,43,.78);color:#fff;font-weight:600}
.wrr-ring{pointer-events:none}
.wrr-lbl{background:#1a1a1a;color:#fff;border:2px solid var(--o);border-radius:6px;font-weight:700;font-size:12px;padding:3px 7px;box-shadow:0 1px 4px rgba(0,0,0,.35)}
.wrr-lbl:before{display:none}
.sel-ring{pointer-events:none}
.me-dot{background:#1f6fd1;border:3px solid #fff;border-radius:50%;box-shadow:0 0 0 2px rgba(31,111,209,.35),0 1px 4px rgba(0,0,0,.4)}

/* ---------- phone / small tablet ---------- */
@media (max-width:767px){
 :root{--hd:52px;--bb:calc(64px + var(--sab))}
 #top{gap:8px;padding:0 8px}
 .brand img{height:36px}
 .ttl span{display:none}.ttl b{font-size:15px}
 #q{height:38px}
 .leaflet-control-zoom{display:none}
 #side{display:contents}
 /* filters: full-screen sheet */
 #filters{position:fixed;inset:0;z-index:1500;background:#fff;display:flex;flex-direction:column;transform:translateY(100%);transition:transform .25s;visibility:hidden}
 body.f-open #filters{transform:none;visibility:visible}
 .shead{padding:calc(10px + env(safe-area-inset-top,0px)) 16px 6px;border-bottom:1px solid var(--line)}
 .shead b{font-size:18px}
 .fbody{flex:1;overflow-y:auto;padding:8px 16px 16px}
 .chip{min-height:44px;font-size:14px;padding:6px 12px 6px 9px}
 .toggle{min-height:48px;font-size:15px}
 .ffoot{padding:10px 16px calc(10px + var(--sab));border-top:1px solid var(--line)}
 #fApply,#fClose{display:inline-flex;align-items:center;justify-content:center}
 .btn{min-height:50px;font-size:15px}
 /* list: bottom sheet */
 #sheet{position:fixed;left:0;right:0;bottom:var(--bb);z-index:1200;background:#fff;border-radius:16px 16px 0 0;box-shadow:0 -4px 20px rgba(0,0,0,.22);height:var(--sh,50vh);transform:translateY(calc(100% + var(--bb)));transition:transform .25s,height .2s;visibility:hidden}
 body[data-sheet=half] #sheet,body[data-sheet=full] #sheet{transform:none;visibility:visible}
 body[data-sheet=half] #sheet{--sh:52%}
 body[data-sheet=full] #sheet{--sh:calc(100% - var(--hd) - var(--dh) - var(--bb))}
 #sheet.drag{transition:none}
 .grab{display:flex;justify-content:center;align-items:center;height:28px;cursor:grab;touch-action:none;flex:0 0 auto}
 .grab .bar{width:44px;height:5px;border-radius:3px;background:#c9ced4}
 #count{touch-action:none;background:#fff;font-size:13px;padding:2px 16px 8px}
 .row{padding:12px 16px;min-height:64px}
 /* bottom bar */
 #bbar{left:0;right:0;bottom:0;top:auto;height:var(--bb);padding:6px 8px var(--sab);background:var(--dark);gap:6px;z-index:1450}
 #bbar button{display:flex;flex:1;flex-direction:column;justify-content:center;gap:1px;height:52px;border-radius:12px;background:transparent;color:#fff;box-shadow:none;font-size:13px}
 #bbar button span{font-size:19px;line-height:1}
 #bbar button.on{background:var(--o);color:#1a1a1a}
 /* card above bar */
 #card{left:8px;right:8px;width:auto;bottom:calc(var(--bb) + 8px);max-height:58%;z-index:1420}
 #keyBtn{right:10px;bottom:calc(var(--bb) + 28px)}
 #legend{right:10px;bottom:calc(var(--bb) + 70px)}
 body[data-sheet=half] #keyBtn,body[data-sheet=full] #keyBtn,body.card-open #keyBtn,body[data-sheet=half] #legend,body[data-sheet=full] #legend{display:none}
 #toast{bottom:calc(var(--bb) + 16px)}
 .leaflet-control-attribution{font-size:9px;max-width:70vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media (max-width:360px){.ttl{display:none}}
.disc{display:flex;flex-wrap:wrap;align-items:center;gap:0 6px;white-space:normal}
.disc .short{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.disc.open .short{white-space:normal}
.disc button{flex:0 0 auto;min-height:20px}
.disc .full{flex-basis:100%;padding-bottom:4px}
@media (min-width:768px){
 .chip{min-height:28px;padding:3px 9px 3px 6px;font-size:12.5px;gap:5px}
 .chips{gap:5px}
 .shead{padding:8px 16px 0}.fbody{padding:0 16px 6px}.toggle{min-height:30px;margin-top:6px}
 .ffoot{padding:0 16px 8px}.ffoot .btn{min-height:32px;font-size:13px}
 .row{padding:8px 16px}.acts{margin-top:6px}.acts a{min-height:36px;font-size:13px;padding:0 12px}
}
/* (Netlify badge strip removed: Cloudflare Pages) */
/* phone QA 2: tap targets + large system font */
@media (max-width:767px){
 :root{--hd:56px;--dh:30px}
 #q{height:44px}
 .brand{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
 .disc{align-items:center;padding-top:0;padding-bottom:0}
 .disc button{position:relative;min-height:30px;padding:0 6px}
 .disc button::after{content:"";position:absolute;left:-6px;right:-6px;top:-8px;bottom:-8px}
 #keyBtn{height:44px;border-radius:22px;padding:0 16px}
 .toggle input{width:24px;height:24px}
 #card summary{min-height:44px}
}

/* phone QA 3: ~10-15% smaller text on phones (<768px); search input stays 16px */
@media (max-width:767px){
 .ttl b{font-size:14px}.shead b{font-size:16px}
 .chip{font-size:13px}.toggle{font-size:14px}.btn{font-size:14px}
 #count{font-size:12px}.row .nm{font-size:14px}.row .m{font-size:12px}.row .p{font-size:12.5px}
 .acts a{font-size:13px}
 #card h3{font-size:17px}#card .pr{font-size:14px}#card details,#card .nt{font-size:12.5px}
 #bbar button{font-size:12px}#bbar button span{font-size:18px}
 #legend{font-size:12px}.disc,.disc button{font-size:11.5px}#toast{font-size:13px}
 #q{font-size:16px}
}
