
:root{--bg:#f3f5f2;--surface:#ffffff;--ink:#13201c;--muted:#66736e;--line:#dce3df;--green:#24775f;--green2:#3e9378;--sand:#d9b06d;--dark:#15251f;--soft:#edf5f1;--shadow:0 18px 50px rgba(21,37,31,.08)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:linear-gradient(180deg,#f8faf8 0%,var(--bg) 100%);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;overflow-x:hidden}button,input{font:inherit}button{cursor:pointer}.app{min-height:100vh}.topbar{height:78px;position:sticky;top:0;z-index:30;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:30px;padding:0 34px;background:rgba(255,255,255,.96);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:11px;min-width:230px}.logo{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,var(--dark),var(--green));color:#fff;font-weight:900;font-size:21px;box-shadow:0 10px 25px rgba(36,119,95,.2)}.brand strong{display:block;font-size:16px;letter-spacing:-.25px}.brand span{display:block;font-size:10px;color:var(--muted);margin-top:2px}.nav{display:flex;justify-content:center;gap:8px}.nav-btn{border:0;background:transparent;color:#66736e;font-weight:750;font-size:13px;border-radius:12px;padding:10px 15px}.nav-btn:hover{background:#f5f7f5;color:var(--ink)}.nav-btn.active{background:var(--dark);color:#fff}.top-actions{display:flex;gap:9px}.plan{border:1px solid var(--line);background:#fff;border-radius:13px;padding:8px 12px;font-weight:850;color:var(--green);font-size:11px;line-height:1}.plan small{display:block;color:var(--muted);font-weight:600;font-size:9px;margin-top:4px}.avatar{width:42px;height:42px;border:0;border-radius:13px;background:#f0f3f1;color:var(--dark);font-weight:850}
main{max-width:1500px;margin:0 auto;padding:28px 34px 70px}.section{display:none}.section.active{display:block}.hero{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:30px 34px;border:1px solid #d8e2dc;border-radius:26px;background:linear-gradient(135deg,#f1f8f5 0%,#fff 58%,#faf5eb 100%);box-shadow:0 15px 45px rgba(21,37,31,.04)}.eyebrow{font-size:10px;letter-spacing:1.55px;font-weight:900;color:var(--green)}.hero h1,.page-title h1{font-size:38px;line-height:1.02;letter-spacing:-1.4px;margin:8px 0 8px}.hero h1 span{color:var(--green)}.hero p,.page-title p{font-size:14px;line-height:1.6;color:var(--muted);margin:0}.hero-stat{min-width:150px;border:1px solid #d9e3dd;background:rgba(255,255,255,.85);border-radius:20px;padding:18px 20px;text-align:center}.hero-stat b{display:block;font-size:36px;line-height:1;color:var(--dark)}.hero-stat span{display:block;color:var(--muted);font-size:11px;margin-top:6px}
.toolbar{display:flex;gap:8px;align-items:center;overflow-x:auto;padding:18px 0 12px;scrollbar-width:none}.toolbar::-webkit-scrollbar{display:none}.search{min-width:340px;flex:1;height:46px;display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:0 14px}.search span{font-size:23px;color:var(--green)}.search input{width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:13px}.search input::placeholder{color:#98a39f}.filter{white-space:nowrap;border:1px solid var(--line);background:#fff;color:#5e6a66;border-radius:999px;padding:9px 12px;font-size:11px;font-weight:750}.filter:hover{border-color:#bfd4ca}.filter.active{background:var(--dark);border-color:var(--dark);color:#fff}.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin:10px 0 14px}.section-head h2{font-size:25px;letter-spacing:-.75px;margin:4px 0 0}.count-badge{border:1px solid var(--line);background:#fff;border-radius:12px;padding:9px 12px;font-size:11px;font-weight:800;color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.card{position:relative;min-width:0;min-height:205px;padding:17px;border:1px solid var(--line);border-radius:19px;background:#fff;display:flex;flex-direction:column;transition:.2s;overflow:hidden}.card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent,var(--green))}.card:hover{transform:translateY(-3px);border-color:#c6d8cf;box-shadow:var(--shadow)}.card-top{display:flex;justify-content:space-between;gap:10px}.num{font-size:10px;font-weight:900;color:#9aa6a1;letter-spacing:.7px}.tag{font-size:9px;font-weight:900;border-radius:999px;padding:5px 7px}.free{background:#eaf8f1;color:#127354}.locked{background:#f1f3f2;color:#747f7a}.code{margin:15px 0 8px;font-size:15px;font-weight:900;color:#13201c;line-height:1.25;overflow-wrap:anywhere;word-break:break-word}.card p{font-size:12.5px;line-height:1.55;color:var(--muted);margin:0 0 14px;overflow-wrap:anywhere;word-break:break-word}.card-foot{margin-top:auto;display:flex;align-items:flex-end;justify-content:space-between;gap:10px}.cat{font-size:10px;color:#89948f;max-width:52%;overflow-wrap:anywhere;word-break:break-word}.card-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.mini{border:1px solid var(--line);background:#fff;color:#53605b;border-radius:10px;padding:8px 9px;font-size:10px;font-weight:800}.mini:hover{border-color:#bed2c8}.mini.open{background:var(--dark);border-color:var(--dark);color:#fff}.mini.open:hover{background:var(--green);border-color:var(--green)}
.page-title{padding:26px 4px 18px}.route-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.route-card{border:1px solid var(--line);border-radius:21px;background:#fff;padding:22px;min-height:180px;display:flex;flex-direction:column}.route-card h3{font-size:19px;margin:12px 0 7px}.route-card p{font-size:12px;line-height:1.55;color:var(--muted);margin:0}.route-card button{margin-top:auto;align-self:flex-start;border:0;background:var(--dark);color:#fff;border-radius:11px;padding:9px 12px;font-size:11px;font-weight:800}.route-card button:hover{background:var(--green)}.empty{border:1px dashed #cdd8d2;background:#fff;border-radius:20px;padding:50px;text-align:center;color:var(--muted)}
.overlay{position:fixed;inset:0;background:rgba(13,25,20,.45);backdrop-filter:blur(6px);z-index:60}.drawer{position:fixed;top:0;right:0;width:min(520px,92vw);height:100vh;background:#fff;z-index:70;box-shadow:-25px 0 70px rgba(13,25,20,.18);padding:26px;overflow:auto;transform:translateX(105%);transition:.25s ease}.drawer.open{transform:translateX(0)}.drawer-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.drawer-head h2{font-size:25px;line-height:1.08;letter-spacing:-.8px;margin:6px 0 0;overflow-wrap:anywhere;word-break:break-word}.close{width:42px;height:42px;flex:none;border:1px solid var(--line);background:#fff;border-radius:12px;color:#53605b;font-size:25px;line-height:1}.close:hover{background:#f7f8f7;color:var(--dark)}.lead{font-size:14px;line-height:1.65;color:var(--muted);margin:16px 0 18px;overflow-wrap:anywhere;word-break:break-word}.info-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.info-grid article{min-width:0;border:1px solid var(--line);background:#fbfcfb;border-radius:15px;padding:14px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px}.info-grid article>span{width:28px;height:28px;display:grid;place-items:center;background:var(--soft);color:var(--green);border-radius:9px;font-size:10px;font-weight:900}.info-grid b{font-size:12px;display:block;margin-bottom:5px}.info-grid p{font-size:11.5px;line-height:1.55;color:var(--muted);margin:0;overflow-wrap:anywhere;word-break:break-word}.example-block{margin-top:16px;border:1px solid var(--line);border-radius:18px;overflow:hidden;background:#fff}.example-copy{padding:15px 16px}.example-copy h3,.no-example h3,.next h3{font-size:16px;margin:5px 0 6px}.example-copy p,.no-example p{font-size:11.5px;line-height:1.55;color:var(--muted);margin:0}.example-block img{display:block;width:100%;height:260px;object-fit:cover;background:#edf1ef}.no-example{margin-top:16px;border:1px dashed #cbd8d2;border-radius:18px;padding:18px;background:#fbfdfc}.next{margin-top:18px;padding-top:17px;border-top:1px solid var(--line)}#nextList{display:flex;flex-wrap:wrap;gap:8px}.next-pill{border:1px solid var(--line);background:#fff;color:#35423d;border-radius:999px;padding:8px 10px;font-size:10px;font-weight:800;overflow-wrap:anywhere;word-break:break-word}.next-pill:hover{border-color:#bfd4ca;color:var(--green)}.drawer-actions{position:sticky;bottom:-26px;margin:24px -26px -26px;padding:14px 26px;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-top:1px solid var(--line);display:flex;gap:10px}.drawer-actions button{flex:1;height:44px;border-radius:12px;font-size:12px;font-weight:850}.ghost{border:1px solid var(--line);background:#fff;color:var(--dark)}.primary{border:0;background:var(--green);color:#fff}.primary:hover{background:#1f684f}
.route-modal{position:fixed;inset:0;z-index:80;background:rgba(13,25,20,.5);backdrop-filter:blur(6px);display:grid;place-items:center;padding:18px}.route-dialog{width:min(620px,96vw);max-height:90vh;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:23px;padding:24px;box-shadow:0 30px 80px rgba(13,25,20,.22)}.route-dialog>.close{float:right}.route-dialog h2{font-size:25px;margin:7px 0 7px}.route-dialog>p{font-size:13px;color:var(--muted)}.route-steps{display:grid;gap:9px;margin-top:18px}.route-step{min-width:0;border:1px solid var(--line);border-radius:14px;padding:12px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center}.route-step>span{width:29px;height:29px;display:grid;place-items:center;background:var(--soft);color:var(--green);border-radius:9px;font-size:10px;font-weight:900}.route-step b{font-size:11px;display:block;overflow-wrap:anywhere;word-break:break-word}.route-step small{font-size:10px;line-height:1.4;color:var(--muted);display:block;margin-top:2px;overflow-wrap:anywhere;word-break:break-word}.route-step button{border:0;background:var(--dark);color:#fff;border-radius:10px;padding:8px 10px;font-size:10px;font-weight:800}
@media(max-width:1180px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.topbar{grid-template-columns:auto 1fr}.nav{order:3;grid-column:1/-1;justify-content:flex-start;height:46px;overflow-x:auto}.topbar{height:auto;padding-top:12px}.top-actions{justify-self:end}main{padding-top:20px}.route-grid{grid-template-columns:1fr 1fr}}
@media(max-width:800px){.topbar{padding:10px 14px}.brand{min-width:0}.brand span{display:none}.top-actions .plan{display:none}.nav-btn{font-size:11px;padding:9px 11px}main{padding:16px 12px 70px}.hero{padding:22px;align-items:flex-start}.hero h1,.page-title h1{font-size:30px}.hero-stat{display:none}.toolbar{padding-top:14px}.search{min-width:250px}.grid{grid-template-columns:1fr 1fr}.route-grid{grid-template-columns:1fr}.info-grid{grid-template-columns:1fr}.drawer{padding:18px}.drawer-actions{margin-left:-18px;margin-right:-18px;margin-bottom:-18px;padding-left:18px;padding-right:18px}}
@media(max-width:540px){.grid{grid-template-columns:1fr}.hero h1,.page-title h1{font-size:27px}.hero{border-radius:20px}.section-head h2{font-size:21px}.card{min-height:180px}.search{min-width:210px}.drawer-head h2{font-size:21px}.example-block img{height:220px}}

/* ===== v12.1 FIX CRITICO: los elementos con hidden deben quedar ocultos ===== */
[hidden], .route-modal[hidden], .overlay[hidden], .example-block[hidden], .no-example[hidden] {
  display: none !important;
}

/* Modal de ruta: solo aparece cuando JS elimina hidden */
.route-modal:not([hidden]) {
  display: grid;
}

/* ===== v12.2: SIN SCROLL EN MENÚS / FILTROS ===== */
html, body { overflow-x: hidden !important; }
.topbar { overflow: visible !important; }
.nav {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 8px !important;
  overflow: visible !important;
  overflow-x: visible !important;
  height: auto !important;
  min-width: 0 !important;
}
.nav-btn { white-space: normal !important; }
.toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
  overflow: visible !important;
  overflow-x: visible !important;
  scrollbar-width: auto !important;
}
.toolbar::-webkit-scrollbar { display: none !important; }
.search {
  flex: 1 1 360px !important;
  min-width: min(100%, 320px) !important;
}
.filter {
  flex: 0 0 auto !important;
  white-space: normal !important;
  text-align: center !important;
  min-height: 38px !important;
  padding: 9px 14px !important;
}

@media(max-width:1180px){
  .topbar{height:auto!important;padding-top:12px!important;padding-bottom:12px!important;}
  .nav{order:3;grid-column:1/-1;justify-content:flex-start!important;overflow:visible!important;height:auto!important;}
}
@media(max-width:800px){
  .toolbar{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important;}
  .search{grid-column:1/-1!important;min-width:0!important;width:100%!important;}
  .filter{width:100%!important;font-size:10.5px!important;padding:9px 8px!important;}
  .nav{justify-content:flex-start!important;}
}
@media(max-width:540px){
  .toolbar{grid-template-columns:repeat(2,minmax(0,1fr));}
  .nav-btn{font-size:11px!important;padding:9px 10px!important;}
}


/* ===== v12.3: RUTAS GUIADAS COMPACTAS Y PROFESIONALES ===== */
#routesSection .page-title{padding:24px 4px 16px;max-width:760px}
#routesSection .page-title h1{margin-top:6px;margin-bottom:6px}
.route-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
}
.route-card{
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  padding:18px!important;
  border-radius:18px!important;
  border:1px solid var(--line)!important;
  background:#fff!important;
  display:flex!important;
  flex-direction:column!important;
  box-shadow:0 8px 24px rgba(21,37,31,.035)!important;
  overflow:hidden!important;
}
.route-card:hover{border-color:#bdd3c9!important;box-shadow:0 14px 32px rgba(21,37,31,.075)!important;transform:translateY(-2px)}
.route-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}
.route-card-top>div{min-width:0}
.route-label{display:block;font-size:9px;letter-spacing:1.35px;font-weight:900;color:var(--green);margin-bottom:6px}
.route-card h3{font-size:18px!important;line-height:1.2!important;margin:0!important;letter-spacing:-.35px;overflow-wrap:anywhere;word-break:break-word}
.route-count{flex:none;font-size:9px;font-weight:850;color:#596762;background:#f2f6f4;border:1px solid #e0e7e3;border-radius:999px;padding:6px 8px;white-space:nowrap}
.route-card>p{font-size:11.5px!important;line-height:1.5!important;color:var(--muted)!important;margin:10px 0 13px!important;min-height:35px;overflow-wrap:anywhere;word-break:break-word}
.route-preview{display:grid;gap:6px;margin-bottom:14px}
.route-preview-step{min-width:0;display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px;align-items:center;padding:7px 8px;border:1px solid #e4e9e6;background:#fbfcfb;border-radius:10px}
.route-preview-step span{width:24px;height:24px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--green);font-size:9px;font-weight:900}
.route-preview-step b{font-size:9.5px;line-height:1.25;color:#34433d;overflow-wrap:anywhere;word-break:break-word}
.route-card>button{margin-top:auto!important;width:100%!important;align-self:stretch!important;border:0!important;background:var(--dark)!important;color:#fff!important;border-radius:11px!important;padding:10px 12px!important;font-size:10.5px!important;font-weight:850!important}
.route-card>button:hover{background:var(--green)!important}
.route-repair{border-top:3px solid #6596B8!important}
.route-sell{border-top:3px solid #C8922E!important}
.route-cinema{border-top:3px solid #765F8F!important}
.route-luxury{border-top:3px solid #A37D3E!important}
.route-social{border-top:3px solid #518C8A!important}
.route-catalog{border-top:3px solid #B57362!important}

/* El menú y los filtros nunca tienen scroll horizontal */
.nav,.toolbar{overflow:visible!important;overflow-x:visible!important;flex-wrap:wrap!important}

@media(max-width:1050px){
  .route-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:680px){
  .route-grid{grid-template-columns:1fr!important}
  .route-card>p{min-height:0}
}


/* v12.4 — sin Rutas separadas: guía integrada en cada atajo */
.nav{display:flex;gap:10px;flex-wrap:wrap;overflow:visible!important}
.toolbar{overflow:visible!important;flex-wrap:wrap!important}
.filter{flex:0 0 auto}
@media(max-width:760px){.nav{width:100%}.nav-btn{flex:1 1 auto}.toolbar{display:grid!important;grid-template-columns:1fr 1fr}.search{grid-column:1/-1}}
