*{box-sizing:border-box}body{margin:0;background:#f7f8f4;color:#203b35;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}header{height:76px;padding:0 4%;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #e2e8e1}.brand{font-size:25px;font-weight:800;color:inherit;text-decoration:none}.brand small{font-size:10px;letter-spacing:2px;margin-left:14px;color:#76867f}.badge{font-size:12px;border:1px solid #d8e4dc;border-radius:20px;padding:6px 13px}main{max-width:1600px;margin:auto;display:grid;grid-template-columns:310px 1fr;min-height:calc(100vh - 76px)}aside{padding:38px 28px;border-right:1px solid #e1e8df}.eyebrow{font-size:11px;font-weight:700;letter-spacing:2px;color:#668075;margin:0 0 14px}h1{font-size:34px;line-height:1.5;letter-spacing:-1px;margin:0 0 14px}.intro{font-size:14px;line-height:1.9;color:#738078;margin-bottom:28px}.upload{position:relative;border:1.5px dashed #9eb6a6;background:#edf3eb;border-radius:14px;display:flex;align-items:center;flex-direction:column;gap:9px;padding:22px 10px;cursor:pointer}.upload:hover,.upload.drag{background:#dfece0}.upload:focus-within{outline:3px solid #698f77}.upload input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.upload-icon{font-size:30px;line-height:1}.upload span:not(.upload-icon),.upload small{font-size:12px;color:#6e8174}.text-button{border:0;background:none;color:#456e58;width:100%;padding:16px;font-size:13px;cursor:pointer}.list-heading{display:flex;align-items:center;justify-content:space-between;margin-top:22px}.list-heading h2{font-size:14px}.list-heading span{font-size:12px;color:#7b887f}#routes{display:grid;gap:8px}.route-item{background:white;border:1px solid #dce4da;text-align:left;padding:13px;border-radius:9px;color:#2b473b;cursor:pointer;overflow-wrap:anywhere}.route-item.active{background:#e5eee0;border-color:#78906c}.route-item strong,.route-item small{display:block}.route-item small{margin-top:6px;color:#73806e}.local-note{font-size:12px;line-height:1.8;color:#879187;margin-top:30px}.workspace{padding:30px 36px}.route-heading{display:flex;gap:20px;justify-content:space-between;align-items:center}.route-heading h2{font-size:25px;margin:0;overflow-wrap:anywhere}#filename{font-size:12px;color:#7d8981;overflow-wrap:anywhere}.actions{display:flex;gap:8px;flex-shrink:0}button,.primary{font:inherit}button:disabled{opacity:.45;cursor:default}.actions button,.primary,#fit{border:1px solid #ccd9cf;border-radius:8px;padding:10px 14px;background:white;color:#31563f;text-decoration:none;font-size:13px;cursor:pointer}.primary{background:#315c43;color:white;border-color:#315c43}[hidden]{display:none!important}#status{font-size:13px;color:#87602d;min-height:22px;overflow-wrap:anywhere}.stats{display:grid;grid-template-columns:repeat(3,1fr);background:white;border:1px solid #e2e7df;border-radius:12px;margin:8px 0 20px;padding:20px 0}.stats>div{padding:0 24px;border-right:1px solid #e5e9e1}.stats>div:last-child{border:0}.stats span{display:block;font-size:12px;color:#79877b;margin-bottom:6px}.stats strong{font-size:30px;font-weight:600}.stats small{margin-left:7px;color:#7d8e7f}.map-wrap{position:relative;border-radius:14px;overflow:hidden;border:1px solid #d7e1d4}#map{height:400px;background:#e6ebe1}#fit{position:absolute;bottom:26px;right:12px;z-index:500;box-shadow:0 2px 8px #24382d20}.profile{margin-top:18px;background:white;border:1px solid #e2e7df;border-radius:12px;padding:18px 22px 8px}.profile-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.profile h3{font-size:14px;margin:0}.profile-heading span,#chart-note{font-size:11px;color:#7d887e}#chart{display:block;width:100%;height:180px;touch-action:pan-y}#chart text{font:11px system-ui;fill:#778579}footer{text-align:right;font-size:11px;color:#8c978d;padding:20px 0}button:focus-visible,a:focus-visible{outline:3px solid #abbd84;outline-offset:3px}@media(min-width:1400px){#map{height:460px}}@media(max-width:950px){main{grid-template-columns:250px 1fr}aside{padding:25px 18px}.workspace{padding:25px 20px}.route-heading{align-items:flex-start;flex-direction:column}h1{font-size:29px}}@media(max-width:650px){header{height:60px}.brand small{display:none}main{display:block}aside{padding:24px;border-right:0;border-bottom:1px solid #ddd}h1{font-size:28px}h1 br,.intro br{display:none}.intro{margin-bottom:18px}.upload{padding:15px}.local-note{margin:16px 0 0}.workspace{padding:24px 16px}.stats>div{padding:0 12px}.stats strong{font-size:25px}#map{height:350px}.profile-heading{align-items:flex-start;flex-direction:column}#routes{max-height:180px;overflow:auto}}
/* Keep long route names and touch controls inside narrow screens. */
.workspace,.route-heading>div{min-width:0}
.actions{flex-wrap:wrap;max-width:100%}
.upload-notice{font-size:12px;line-height:1.7;color:#637368;margin:12px 0}
.site-footer{text-align:left;color:#637368;font-size:12px;line-height:1.8;margin-top:20px;border-top:1px solid #dce4da}
.site-footer p{margin:8px 0}
.site-footer .copyright{font-weight:600;color:#36523f}
.site-footer summary{cursor:pointer;min-height:44px;padding:10px 0;color:#31563f;font-weight:600}
.site-footer summary:focus-visible{outline:3px solid #abbd84;outline-offset:2px}
.notice-content{max-width:850px;padding:0 0 12px;font-size:13px;overflow-wrap:anywhere}
.notice-content h3{font-size:14px;margin:18px 0 4px;color:#36523f}
.notice-content a{color:#31563f;text-underline-offset:3px}
#current-elevation{padding:12px 16px;margin:14px 0 0;border-radius:10px;background:#e9f2fa;color:#245a88;font-size:14px;line-height:1.7;font-weight:600}
.shared-view aside,.shared-view #share{display:none}
.shared-view main{grid-template-columns:minmax(0,1fr);max-width:1200px}
.location-bar{display:flex;align-items:center;gap:12px;margin-top:10px}
#locate{flex-shrink:0;min-height:44px;padding:8px 12px;border:1px solid #ccd9cf;border-radius:8px;background:white;color:#31563f;cursor:pointer}
#location-status{font-size:12px;color:#64786c;line-height:1.6;margin:0}
#basemap{position:absolute;top:10px;right:10px;z-index:500;max-width:calc(100% - 70px);min-height:44px;padding:8px 10px;border:1px solid #ccd9cf;border-radius:8px;background:#fff;color:#31563f;font:14px system-ui;box-shadow:0 2px 8px #24382d20}
#basemap:focus-visible{outline:3px solid #abbd84;outline-offset:2px}
@media(max-width:650px){
  .brand{font-size:21px;line-height:1.2}
  .brand small{display:block;font-size:10px;letter-spacing:1px;margin:4px 0 0 26px}
  .badge{flex-shrink:0}
  .actions{width:100%}
  .actions button,.actions .primary,#fit{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .actions button,.actions .primary{flex:1 1 auto}
  .profile{padding:16px 10px 8px}
  #chart{height:auto;aspect-ratio:800/180;min-height:110px}
  .stats strong{font-size:clamp(18px,5.5vw,25px)}
}
