:root { --route-ink:#24313b; --route-paper:#f6f3ed; --route-card:#fffdf9; --route-accent:#a34d35; --route-line:#ddd5c9; }
* { box-sizing:border-box; }
body { margin:0; color:var(--route-ink); background:var(--route-paper); font-family:Outfit,system-ui,sans-serif; line-height:1.55; }
a { color:var(--route-accent); }
.route-shell { max-width:1180px; margin:auto; padding:1.25rem clamp(1rem,4vw,3rem) 4rem; }
.route-header { display:flex; justify-content:space-between; gap:1rem; align-items:center; padding:.5rem 0 2.5rem; }
.route-brand { color:var(--route-ink); font-weight:800; text-decoration:none; letter-spacing:.04em; }
.route-back { font-weight:700; }
.route-intro { max-width:65ch; margin-bottom:2rem; }
.route-eyebrow,.route-kicker { color:var(--route-accent); font-size:.78rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
h1 { font-size:clamp(2rem,5vw,4rem); line-height:1.05; margin:.25rem 0 1rem; }
h2 { line-height:1.15; }
.route-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; align-items:end; background:var(--route-card); border:1px solid var(--route-line); border-radius:1rem; padding:1rem; margin-bottom:2rem; }
.route-filter-field { display:grid; min-width:0; gap:.35rem; }.route-filter-field--search { grid-column:span 2; }.route-filters label { min-width:0; font-size:.82rem; font-weight:700; overflow-wrap:anywhere; }.route-filters input,.route-filters select { width:100%; min-width:0; padding:.75rem; border:1px solid var(--route-line); border-radius:.55rem; background:#fff; font:inherit; }.route-filters button,.route-card-link { display:inline-block; border:0; border-radius:.55rem; background:var(--route-accent); color:#fff; padding:.75rem 1rem; font:inherit; font-weight:800; text-decoration:none; cursor:pointer; }
.route-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.25rem; }.route-card { display:flex; flex-direction:column; background:var(--route-card); border:1px solid var(--route-line); border-radius:1rem; overflow:hidden; }.route-card>img,.route-placeholder { width:100%; aspect-ratio:16/9; object-fit:cover; }.route-placeholder { display:grid; place-items:center; background:#e8dfd3; color:#6b5a4b; font-weight:700; }.route-card-body { display:flex; flex:1; flex-direction:column; padding:1.25rem; }.route-card-body h2 { margin:.2rem 0 .5rem; }.route-subtitle { color:#65727b; }.route-meta { display:flex; flex-wrap:wrap; gap:1rem; margin:1rem 0; }.route-meta div { min-width:5rem; }.route-meta dt { font-size:.75rem; color:#65727b; }.route-meta dd { margin:0; font-weight:700; }.route-card-link { margin-top:auto; text-align:center; }.route-empty { padding:2rem; background:var(--route-card); border:1px dashed var(--route-line); border-radius:1rem; }.route-pagination { display:flex; justify-content:center; gap:1.5rem; align-items:center; margin-top:2rem; }
.route-hero { width:100%; max-height:32rem; object-fit:cover; border-radius:1rem; }.route-detail article { max-width:850px; margin:auto; }.route-lead { font-size:1.25rem; }.route-summary { font-size:1.15rem; }.route-copy { max-width:72ch; }.route-stops { padding:0; list-style:none; display:grid; gap:1.25rem; }.route-stop { display:grid; grid-template-columns:3rem minmax(0,1fr); gap:1rem; padding:1.25rem; background:var(--route-card); border:1px solid var(--route-line); border-radius:1rem; }.route-stop-marker { display:grid; place-items:center; width:2.5rem; height:2.5rem; border-radius:50%; background:var(--route-accent); color:#fff; font-weight:800; }.route-stop h3 { margin:0; }.route-stop h3 span { font-size:.8rem; color:#65727b; }.route-stop-place { margin:.25rem 0 1rem; }.route-artworks { padding-left:1.25rem; }
.route-map-section { margin:2.5rem 0; }.route-map-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(15rem,1fr); gap:1rem; }.route-map { min-height:24rem; overflow:hidden; border:1px solid var(--route-line); border-radius:1rem; background:#e8dfd3; }.route-map-panel { min-height:12rem; padding:1rem; background:var(--route-card); border:1px solid var(--route-line); border-radius:1rem; }.route-map-panel h3 { margin-top:0; }.route-map-status { color:#65727b; }.route-map-status[data-state="error"] { color:#8b2e21; font-weight:700; }.route-map-attribution { color:#65727b; font-size:.75rem; }.route-map-marker { display:grid; place-items:center; width:2rem; height:2rem; border:2px solid #fff; border-radius:50%; background:var(--route-accent); color:#fff; box-shadow:0 2px 6px rgb(0 0 0 / 30%); font-weight:800; cursor:pointer; }.route-map-marker[aria-current="true"] { background:#1d6a82; transform:scale(1.15); }.route-stop[data-selected="true"] { border-color:#1d6a82; box-shadow:0 0 0 3px rgb(29 106 130 / 18%); }.route-stop-select { margin-top:1rem; padding:.55rem .75rem; border:1px solid var(--route-line); border-radius:.5rem; background:#fff; color:var(--route-ink); cursor:pointer; font-weight:700; }.route-stop-select:focus-visible,.route-map-marker:focus-visible { outline:3px solid #1d6a82; outline-offset:3px; }
.route-google-maps-link { display:inline-flex; align-items:center; gap:.45rem; margin-top:1rem; padding:.75rem 1rem; border-radius:.55rem; background:var(--route-accent); color:#fff; font-weight:800; text-decoration:none; }.route-google-maps-link:hover { filter:brightness(.94); }.route-google-maps-link:focus-visible { outline:3px solid #1d6a82; outline-offset:3px; }.route-google-maps-note,.route-google-maps-unavailable { color:#65727b; font-size:.85rem; margin:.5rem 0 0; }.route-google-maps-unavailable { color:#8b2e21; }
.route-preview-notice { display:grid; gap:.2rem; margin:0 auto 1.5rem; max-width:850px; padding:1rem 1.15rem; border:2px solid #1d6a82; border-radius:.8rem; background:#eaf4f5; color:#173f4b; }.route-preview-label { color:#65727b; font-size:.85em; font-style:italic; }
.visually-hidden,.route-skip-link:not(:focus) { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }.route-skip-link:focus { position:fixed; top:.75rem; left:.75rem; z-index:3; padding:.7rem; background:#fff; }
:focus-visible { outline:3px solid #1d6a82; outline-offset:3px; }
@media (max-width:1100px) { .route-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }.route-filter-field--search { grid-column:span 2; } }
@media (max-width:800px) { .route-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.route-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.route-filter-field--search { grid-column:span 2; } }
@media (max-width:560px) { .route-shell { padding-inline:1rem; }.route-header { align-items:flex-start; flex-direction:column; padding-bottom:1.5rem; }.route-grid { grid-template-columns:1fr; }.route-filters { grid-template-columns:1fr; gap:.8rem; }.route-filter-field--search { grid-column:auto; }.route-filters button { width:100%; }.route-pagination { flex-wrap:wrap; }.route-stop { grid-template-columns:2.5rem minmax(0,1fr); padding:.9rem; } }
@media (max-width:700px) { .route-map-layout { grid-template-columns:1fr; }.route-map { min-height:20rem; }.route-map-panel { min-height:0; } }
@media (prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } }
/* PATCH-064 — route map: the home map control look (tokens copied from map.css :root, a test keeps them equal) */
#route-map { --map-control-bg:rgb(255 248 239 / 96%); --map-control-border:rgb(122 31 18 / 22%); --map-control-shadow:0 0.3rem 0.9rem rgb(70 45 35 / 18%); background:#f5e7e1; }
#route-map .maplibregl-ctrl-group { background:var(--map-control-bg); border:1px solid var(--map-control-border); border-radius:999px; box-shadow:var(--map-control-shadow); overflow:hidden; }
#route-map .maplibregl-ctrl-group button { width:44px; height:44px; background-color:transparent; transition:background-color 120ms ease, transform 120ms ease; }
#route-map .maplibregl-ctrl-group button + button { border-top-color:rgb(122 31 18 / 14%); }
#route-map .maplibregl-ctrl-group button:hover { background-color:rgb(122 31 18 / 7%); }
#route-map .maplibregl-ctrl-group button:active { transform:scale(0.94); }
@media (prefers-reduced-motion:reduce) { #route-map .maplibregl-ctrl-group button { transition:none!important; } }
/* PATCH-067 — «Torna alla mappa»: the PATCH-062 floating shortcut (48 px round, bottom right, safe area, z-index 40) in the route page tokens.
   route_detail_map.js shows it only while the map is out of view; hidden it is display:none, so never reachable with Tab. It appears and disappears at once: no motion effect. */
.route-back-to-map { position:fixed; right:max(1rem,calc(env(safe-area-inset-right) + .75rem)); bottom:max(1rem,calc(env(safe-area-inset-bottom) + .75rem)); z-index:40; display:inline-flex; align-items:center; justify-content:center; width:3rem; height:3rem; margin:0; padding:0; border:2px solid var(--route-card); border-radius:999px; background:var(--route-accent); color:#fff; box-shadow:0 .4rem 1.2rem rgb(36 31 28 / 28%); cursor:pointer; }
.route-back-to-map[hidden] { display:none; }
.route-back-to-map:hover { filter:brightness(.94); }
.route-back-to-map:focus-visible { outline:3px solid #1d6a82; outline-offset:3px; }
.route-back-to-map svg { width:1.4rem; height:1.4rem; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.route-detail[data-back-to-map="ready"] { padding-bottom:calc(5.5rem + env(safe-area-inset-bottom)); }
@media print { .route-back-to-map { display:none!important; } }
.route-detail .route-stop {
    grid-template-columns: 3rem minmax(0, 1fr) minmax(8rem, 25%);
    align-items: start;
}
.route-stop-preview {
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 8 / 5;
    background: #ebe7e1;
    border-radius: .65rem;
    color: #514b45;
    padding: 0;
    font-size: .8rem;
    text-align: center;
}
.route-stop-preview img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}
.route-stop-preview span { padding: .5rem; }
@media (max-width: 560px) {
    .route-detail .route-stop { grid-template-columns: 2.5rem minmax(0, 1fr); }
    .route-stop-copy { grid-column: 2; grid-row: 2; }
    .route-stop-preview { grid-column: 2; grid-row: 1; }
}
