*{box-sizing:border-box}[hidden]{display:none!important}:root{--ink:#142c50;--blue:#1459df;--muted:#536983;--line:#dce6f3}body{margin:0;background:#f1f6ff;color:var(--ink);font:15px/1.5 system-ui,-apple-system,sans-serif}main{max-width:920px;margin:auto;padding:18px 18px 110px}header{display:flex;align-items:center;gap:12px;margin-bottom:18px}header img{border-radius:16px}h1,h2,h3,p{margin:0 0 10px}h1{font-size:25px;letter-spacing:-1.2px;margin:0}h1 em{font-style:normal;color:var(--blue)}header small{font-size:9px;letter-spacing:1px;color:var(--muted);font-weight:800}.livepill{margin-left:auto;background:#e0f5ed;color:#116747;padding:7px 10px;border-radius:30px;font-size:10px;font-weight:800}.hero{position:relative;overflow:hidden;background:linear-gradient(120deg,#1246c5,#1978ed);color:white;padding:22px;border-radius:26px;box-shadow:0 12px 30px #1655d326}.hero small{font-size:10px;letter-spacing:2px;font-weight:800}.hero h2{font-size:clamp(25px,4vw,38px);line-height:1.12;letter-spacing:-1.3px;margin:9px 0;max-width:70%;position:relative}.hero p{font-size:13px;max-width:70%;position:relative;color:#e1efff}.heroart{position:absolute;width:32%;right:-10px;top:25px;transform:rotate(-9deg)}.heroart svg{width:100%;filter:drop-shadow(0 12px 8px #092b7655)}button,.button{border:0;border-radius:13px;background:var(--blue);color:white;padding:12px 16px;font:inherit;font-weight:750;cursor:pointer;text-decoration:none;display:inline-block}button:focus-visible,a:focus-visible{outline:3px solid #ff9b31;outline-offset:3px}button:disabled{opacity:.6}.hero button{background:#ffbd58;color:#182b47;position:relative}#status{font-size:11px;margin:10px 0 0;max-width:100%}nav{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:18px 0;background:white;padding:8px;border-radius:20px;box-shadow:0 5px 24px #2446750b}nav button{display:flex;flex-direction:column;align-items:center;gap:4px;background:transparent;color:var(--muted);font-size:11px;padding:8px 3px}nav svg{width:23px;height:23px}nav button.active{background:#e8f0ff;color:#1249bd}section:not(.hero){background:white;border:1px solid #e2eaf5;border-radius:24px;padding:20px;margin-bottom:15px;box-shadow:0 8px 28px #24467508}.sectionhead{display:flex;align-items:center;justify-content:space-between}.sectionhead small{font-size:10px;letter-spacing:1.5px;color:var(--blue);font-weight:800}.sectionhead h2{font-size:24px;letter-spacing:-.8px}.sectionhead>span{font-size:11px;color:var(--muted);background:#eef4ff;padding:6px 10px;border-radius:20px}.legend,.station{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) 32px;gap:8px;align-items:center}.legend{font-size:11px;font-weight:800;color:var(--muted);padding:10px 0;border-bottom:1px solid var(--line)}.station{position:relative;padding:10px 0;border-bottom:1px solid #edf2f9;min-height:72px}.station:last-child{border:0}.station strong{position:relative;padding-left:19px;font-size:13px;line-height:1.25;align-self:stretch;display:flex;align-items:center}.station strong:before{content:'';position:absolute;left:0;top:calc(50% - 5px);width:10px;height:10px;background:white;border:3px solid var(--blue);border-radius:50%;z-index:1}.station strong:after{content:'';position:absolute;left:4px;top:-11px;bottom:-11px;width:3px;background:#a9c6ff}.station:first-child strong:after{top:50%}.station:last-child strong:after{bottom:50%}.departure{background:#edf5ff;border-radius:12px;padding:8px;min-height:52px}.departure:nth-child(3){background:#e5f8f5}.departure b{display:block;font-size:clamp(18px,4vw,26px);line-height:1.15;letter-spacing:-.8px;font-variant-numeric:tabular-nums}.departure small{display:block;font-size:10px;color:var(--muted);overflow-wrap:anywhere}.departure.warn{background:#fff0dc;color:#934a00}.star{background:transparent;color:#a16a00;padding:5px;font-size:24px}.journey{background:#f1f6ff;border-radius:18px;padding:16px;margin:12px 0}.times{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.time{background:white;border-radius:12px;padding:10px;text-align:center}.time b{display:block;font-size:23px}.time small{font-size:11px}.time:first-child{background:#dceaff}label{display:block;font-weight:700;margin:12px 0}input,select{display:block;width:100%;padding:12px;border:1px solid #cbd9ec;border-radius:12px;background:#f5f8ff;color:var(--ink);font:inherit;margin-top:5px}form{margin-bottom:22px}#prefs{display:grid;gap:4px}#share p,#settings p{color:var(--muted);margin:10px 0 16px}.qr{display:block;width:180px;height:180px;object-fit:contain;margin:15px auto;background:white;border:1px solid var(--line);padding:8px;border-radius:14px}a{color:#1249bd}footer{font-size:11px;color:var(--muted)}#loading{position:fixed;inset:0;background:#102b60b8;backdrop-filter:blur(5px);display:grid;place-items:center;padding:20px;z-index:99999}#loading>div{background:white;color:var(--ink);border-radius:28px;padding:25px;text-align:center;width:min(100%,390px);box-shadow:0 20px 70px #001e6650}#loading h2{font-size:23px;line-height:1.2}#loading p{font-size:13px;color:var(--muted)}.track{height:115px;position:relative;overflow:hidden;margin-bottom:20px;background:linear-gradient(#e9f4ff 75%,#d1ddeb 75%);border-radius:18px;border-bottom:5px solid #7d91ad}.track:before{content:'METROMARE • STAZIONE';position:absolute;top:8px;left:0;right:0;font-size:9px;letter-spacing:2px;font-weight:800;color:#41658e}.track svg{position:absolute;width:155px;height:75px;left:calc(50% - 77px);bottom:4px;animation:ride 3s infinite ease-in-out}@keyframes ride{0%{transform:translateX(-260px)}35%,65%{transform:translateX(0)}100%{transform:translateX(260px)}}@media(prefers-reduced-motion:reduce){.track svg{animation:none}}@media(min-width:650px){.station strong{font-size:17px}.departure{padding:10px 15px}.departure small{font-size:12px}#prefs{grid-template-columns:1fr 1fr}#prefs button{grid-column:1/-1;justify-self:start}}@media(max-width:600px){main{padding:12px 10px 100px}section:not(.hero){padding:12px}.hero{padding:17px}nav{position:fixed;bottom:0;left:0;right:0;margin:0;border-radius:20px 20px 0 0;z-index:5;padding:8px 10px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -5px 30px #183d7020}.legend,.station{gap:5px}.departure{padding:7px 5px}.sectionhead h2{font-size:21px}.station strong{font-size:12px}.heroart{top:30px}}

svg.qr{display:block;width:220px;height:220px;max-width:100%;margin:20px auto;background:white;padding:8px;box-sizing:border-box;}
/* MetroMare 4 — route-first */
:root{--ink:#10284c;--blue:#1359c9;--muted:#526984;--line:#dbe6f5}body{background:#eaf1fc}main{max-width:780px;padding:0 14px 115px}header{background:#092c60;color:white;margin:0 -14px;padding:18px 16px;gap:10px;border-radius:0 0 25px 25px;box-shadow:0 8px 24px #123f7622}header h1{font-size:26px;letter-spacing:-1px}header h1 em{color:#ffb64b}header small{color:#c6dbfa;letter-spacing:.6px}header img{width:48px;height:48px} .livepill{background:#ffffff16;color:#e4efff;font-size:9px;white-space:nowrap}.hero{display:flex;justify-content:space-between;align-items:center;gap:12px;background:transparent;color:var(--ink);box-shadow:none;padding:17px 3px 12px;border-radius:0}.hero small{letter-spacing:1px;color:var(--blue)}.hero p,#status{color:var(--muted);max-width:none;margin:3px 0 0;font-size:11px}.hero button{background:#ffb347;white-space:nowrap;padding:10px 12px;font-size:13px}section:not(.hero){border:0;border-radius:23px;padding:15px;box-shadow:0 5px 20px #1a4c8d0b}.sectionhead h2{font-size:23px;margin:3px 0 10px}.sectionhead>span{white-space:nowrap}.legend,.station{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) 30px;gap:6px}.legend{padding:8px 6px}.station{min-height:66px;padding:7px 5px;border:0;border-radius:11px;margin:0}.station:nth-child(odd){background:#edf4ff}.station strong{padding-left:27px;font-size:14px;line-height:1.2}.station strong:before{width:15px;height:15px;left:0;top:calc(50% - 8px);border:3px solid #124b9e;background:#fff}.station:nth-child(3n+1) strong:before{background:#ffb347}.station strong:after{left:6px;width:4px;background:#1459c9;top:-8px;bottom:-8px}.departure,.departure:nth-child(3){background:transparent;padding:5px 2px;min-height:42px}.departure b{font-size:23px;color:#103a76;letter-spacing:-.7px}.departure:nth-child(3) b{color:#176d79}.departure small{font-size:10px;line-height:1.2}.departure.warn{background:#fff0dc}.star{color:#a8b9cf;padding:0;min-height:40px}.star[aria-pressed=true]{color:#e99813}nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,780px);margin:0;z-index:10;border-radius:22px 22px 0 0;padding:8px 10px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -5px 25px #173b7025}nav button.active{background:#1359c9;color:white}nav button{min-height:55px}#loading>div{border:3px solid #bcd7ff}.track svg{width:170px;height:80px;left:calc(50% - 85px);display:block;animation:ride4 3s infinite ease-in-out}@keyframes ride4{0%{transform:translateX(-220px)}30%,75%{transform:translateX(0)}100%{transform:translateX(220px)}}@media(prefers-reduced-motion:reduce){.track svg{animation:none}}@media(max-width:420px){main{padding-left:8px;padding-right:8px}header{margin-left:-8px;margin-right:-8px}section:not(.hero){padding:10px}.station strong{font-size:12px;padding-left:23px}.departure b{font-size:20px}.legend,.station{gap:3px;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) 27px}.departure small{font-size:9px}.livepill{display:none}} 

/* v5 */
body{background:#f4f7fb}main{max-width:850px}header{border-radius:0 0 20px 20px;background:linear-gradient(115deg,#092c60,#164c9e)}.station{min-height:62px;border-radius:0;border-bottom:1px solid #e6edf6}.station:nth-child(odd){background:#f6f9ff}.station strong:before,.station:nth-child(3n+1) strong:before{background:white}.station strong.near-ostia:before{background:#ffad35;box-shadow:0 0 0 4px #ffad3533}.station strong.near-roma:before{background:#1bb6ad;box-shadow:0 0 0 4px #1bb6ad33}.station strong.near-ostia.near-roma:before{background:linear-gradient(90deg,#ffad35 50%,#1bb6ad 50%)}.departure.near{background:#fff3df;border-radius:10px}.departure:nth-child(3).near{background:#dcf7f4}.countdown{display:block;font-size:10px;font-weight:700;color:#526984}.mapnote{font-size:11px;color:#526984;line-height:1.5;margin:0 0 10px}.wa{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#087c4b;color:white!important;text-decoration:none;padding:13px 16px;border-radius:13px;font-weight:700}.wa svg{width:22px;height:22px}.shareintro{background:linear-gradient(120deg,#092c60,#1763cc);color:white;padding:24px;border-radius:18px;margin-bottom:20px}.shareintro p{color:#e1edff!important}.shareintro small{letter-spacing:2px;font-size:10px}.shareintro h2{margin:8px 0}.qr{image-rendering:pixelated}#share button,#share .wa{margin:5px 4px 5px 0}#loading[hidden]{display:none!important}#loading:not([hidden]){display:flex!important}.track svg{z-index:2;opacity:1}
.installguides{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:14px;margin:18px 0}.installguides article{background:#edf4ff;border:1px solid #d4e2f5;border-radius:18px;padding:16px}.installguides h3{margin:0 0 12px;color:#1255b8}.installguides p{font-size:.94rem;margin:8px 0;line-height:1.5}

/* v5.5 */
html[data-theme="ocean"]{--blue:#1359c9;--theme-dark:#092c60;--theme-bg:#eaf1fc;--ink:#092c60;}
html[data-theme="forest"]{--blue:#18734d;--theme-dark:#124634;--theme-bg:#edf6ef;--ink:#124634;}
html[data-theme="sunset"]{--blue:#b54b13;--theme-dark:#71330e;--theme-bg:#fff4e9;--ink:#71330e;}
html[data-theme="ruby"]{--blue:#b52c48;--theme-dark:#731c36;--theme-bg:#fff0f3;--ink:#731c36;}
html[data-theme="teal"]{--blue:#087b80;--theme-dark:#104b55;--theme-bg:#e8f7f6;--ink:#104b55;}
html[data-theme="graphite"]{--blue:#48576b;--theme-dark:#202c3a;--theme-bg:#eef1f5;--ink:#202c3a;}
 :root{--theme-dark:#092c60;--theme-bg:#eaf1fc}body{background:var(--theme-bg)}header,.shareintro{background:linear-gradient(115deg,var(--theme-dark),var(--blue))}nav button.active{background:var(--blue)}.station strong:before{border-color:var(--blue)}.station strong:after{background:var(--blue)}.station:nth-child(odd),.journey,.installguides article,input,select{background:var(--theme-bg)}.time:first-child{background:var(--theme-bg);outline:2px solid var(--blue)}.departure b,a,.installguides h3{color:var(--blue)}.departure:nth-child(3) b{color:#176d79}.hero button{background:var(--blue);color:white}#loading:not([hidden]){display:flex!important;align-items:center;justify-content:center}#loading>div{margin:auto;flex:0 1 390px;max-width:100%;border-color:var(--blue)}.theme-panel{border-top:1px solid var(--line);padding:20px 0}.theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.theme-choice{position:relative;background:white;color:var(--ink);border:2px solid var(--line);padding:10px 5px;font-size:12px;display:flex;flex-direction:column;align-items:center;gap:8px}.theme-choice[aria-pressed=true]{border-color:var(--blue);background:var(--theme-bg)}.swatches{display:flex;width:100%;height:26px;border-radius:7px;overflow:hidden}.swatches i{flex:1}.theme-check{visibility:hidden;color:var(--blue)}.theme-choice[aria-pressed=true] .theme-check{visibility:visible}.app-footer{background:var(--theme-dark);color:white;border-radius:20px;padding:20px;margin:18px 0;font-size:12px}.app-footer svg{width:20px;height:20px;flex:none}.footer-brand{display:flex;align-items:center;gap:12px}.footer-brand>svg{width:38px;height:38px;padding:7px;background:#ffffff20;border-radius:12px}.footer-brand strong{display:block;font-size:17px}.footer-brand small{color:#ffffffc9}.footer-links{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.footer-links a,.footer-links button{display:inline-flex;align-items:center;gap:6px;background:#ffffff18;color:white;padding:8px 10px;border-radius:10px;font-size:12px;text-decoration:none}.footer-links svg{width:17px;height:17px}.footer-note{border-top:1px solid #ffffff30;padding-top:12px;display:flex;align-items:flex-start;gap:8px;color:#ffffffd9;line-height:1.5}@media(max-width:360px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* v5.6: floating bottom navigation */
nav.bottom-nav{box-sizing:border-box;left:50%;right:auto;bottom:calc(10px + env(safe-area-inset-bottom,0px));width:min(calc(100% - 20px),620px);transform:translateX(-50%);background:var(--theme-dark);border:1px solid #ffffff25;border-radius:25px;padding:7px;gap:4px;box-shadow:0 12px 32px #14243d40;z-index:10}
.bottom-nav button{--nav-icon-bg:var(--theme-dark);position:relative;min-width:0;min-height:64px;padding:5px 2px 7px;border:0;border-radius:19px;background:transparent;color:#e3eaf3;gap:3px;box-shadow:none;transition:background .18s,color .18s}
.bottom-nav .nav-icon{display:grid;place-items:center;width:48px;height:32px;border-radius:13px;transition:background .18s}
.bottom-nav svg{width:23px;height:23px;display:block}
.bottom-nav .nav-label{font-size:11px;font-weight:700;white-space:nowrap;line-height:1.3}
.bottom-nav button.active{background:#ffffff16;color:white;--nav-icon-bg:var(--blue)}
.bottom-nav button.active .nav-icon{background:var(--blue);box-shadow:0 3px 10px #0002}
.bottom-nav button.active:after{content:'';position:absolute;bottom:3px;width:13px;height:3px;border-radius:4px;background:#ffb347}
.bottom-nav button:focus-visible{outline:2px solid #ffb347;outline-offset:-2px}
main{padding-bottom:calc(110px + env(safe-area-inset-bottom,0px))}
@media(max-width:360px){.bottom-nav .nav-label{font-size:10px}.bottom-nav .nav-icon{width:38px}}
@media(prefers-reduced-motion:reduce){.bottom-nav button,.bottom-nav .nav-icon{transition:none}}

/* v5.7: aligned five-item navigation */
.simple-footer{background:transparent;color:var(--muted);text-align:center;font-size:12px;line-height:1.6;padding:10px 8px;margin:12px 0 0;border:0;box-shadow:none}
nav.bottom-nav{width:calc(min(100%,850px) - 28px);grid-template-columns:repeat(4,minmax(0,1fr));margin:0}
.bottom-nav .nav-label{white-space:normal;text-align:center;overflow-wrap:normal}
.bottom-nav button{justify-content:center;min-height:70px}

@media(max-width:420px){nav.bottom-nav{width:calc(100% - 16px);gap:2px;padding:5px;border-radius:20px}.bottom-nav .nav-label{font-size:10px}.bottom-nav .nav-icon{width:34px}.bottom-nav button{padding-inline:1px;min-height:72px}.bottom-nav svg{width:21px;height:21px}}
@media(max-width:340px){.bottom-nav .nav-label{font-size:9px}}

/* Header icon v5.9 */
header > img{width:80px;height:80px;flex:0 0 80px;object-fit:contain;border-radius:18px;}
header > div{min-width:0;}
@media(max-width:600px){header > img{width:64px;height:64px;flex-basis:64px;border-radius:14px;}header{gap:9px;}header h1{font-size:clamp(18px,5vw,26px);}}
@media(max-width:360px){header .livepill{font-size:8px;padding:5px;}header small{font-size:8px;}}

.legal-links{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:12px;align-items:center}.legal-links a,.legal-links button{color:var(--ink);font-size:12px;font-weight:700;text-decoration:underline;background:none;padding:5px;border:0}.privacy-panel{margin:16px 0;padding:22px;border-radius:24px;background:white;border:1px solid var(--line);box-shadow:0 12px 35px #10283f15}.privacy-actions{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}.privacy-actions button:first-child{background:var(--theme-dark);color:white}.privacy-actions button:last-child{background:var(--theme-dark);color:white}.legal-page{max-width:760px}.legal-hero{background:var(--theme-dark,#10283f);color:white;border-radius:25px;padding:26px;margin:18px 0}.legal-hero small{color:#ffbc65;font-weight:800;letter-spacing:2px}.legal-copy{background:white;border-radius:24px;padding:clamp(18px,4vw,32px);border:1px solid var(--line)}.legal-copy h2{font-size:19px;margin:24px 0 8px}.legal-copy h2:first-child{margin-top:0}.legal-copy p{line-height:1.7}.legal-copy a{color:var(--ink);text-decoration:underline}.legal-page header img{width:64px;height:64px}.legal-page .button{margin-top:18px}
#privacy-panel{margin:0 0 16px;border:2px solid var(--theme-dark,#10283f);padding:18px}#privacy-panel h2{font-size:19px}.privacy-actions{display:grid;grid-template-columns:1fr 1fr}.privacy-actions button{font-size:13px;min-height:46px}.privacy-settings{margin:18px 0;padding:16px;border:1px solid var(--line);border-radius:16px}.privacy-settings button{margin:4px 0;font-size:13px}.privacy-settings a{display:block;margin-top:8px;color:var(--ink)}

#mm-ad-wrap{margin:12px auto;text-align:center;max-width:100%;line-height:0} #mm-ad-wrap[hidden]{display:none!important}

nav.bottom-nav{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-auto-flow:column;gap:2px}.bottom-nav button{width:100%;min-width:0}.bottom-nav .nav-label{font-size:clamp(8px,2.3vw,11px);overflow-wrap:anywhere}.bottom-nav .nav-icon{max-width:100%}.mm-radio{max-width:540px;margin:12px auto;padding:clamp(18px,4vw,32px);border-radius:24px;background:linear-gradient(145deg,var(--theme-dark),#101b2c);color:white;box-shadow:0 12px 30px #10243b30}.mm-radio-top{display:flex;align-items:center;gap:18px}.mm-radio-top>div:last-child{min-width:0}.mm-radio-top h2{color:white;margin:6px 0;font-size:26px}.mm-radio-top small{color:#ffbd66;letter-spacing:1.5px;font-weight:800}.mm-radio-top p{color:#e1e9f4;overflow-wrap:anywhere;margin:0}.mm-radio-logo{width:100px;aspect-ratio:1;flex-shrink:0;border-radius:20px;overflow:hidden;background:#ffffff15}.mm-radio-logo img{width:100%;height:100%;object-fit:contain}.mm-radio-wave{display:flex;align-items:center;justify-content:center;gap:4px;height:85px}.mm-radio-wave i{width:5px;height:var(--h);border-radius:6px;background:#ffb347;opacity:.5;transform:scaleY(.35)}.mm-radio.playing .mm-radio-wave i{animation:mmwave .85s ease-in-out infinite alternate;animation-delay:calc(var(--n)*-67ms);opacity:1}@keyframes mmwave{to{transform:scaleY(1)}}.mm-radio .mm-radio-play{display:block;width:100%;border:0;border-radius:16px;background:#ffb347;color:#14243d;font-weight:800;padding:16px;font-size:16px}.mm-radio #radio-status{text-align:center;color:#e1e9f4;font-size:13px}.mm-radio-note{font-size:12px;color:#d4dfed;margin-bottom:0}.mm-radio-history{border-top:1px solid #ffffff30;margin-top:18px}.mm-radio-history ol{padding-left:22px;font-size:13px}.mm-radio-history li{padding:6px 0;overflow-wrap:anywhere}@media(max-width:380px){.mm-radio-logo{width:76px}.mm-radio-top{gap:12px}}@media(prefers-reduced-motion:reduce){.mm-radio.playing .mm-radio-wave i{animation:none;transform:none}}

.scheduled-status{background:#fff0d6!important;color:#854a00!important;padding:12px;border-radius:12px}.scheduled-departure b,.scheduled-departure small{color:#c17a21!important}
