/* The shared visual system: an Andean field journal, with blue reserved for
   discoveries. Feature-specific layouts keep their own styles and state. */
:root{
  --pine:#173f35;--deep:#102f28;--leaf:#546f58;--lime:#e3edb4;
  --cream:#f8f6ef;--white:#fffefa;--ink:#263c34;--muted:#66766d;
  --line:#dfe5d8;--soft:#edf1e7;--orange:#9b5a38;--cobalt:#1764c6;
  --shadow:0 18px 55px #173f350b;--radius:20px;
  font-family:Inter,"Segoe UI",Arial,sans-serif;font-feature-settings:"ss01";
}
html{scroll-behavior:smooth;scroll-padding-top:110px}
body{background:var(--cream) url('./assets/contours.svg') repeat;line-height:1.5}
body:has(dialog[open]){overflow:hidden}
::selection{background:#dbe8b2;color:var(--deep)}
button,a,input,select,textarea{touch-action:manipulation}
button:disabled{cursor:not-allowed;opacity:.58}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #1764c6;outline-offset:4px}
main{max-width:1360px;padding:12px 48px 76px;min-width:0}
main>*{min-width:0}
.site-header{position:sticky;top:12px;z-index:6;max-width:1264px;width:calc(100% - 64px);margin:14px auto 22px;padding:16px 22px;gap:24px;border:1px solid #dce3d5;border-radius:19px;background:#fffef9ed;backdrop-filter:blur(18px);box-shadow:0 4px 28px #173f3505;transition:box-shadow .25s,background .25s}
.site-header.is-scrolled{background:#fffef9f7;box-shadow:0 9px 32px #173f3512}
.brand{font-size:33px;letter-spacing:-1.7px;gap:11px;line-height:1}
.brand>svg{height:44px;width:44px;background:var(--pine);color:var(--lime);border-radius:13px;padding:6px;flex:none}
.brand-sub{font-size:8px;letter-spacing:2.65px;line-height:1.4;margin-top:5px}
.desktop-nav{gap:6px;padding:5px;border:1px solid #e8ecdf;background:#f3f5eb;border-radius:12px;font-size:12px}
.desktop-nav a{padding:10px 18px;min-height:42px;border-radius:8px;display:flex;align-items:center;transition:background .18s,color .18s}
.desktop-nav a.active{box-shadow:none;background:var(--pine);color:var(--white);font-weight:600}
.passport-link{gap:10px;font-size:12px;min-height:44px}
.passport-link>.icon{width:21px;height:21px;color:var(--pine)}
.passport-link-copy{display:flex;flex-direction:column;gap:3px}
.passport-link-copy>b{font-size:12px;font-weight:650;line-height:1.2}
.passport-link-copy>small{font-size:10px;color:var(--muted);font-weight:400;line-height:1.2}
.points-pill{background:var(--lime);border:1px solid #d4dfad;color:var(--pine);font-variant-numeric:tabular-nums;font-size:10px;padding:7px 10px}
.section-kicker{font-size:10px;letter-spacing:1.65px;color:var(--leaf);line-height:1.7}
.page-intro{padding:34px 0 31px;max-width:830px}
.page-intro:before{content:"RIQSI / CUADERNO DE EXPLORACIÓN";font-size:9px;letter-spacing:2px;color:#81917e;display:block;margin-bottom:21px;padding-bottom:13px;border-bottom:1px solid var(--line);width:max-content;max-width:100%}
.page-intro h1{font-size:clamp(35px,4vw,54px);line-height:1.08;letter-spacing:-1.7px;margin:12px 0 17px;max-width:780px;text-wrap:balance}
.page-intro p{font-size:14px;line-height:1.85;max-width:665px;margin-bottom:0}
.section-header h2{font-size:34px;letter-spacing:-1px;line-height:1.2;text-wrap:balance}
.section-header p{line-height:1.8}
.button{min-height:46px;border-radius:11px;padding:13px 19px;font-size:12px;font-weight:650;line-height:1.5;border:1px solid var(--pine);box-shadow:0 3px 0 #173f3505;transition:background .18s,border-color .18s,box-shadow .18s,translate .18s}
.button .icon{height:17px;width:17px}
.button.outline{background:#fffefa8a;border-color:#d6dfcf;box-shadow:none}
.button.soft{background:var(--soft);border-color:transparent;box-shadow:none}
.button.light{background:var(--lime);border-color:var(--lime)}
.button.small{font-size:11px;min-height:44px;padding:10px 14px}
.button.danger{border-color:#913524}
.button:active:not(:disabled){translate:0 1px}
.button[aria-busy=true]{cursor:progress;opacity:.75}
.button[aria-busy=true]:after{content:"";width:14px;height:14px;flex:none;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .7s linear infinite}
.filter-chip{min-height:44px;border-color:#d6dfcf;font-size:12px;padding:10px 16px;background:#fffef966;transition:background .15s,color .15s,border-color .15s}
.filter-chip.active{background:var(--pine);color:var(--white);border-color:var(--pine)}
.filter-row{gap:9px;padding-bottom:14px;scrollbar-width:thin}
.field label{font-size:12px;color:#526b59;font-weight:650;line-height:1.5}
.field input,.field select,.field textarea{font-size:14px;line-height:1.5;border:1px solid #d8e0d0;border-radius:10px;background:#fffefa;padding:12px 13px;min-height:47px;transition:border-color .15s,box-shadow .15s}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--pine);box-shadow:0 0 0 3px #173f3509}
input[type=checkbox]{accent-color:var(--pine)}
.field input::placeholder{color:#879284}
.panel{border-radius:18px;background:#fffefa;border-color:#dfe5d7;box-shadow:0 8px 35px #173f3504;padding:29px}
.panel h2{font-size:29px;letter-spacing:-.6px;line-height:1.25}
.panel p{font-size:13px;line-height:1.85}
.notice{background:#f1ecd8;border:1px solid #e8dfc3;color:#786039;border-radius:11px;font-size:12px;line-height:1.8;padding:15px 18px}
.empty-state{background:#fffdf4;border:1px dashed #ccd6bf;padding:42px 24px;border-radius:18px}
.empty-state h3{font:400 25px/1.25 Georgia,serif;margin-bottom:11px}
.empty-state p{font-size:13px;line-height:1.8;max-width:420px;margin:0 auto}
.empty-state .icon{height:33px;width:33px;color:#7b9271}
.result-meta{font-size:12px;line-height:1.7;color:#71816e}
.route-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:stretch}
.route-card{display:flex;flex-direction:column;padding:27px;border-radius:20px;border-color:#dce4d3;box-shadow:0 8px 30px #173f3505;background:#fffefa url('./assets/contours.svg') center/500px}
.route-card:before{content:"";position:absolute;left:0;top:0;height:4px;width:100%;background:#7f9972}
.route-card:nth-child(2):before{background:#bc8e5b}.route-card:nth-child(3):before{background:#638c96}
.route-card .route-icon{height:48px;width:48px;border-radius:15px;margin-bottom:23px}
.route-card .route-number{position:absolute;right:26px;top:25px;font:400 51px/1 Georgia,serif;color:#e2e8d9;letter-spacing:-3px}
.route-card h3{font:400 28px/1.2 Georgia,serif;margin:12px 0 14px;letter-spacing:-.65px}
.route-card>p{font-size:13px;line-height:1.8;margin-bottom:21px}
.route-card .route-footer{margin-top:auto;padding-top:17px;border-top:1px solid #e2e8d9;gap:12px;flex-wrap:wrap;align-items:center;font-size:11px}
.route-card .progress-bar{height:5px;background:#e8eddc;margin-top:20px}
.route-card .progress-bar>span{background:var(--cobalt);transition:width .35s ease}
.route-card .card-link{font-size:12px}
.route-card .result-meta{margin:10px 0 0!important;font-size:11px}
.route-note{display:flex;align-items:flex-start;gap:14px;padding:19px 22px;background:#edf2e6;border:1px solid #dce5cc;border-radius:14px;margin-top:24px;font-size:12px;color:#53684d;line-height:1.8}
.route-note>.icon{margin-top:1px;color:#658059}
.service-grid{gap:21px;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.service-card{padding:26px;border-radius:19px;border-color:#dce4d2;display:flex;flex-direction:column;box-shadow:0 7px 25px #173f3505;position:relative;min-width:0}
.service-card>.icon{height:45px;width:45px;padding:11px;background:#edf2e3;color:var(--pine);border-radius:13px;margin-bottom:22px}
.service-card>.section-kicker{font-size:9px;letter-spacing:1.45px;color:#7a8c68;margin-bottom:8px}
.service-card h3{font-size:26px;line-height:1.24;letter-spacing:-.5px;margin:0 0 13px;overflow-wrap:anywhere}
.service-card>.card-location{font-size:11px;line-height:1.5;margin-bottom:16px}
.service-card p{font-size:13px;line-height:1.8;overflow-wrap:anywhere}
.service-card .service-address{border-left:2px solid #d6dfc3;padding:4px 0 4px 12px;margin:0 0 15px;color:#4c654d}
.service-card .service-actions{margin-top:auto;padding-top:8px;gap:7px;flex-wrap:wrap}
.service-actions .button{font-size:11px;min-height:44px;padding:10px 12px}
.service-source{font-size:10px;line-height:1.7;border-top:1px solid #e4e9db;margin:19px 0 0!important;padding-top:14px;display:flex;flex-wrap:wrap;gap:7px;justify-content:space-between}
.service-source>a{text-decoration:underline;text-underline-offset:3px;color:#577153}
.service-source>span{font-size:10px;color:#85917c}
#service-search{margin-top:0;background:#fffefa;border:1px solid var(--line);box-shadow:0 7px 28px #173f3505;border-radius:16px;padding:18px}
.services-result-row{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}
.services-result-row .result-meta{margin:0;max-width:800px}
.services-clear{border:0;border-bottom:1px solid #9fb18f;background:transparent;color:#526d48;font-size:12px;font-weight:600;padding:5px 0;min-height:44px;white-space:nowrap}
.destination-card{border-color:#dce4d3;border-radius:20px;background:#fffefa;box-shadow:0 6px 20px #173f3505}
.card-category{backdrop-filter:blur(8px);font-size:10px;line-height:1.3}
.card-body h3{font-size:27px;line-height:1.2;letter-spacing:-.5px}
.card-body p{font-size:13px;line-height:1.8}
.lock-chip{font-size:11px;line-height:1.6;gap:6px}
.lock-chip>.icon{height:14px;width:14px}
dialog{width:min(780px,calc(100% - 32px));max-height:min(92dvh,1100px);border:1px solid #fffefa80;border-radius:23px;box-shadow:0 25px 120px #102a2460;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b7c7a7 #f7f6eb}
dialog[open]{animation:dialog-arrive .24s ease both}
dialog::backdrop{background:#102e25a6;backdrop-filter:blur(7px)}
.dialog-close{position:sticky;float:right;margin-top:14px;margin-right:14px;top:14px;right:auto;background:#fffef9f5;box-shadow:0 4px 17px #173f3515;border:1px solid #e4e7db;z-index:5}
.dialog-toolbar{position:sticky;top:0;height:0;z-index:8;pointer-events:none}
.dialog-toolbar .dialog-close{position:absolute;float:none;right:14px;top:14px;margin:0;pointer-events:auto}
.detail-image{height:280px;background:#e9eddf;border-bottom:1px solid #dbe3d1}
.detail-body{padding:32px 36px 38px}
.detail-body h2{font-size:39px;line-height:1.12;letter-spacing:-1px;max-width:660px;text-wrap:balance}
.detail-body>p{font-size:14px;line-height:1.9}
.detail-meta{font-size:12px;gap:12px}
.detail-section{padding-top:25px;margin-top:27px}
.detail-section>h3{font:400 25px/1.3 Georgia,serif;color:var(--pine);margin-bottom:17px}
.unlock-header{border-radius:14px;border-color:#d8e4cc;background:#f0f5e7;padding:18px}
.unlock-header>div>strong{font-size:14px;line-height:1.5}
.unlock-header>div>span{font-size:12px;line-height:1.8}
.next-stop{border:1px solid #cedff2;border-radius:16px;background:#f0f6ff;padding:24px;margin:25px 0}
.next-stop h3{font:400 27px/1.25 Georgia,serif;color:#244e7a;margin:11px 0}
.history-event{border-left-color:#b8caae;padding-left:23px;margin-left:8px;padding-bottom:29px}
.history-event:before{background:#789a67;box-shadow:0 0 0 5px #edf3e5}
.history-event>h4{font:400 25px/1.25 Georgia,serif;margin:9px 0 11px;color:#284b39}
.history-event>p{font-size:13px;line-height:1.85}
.history-source{font-size:11px;line-height:1.8;color:#637d5a;text-underline-offset:3px}
.history-photo-pending{border-radius:13px;border-style:dashed;background:#f2f3e8;min-height:110px;color:#849177}
.gallery{gap:14px;scroll-snap-type:x proximity;padding:5px 4px 16px;scrollbar-width:thin}
.gallery>figure{scroll-snap-align:start}
.gallery img{border-radius:13px}
.nearby-service{border:1px solid var(--line);border-radius:14px;padding:19px;margin:13px 0;background:#fffdf6}
.nearby-service h4{font:400 22px/1.3 Georgia,serif;margin-bottom:8px}
.photo-viewer-image{border-radius:14px;max-height:65dvh;object-fit:contain;background:#f0f2e7}
.timeline{position:relative}
.timeline li{background:#f0f4e7;border:1px solid #e0e7d4;border-radius:13px;padding:17px}
.timeline .order{background:var(--pine);color:var(--lime);width:34px;height:34px}
.timeline small{font-size:12px;line-height:1.6}
.badge-card{border-color:#e0e5d7;border-radius:16px;padding:22px;background:#fffefa;box-shadow:0 4px 18px #173f3503}
.badge-card h3{font-size:14px;line-height:1.4}
.badge-card p{font-size:12px;line-height:1.7}
.badge-card.earned{border-color:#c7d7ac;background:#f6f8ec}
.admin-tabs{position:relative;gap:8px;padding:10px 0 17px;margin-bottom:8px;scrollbar-width:thin}
.admin-tabs .filter-chip{border-radius:10px}
.admin-table{font-size:13px;background:#fffefa}
.admin-table th{background:#f1f4e9;color:#66805b;padding:15px;font-size:10px;position:sticky;top:0}
.admin-table td{padding:17px 15px;border-bottom-color:#e9eddf}
.admin-table tbody tr:hover{background:#f6f8ee}
.admin-table-wrap{border:1px solid var(--line);border-radius:12px}
.admin-toolbar h2{font-size:29px;letter-spacing:-.5px}
.login-form{max-width:470px;margin-left:auto;margin-right:auto;padding:32px}
.privacy-copy{background:#fffefa;padding:36px 40px}
.privacy-copy h2{font-size:28px;color:var(--pine)}
.privacy-copy p{font-size:14px;line-height:1.95}
.nfc-url{background:#f1f5e8;border:1px dashed #b7c6a6;border-radius:12px;padding:17px;font-family:ui-monospace,Consolas,monospace;font-size:12px;color:var(--pine)}
.loading{min-height:240px;padding:70px 24px;gap:14px;font-size:13px;line-height:1.8}
.spinner{height:25px;width:25px;border-width:2px;border-color:#d8e2cd;border-top-color:var(--pine);flex:none}
.toast{bottom:26px;max-width:min(520px,calc(100% - 32px));padding:16px 22px;background:#173f35f5;backdrop-filter:blur(12px);border:1px solid #ffffff26;border-radius:14px;box-shadow:0 12px 45px #173f3530;font-size:13px;animation:toast-arrive .2s ease both}
.dialog-toolbar .toast-in-dialog{position:absolute;left:16px;right:16px;top:68px;bottom:auto;transform:none;max-width:none;width:auto;pointer-events:auto}
.site-footer{max-width:1264px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;margin:0 auto;padding:32px 0 38px;border-top:1px solid #d8e0cd;font-size:12px}
.site-footer>.footer-story{display:block}
.footer-story .footer-brand{display:inline-flex;font-size:27px;margin-bottom:14px}
.footer-story>p{max-width:360px;font-size:12px;line-height:1.8;margin:0;color:#7a8872}
.site-footer>.footer-links{display:flex;flex-wrap:wrap;align-content:center;gap:12px 24px;justify-content:flex-end;max-width:400px;font-size:11px}
.footer-links>a{min-height:44px;display:flex;align-items:center;text-underline-offset:4px}
.footer-links>span{flex-basis:100%;text-align:right;color:#8b957f;font-size:10px;letter-spacing:.8px}
.back-to-top{position:fixed;right:24px;bottom:26px;z-index:6;border:1px solid #d7e0cb;background:#fffef9f2;color:var(--pine);height:44px;width:44px;border-radius:13px;box-shadow:0 5px 24px #173f3510;display:grid;place-items:center}
.back-to-top .icon{width:17px;height:17px;transform:rotate(-90deg)}
.reading-progress{position:absolute;top:0;left:0;z-index:8;height:3px;width:100%;background:var(--cobalt);pointer-events:none;transform:scaleX(var(--reading-progress,0));transform-origin:left}
.ui-reveal{opacity:1;translate:0 0;transition:opacity .48s ease var(--reveal-delay,0ms),translate .48s ease var(--reveal-delay,0ms)}
.ui-reveal:not(.ui-visible){opacity:0;translate:0 12px}
.ui-reveal:focus-within,.ui-reduced-motion .ui-reveal{opacity:1;translate:0 0;transition:none}
@keyframes dialog-arrive{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}
@keyframes toast-arrive{from{opacity:0;translate:0 6px}to{opacity:1;translate:0 0}}
@media(hover:hover){
  .button:hover:not(:disabled){background:#245344;border-color:#245344;box-shadow:0 5px 17px #173f3514}
  .button.outline:hover:not(:disabled){background:#edf3e3;border-color:#b8c9a5;color:var(--pine);box-shadow:none}
  .button.soft:hover:not(:disabled){background:#e0e9d0;border-color:transparent;color:var(--pine)}
  .filter-chip:not(.active):hover{background:#eaf0e0;border-color:#bdcda9;color:var(--pine)}
  .route-card,.service-card{transition:translate .22s,box-shadow .22s,border-color .22s}
  .route-card:hover,.service-card:hover{translate:0 -3px;box-shadow:0 15px 40px #173f3510;border-color:#bdcda9}
  .footer-links>a:hover{text-decoration:underline}
}
@media(min-width:1500px){main{padding-left:48px;padding-right:48px}.site-header,.site-footer{max-width:1264px}}
@media(max-width:1050px){
  main{padding:8px 28px 56px}.site-header{width:calc(100% - 48px);padding:13px 18px;gap:17px}.desktop-nav a{padding:9px 13px}.passport-link-copy>small{display:none}
  .site-footer{margin:0 28px}.service-grid,.route-grid{gap:16px}.service-card,.route-card{padding:23px}.service-card h3{font-size:24px}
}
@media(max-width:800px) and (min-width:701px){.service-grid,.route-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.passport-link-copy{display:none}.site-header{gap:12px}}
@media(max-width:700px){
  html{scroll-padding-top:88px}main{padding:0 18px 35px}.site-header{top:8px;width:calc(100% - 24px);padding:12px 14px;border-radius:16px;margin:8px auto 15px;gap:12px}
  .brand{font-size:29px;gap:9px}.brand>svg{width:36px;height:36px;border-radius:10px;padding:5px}.brand-sub{font-size:7px;letter-spacing:2px;margin-top:4px}.desktop-nav{display:none}
  .passport-link{gap:9px;padding:0;min-height:36px}.passport-link-copy{display:none}.passport-link>.icon{width:20px;height:20px}.points-pill{padding:6px 8px;font-size:10px}
  .section-kicker{font-size:9px;letter-spacing:1.35px}.page-intro{padding:20px 1px 24px}.page-intro:before{font-size:8px;letter-spacing:1.35px;margin-bottom:17px;padding-bottom:12px}
  .page-intro h1{font-size:36px;line-height:1.1;letter-spacing:-1.1px;margin:11px 0 15px}.page-intro p{font-size:13px;line-height:1.85}
  .button{padding:12px 16px;font-size:12px;min-height:46px;border-radius:10px}.filter-chip{min-height:44px;font-size:11px;padding:10px 14px}
  .field input,.field select,.field textarea{font-size:16px;padding:11px 12px;min-height:47px}.panel{padding:23px;border-radius:16px}.panel h2{font-size:26px}.panel p{font-size:13px}
  .route-grid,.service-grid{grid-template-columns:1fr;gap:18px}.route-card,.service-card{padding:25px;border-radius:18px}.route-card h3{font-size:29px}.route-card .route-footer{font-size:12px}.route-card .result-meta{font-size:11px}.service-card h3{font-size:27px}.service-card .service-actions{gap:8px}.service-actions .button{flex:1;font-size:12px}
  .service-card p{font-size:13px}.services-result-row{align-items:flex-start;gap:12px}.services-result-row .result-meta{font-size:11px}.services-clear{font-size:11px;min-height:36px}#service-search{padding:17px;border-radius:14px}.route-note{padding:17px;font-size:12px}
  .site-footer{margin:0 19px;padding:29px 0 116px;grid-template-columns:1fr;gap:17px}.site-footer>.footer-links{width:100%;max-width:none;justify-content:flex-start;gap:8px 23px}.footer-story>p{width:auto!important;font-size:12px}.footer-links>span{text-align:left!important;font-size:10px;width:auto!important}.footer-story .footer-brand{font-size:26px;margin-bottom:12px}
  .bottom-nav{left:12px;right:12px;bottom:9px;border:1px solid #dce3d2;border-radius:17px;background:#fffef9f5;padding:7px 7px calc(7px + env(safe-area-inset-bottom));box-shadow:0 6px 35px #173f3518;gap:2px;z-index:7}
  .bottom-nav a{min-width:0;flex:1;min-height:48px;gap:5px;font-size:9px;border-radius:11px;padding:5px 3px;line-height:1.3}.bottom-nav .icon{height:20px;width:20px}.bottom-nav a.active{background:#edf2e3}.bottom-nav a.active>.icon{background:transparent;box-shadow:none;border-radius:0;color:var(--pine)}
  dialog{width:calc(100% - 18px);max-height:92dvh;border-radius:19px}.detail-image{height:205px}.detail-body{padding:26px 24px 31px}.detail-body h2{font-size:32px;line-height:1.13;letter-spacing:-.75px;padding-right:5px}.detail-body>p{font-size:13px;line-height:1.9}.detail-actions{gap:9px}.detail-actions .button{min-height:46px;font-size:12px;padding:12px}.detail-meta{font-size:11px;gap:10px}.detail-section>h3{font-size:25px}.next-stop{padding:21px}.next-stop h3{font-size:27px}.history-event>h4{font-size:24px}.notice{font-size:12px;padding:14px 16px;line-height:1.85}
  .toast{bottom:calc(93px + env(safe-area-inset-bottom));font-size:12px;max-width:calc(100% - 34px);padding:14px 18px}.back-to-top{right:17px;bottom:calc(92px + env(safe-area-inset-bottom));width:42px;height:42px;border-radius:12px}.privacy-copy{padding:27px 24px}.privacy-copy h2{font-size:26px}.privacy-copy p{font-size:13px;line-height:1.95}
  .login-form{padding:25px}.admin-table td,.admin-table th{padding:13px 11px}.admin-table{font-size:12px}.admin-table td .button{font-size:11px;min-height:44px;padding:10px 12px}
}
@media(max-width:360px){main{padding-left:13px;padding-right:13px}.site-header{padding:11px 12px;gap:8px}.brand{font-size:27px}.page-intro h1{font-size:33px}.detail-body{padding-left:20px;padding-right:20px}.services-result-row{flex-direction:column;gap:5px}.route-card,.service-card{padding:22px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.ui-reveal:not(.ui-visible){opacity:1;translate:none}dialog[open],.toast{animation:none}.route-card:hover,.service-card:hover{translate:none}}
