*{box-sizing:border-box}html,body,#app{margin:0;width:100%;height:100%;font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#17211b;background:#f4f7f5}body{overflow:hidden}button,input,select,textarea{font:inherit}button{cursor:pointer}header{height:70px;background:#0f6b46;color:white;display:flex;align-items:center;justify-content:space-between;padding:0 18px;position:relative;z-index:1000}.brand{display:flex;gap:10px;align-items:center;background:none;border:0;color:white;text-align:left}.brand>span:first-child{font-size:26px}.brand strong,.brand small{display:block}.brand strong{font-size:18px}.brand small{opacity:.8}.ghost{border:1px solid #ffffff55;background:#ffffff18;color:white;padding:9px 13px;border-radius:12px;font-weight:700}main{height:calc(100% - 70px);position:relative;overflow:auto}.view{display:none;min-height:100%}.view.active{display:block}.hero{max-width:1100px;margin:auto;padding:48px 26px 22px;display:flex;justify-content:space-between;align-items:end;gap:24px}.eyebrow{font-size:12px;font-weight:900;letter-spacing:.14em;color:#b78318}.hero h1{font-size:clamp(30px,5vw,50px);max-width:760px;line-height:1.04;margin:8px 0 14px}.hero p{max-width:760px;color:#587065;font-size:17px;line-height:1.5}.primary{border:0;background:#0f6b46;color:white;border-radius:14px;padding:13px 18px;font-weight:800;box-shadow:0 5px 18px #0f6b4630}.wide{width:100%}.progress-card,.stats,.route-grid,.section-title{max-width:1100px;margin-left:auto;margin-right:auto;padding-left:26px;padding-right:26px}.progress-card{margin-bottom:16px}.progress-inner{background:#173e30;color:white;border-radius:20px;padding:18px}.progress-top{display:flex;justify-content:space-between;gap:12px;align-items:end}.progress-top b{font-size:26px}.progress-track{height:10px;background:#ffffff2d;border-radius:99px;overflow:hidden;margin:12px 0 7px}.progress-fill{height:100%;background:#d7ae39;border-radius:99px}.progress-sub{font-size:12px;opacity:.82}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:30px}.stat{background:white;border:1px solid #dde6e1;border-radius:16px;padding:16px}.stat b{display:block;font-size:24px}.stat span{font-size:13px;color:#64766d}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.section-title h2{margin:0}.section-title select{border:1px solid #ccd8d1;background:white;border-radius:10px;padding:9px}.route-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding-bottom:40px}.route-card{background:white;border:1px solid #dce6e0;border-radius:18px;overflow:hidden;cursor:pointer;transition:.18s;box-shadow:0 3px 12px #00000008}.route-card:hover{transform:translateY(-2px);box-shadow:0 8px 22px #00000012}.route-visual{height:100px;background:linear-gradient(135deg,#0f6b46,#82ab92);display:flex;align-items:end;padding:12px;color:white}.status{font-size:11px;font-weight:900;border-radius:999px;padding:5px 8px;background:#ffffffdd;color:#0f6b46}.route-card-body{padding:15px}.route-card h3{margin:0 0 6px}.route-meta{color:#64766d;font-size:13px}.route-numbers{display:flex;gap:14px;margin-top:12px}.route-numbers b{display:block}.route-numbers span{font-size:11px;color:#74867d}.empty{grid-column:1/-1;background:white;border:1px dashed #bdccc4;padding:28px;border-radius:16px;text-align:center;color:#66786f}.route-view{position:absolute;inset:0;min-height:0!important}.route-view.active{display:block}.route-view #map{position:absolute;inset:0;background:#e5ebe7}.map-top{position:absolute;z-index:700;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.map-top>*{pointer-events:auto}.round{width:42px;height:42px;border-radius:50%;border:0;background:white;box-shadow:0 3px 12px #0003;font-size:20px}.chip{background:white;padding:10px 14px;border-radius:16px;box-shadow:0 3px 12px #0002;font-weight:800;max-width:65%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sheet{position:absolute;z-index:800;left:10px;right:10px;bottom:10px;background:#fffefbf5;border-radius:20px;box-shadow:0 10px 35px #0004;max-height:72%;overflow:hidden;transition:max-height .25s ease}.sheet.collapsed{max-height:106px}.handle{display:block;width:100%;height:22px;border:0;background:transparent;padding:0;touch-action:none;-webkit-user-select:none;user-select:none}.handle span{display:block;width:42px;height:5px;border-radius:99px;background:#bfc9c3;margin:8px auto}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0 12px 12px}.metrics div{background:#edf3ef;border-radius:12px;padding:10px}.metrics b,.metrics span{display:block}.metrics b{font-size:18px}.metrics span{font-size:11px;color:#687a70;margin-top:2px}.sheet-body{padding:0 12px 14px;overflow:auto;max-height:calc(72vh - 100px)}.sheet.collapsed .sheet-body{display:none}.quick{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:12px}.quick button{border:0;background:#0f6b46;color:white;border-radius:11px;padding:10px 7px;font-weight:800;font-size:12px}.poi-panel{margin-bottom:12px}.filter-row{display:flex;gap:6px;overflow:auto;padding:2px 0 8px}.filter-row button{white-space:nowrap;border:1px solid #cfdbd4;background:white;border-radius:999px;padding:7px 9px;font-size:11px}.filter-row button.active{background:#b78318;color:white;border-color:#b78318}.detail-card{background:#f5f8f6;border:1px solid #dee7e2;border-radius:14px;padding:12px;margin:8px 0}.detail-row{display:flex;justify-content:space-between;gap:12px;padding:5px 0}.detail-row span{color:#667970}.elev{height:100px;width:100%;margin-top:8px}.amenity-card{border-top:1px solid #e1e8e4;padding:9px 0;font-size:13px;display:flex;justify-content:space-between;gap:10px}.amenity-card span{color:#667970;text-align:right}.report-card{background:#fff8e7;border:1px solid #ead9a4;border-radius:14px;padding:12px;margin:8px 0}.report-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px}.report-photos img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:9px}.custom-icon,.poi-icon{font-size:21px;filter:drop-shadow(0 1px 2px white)}.modal{position:fixed;inset:0;z-index:3000;background:#0008;display:grid;place-items:center;padding:20px}.modal[hidden]{display:none}.modal-card{background:white;width:min(520px,100%);max-height:90vh;overflow:auto;border-radius:22px;padding:20px}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal-head h2{margin:0}.modal-head .round{box-shadow:none;background:#eef3f0}form{display:grid;gap:13px;margin-top:18px}label{font-weight:800;font-size:13px}label span{font-weight:400;color:#77887f}input,select,textarea{display:block;width:100%;margin-top:6px;border:1px solid #cfdad4;border-radius:11px;padding:11px;background:white}.check{display:flex;gap:9px;align-items:center}.check input{width:auto;margin:0}.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}#uploadStatus,#reportStatus{font-size:13px;color:#52665a}.user-dot{width:18px;height:18px;border:3px solid white;border-radius:50%;background:#1677ff;box-shadow:0 0 0 2px #1677ff55}.mid-dot{width:20px;height:20px;border-radius:50%;background:#d6a51e;border:3px solid white;box-shadow:0 2px 8px #0005}
@media(max-width:800px){.route-grid{grid-template-columns:1fr 1fr}.hero{align-items:stretch;flex-direction:column}.hero .primary{align-self:flex-start}.quick{grid-template-columns:repeat(2,1fr)}}
@media(max-width:540px){header{height:62px;padding:0 12px}main{height:calc(100% - 62px)}.route-grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(3,1fr);gap:7px}.stat{padding:12px}.stat b{font-size:20px}.hero{padding:28px 16px 18px}.progress-card,.stats,.route-grid,.section-title{padding-left:16px;padding-right:16px}.hero h1{font-size:34px}.sheet{left:6px;right:6px;bottom:6px}.chip{max-width:70%;font-size:13px}.two{grid-template-columns:1fr}.report-photos{grid-template-columns:repeat(2,1fr)}}

/* === Always visible route filters === */
.always-filter-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px;
  width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  padding: 7px 1px 10px;
  margin: 0 0 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.always-filter-row::-webkit-scrollbar { display: none; }
.always-filter-row button {
  flex: 0 0 auto !important;
  white-space: nowrap;
  border: 1px solid #cfdbd4;
  background: white;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  min-height: 34px;
}
.always-filter-row button.active {
  background: #b78318 !important;
  color: white !important;
  border-color: #b78318 !important;
}

@media (max-width: 540px) {
  .always-filter-row {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255,255,255,.98);
    padding: 8px 2px 10px;
    border-bottom: 1px solid #e1e8e4;
  }
  .always-filter-row button {
    font-size: 12px;
    padding: 8px 11px;
  }
}


/* === Filter state: grey inactive, green active === */
.always-filter-row button {
  background: #e7ebe9 !important;
  color: #425149 !important;
  border-color: #d1d8d4 !important;
  font-weight: 750;
}

.always-filter-row button.active {
  background: #0f6b46 !important;
  color: #ffffff !important;
  border-color: #0f6b46 !important;
  box-shadow: 0 2px 7px rgba(15,107,70,.18);
}


/* === Mobile 3-state draggable bottom sheet v206 === */
@media (max-width: 540px) {
  #sheet {
    position: fixed !important;
    left: 6px !important;
    right: 6px !important;
    bottom: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    border-radius: 22px 22px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom);
    will-change: top, height;
  }

  #sheet[data-state="full"] {
    border-radius: 18px 18px 0 0 !important;
  }

  #sheet[data-state="collapsed"] {
    border-radius: 18px !important;
  }

  #sheet .handle {
    height: 28px !important;
    touch-action: none !important;
  }

  #sheet .handle span {
    width: 54px !important;
    height: 6px !important;
    margin-top: 9px !important;
    background: #aebbb4 !important;
  }

  #sheet .sheet-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain;
  }

  #sheet[data-state="collapsed"] .metrics {
    padding-bottom: 10px;
  }

  #sheet[data-state="collapsed"] .sheet-body {
    display: none !important;
  }
}
