.route-sheet-header{display:none}
body:not(.raku) #routePanel{display:flex;flex-direction:column;overflow:hidden;padding:0}
body:not(.raku) #routePanel[hidden]{display:none}
body:not(.raku) .route-sheet-header{display:block;flex:none;padding:0 14px 10px;touch-action:none}
body:not(.raku) .route-sheet-header>.panel-title{margin:0 0 4px;gap:10px}body:not(.raku) .route-sheet-header h2{font-size:18px}body:not(.raku) .route-sheet-header .icon-button{width:36px;height:36px}
body:not(.raku) .route-sheet-content{min-height:0;overflow:auto;overscroll-behavior-y:contain;padding:0 14px 14px;-webkit-overflow-scrolling:touch}
body:not(.raku) .route-sheet-content[hidden]{display:none}
.route-sheet-handle{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:28px;background:transparent;border:0;color:var(--muted);font-size:12px}
.route-sheet-handle i{display:block;width:40px;height:5px;border-radius:8px;background:currentColor;opacity:.5}
.route-sheet-tools{display:flex;gap:8px;touch-action:manipulation}
.route-sheet-tools button{flex:1;min-width:0;min-height:36px;padding:6px;border-radius:9px;font-size:13px;font-weight:700;background:var(--surface);color:var(--ink);border:1px solid var(--line)}
.route-sheet-tools button:disabled{opacity:.45}
body:not(.raku) #app #routePanel[data-sheet-state=full]{inset:calc(8px + var(--safe-top)) 8px calc(8px + var(--safe-bottom));width:auto;height:auto;max-height:none;z-index:40;border-radius:16px}
body:not(.raku) #routePanel[data-sheet-state=full] .route-sheet-content{flex:1}
body:not(.raku) #app:has(#routePanel[data-sheet-state=full]:not([hidden])) .map-controls{display:none}
body:not(.raku) #app #routePanel[data-sheet-state=map]{top:auto;bottom:calc(12px + var(--safe-bottom));height:auto;max-height:none}
body:not(.raku) #routePanel[data-sheet-state=map] .route-sheet-header{padding-bottom:10px}
.route-arrival-note{font-size:12px;color:var(--muted);line-height:1.5;margin:6px 0 10px}
.route-arrivals{display:grid;gap:5px;width:100%;grid-column:1/-1;margin-top:6px;text-align:left}
.route-arrival-row{display:flex;justify-content:space-between;align-items:baseline;gap:10px;color:var(--muted);font-size:13px;line-height:1.45}
.route-arrival-row>span{min-width:0;overflow-wrap:anywhere}
.route-arrival-row>strong{flex:none;color:var(--ink);font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap}
.route-arrival-row.arrival-final{border-top:1px solid var(--line);padding-top:5px;color:var(--ink);font-weight:700}
.route-confirm-arrival{padding:12px;border:1px solid var(--line);border-radius:12px;margin:12px 0;background:var(--surface)}
.route-confirm-arrival>h4{margin:0;font-size:14px}.route-confirm-arrival .route-arrival-note{margin-bottom:2px}
.route-smart-ic{display:flex;align-items:center;gap:8px;padding:9px 0;font-size:14px;line-height:1.5}.route-smart-ic input{width:20px;height:20px;flex:none;accent-color:var(--accent)}
.saved-waypoints{display:block;color:var(--accent);line-height:1.5;margin-top:4px;overflow-wrap:anywhere}
.drive-log-fields>.drive-log-itinerary{grid-column:1/-1}.drive-log-itinerary dd{white-space:pre-line}
body.raku .route-sheet-content{display:contents}
body.raku .route-arrival-row{font-size:15px}body.raku .route-arrival-row>strong{font-size:17px}
body.raku .route-smart-ic{font-size:17px;min-height:44px}
body.raku .route-arrival-note{font-size:14px}
@media(max-width:600px){body:not(.raku) #app #routePanel[data-sheet-state=half]{top:auto;bottom:calc(12px + var(--safe-bottom));left:12px;right:12px;width:auto;max-height:56dvh}}
@media(orientation:landscape) and (max-height:520px){body:not(.raku) #app #routePanel[data-sheet-state=half]{top:calc(8px + var(--safe-top));bottom:calc(8px + var(--safe-bottom));left:12px;right:auto;width:315px;max-height:none}body:not(.raku) #app #routePanel[data-sheet-state=map]{left:12px;right:auto;width:315px}}

body:not(.raku) .route-sheet-content>.route-place{padding:8px 0;margin:0;gap:10px}body:not(.raku) .route-sheet-content>.route-place small{display:none}body:not(.raku) .route-sheet-content>.route-place h3{font-size:17px}
body:not(.raku) #routePanel .search-conditions{margin:4px 0 8px}body:not(.raku) #routePanel .route-arrival-note{margin:4px 0 8px;font-size:11px}

.route-choice .route-arrivals{margin:8px 0 0}.route-choice .route-arrival-row{font-size:13px;margin:0}.route-choice .route-arrival-row>span{font-size:13px;margin:0;color:inherit}

@media(max-width:600px) and (orientation:portrait){body:not(.raku) #app #routeConfirmPanel{max-height:62dvh}}

body.raku #routeChoices .raku-route-choice{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:4px 8px;padding:10px;min-height:86px;align-items:center;justify-items:start;text-align:left;overflow:hidden}
body.raku #routeChoices .raku-route-choice>strong{font-size:22px;line-height:1.2;grid-column:1;grid-row:1}
body.raku #routeChoices .raku-route-choice>span:not(.route-arrivals){font-size:16px;grid-column:2;grid-row:1;white-space:nowrap}
body.raku #routeChoices .raku-route-choice>small{font-size:14px;grid-column:1;grid-row:2;margin:0}
body.raku #routeChoices .raku-route-choice .route-arrivals{grid-column:2;grid-row:2;margin:0;width:auto;display:block}
body.raku #routeChoices .raku-route-choice .route-arrival-row{border:0;padding:0;gap:5px;white-space:nowrap}
body.raku #routeChoices .raku-route-choice .route-arrival-row>span{font-size:13px;color:#fff}
body.raku #routeChoices .raku-route-choice .route-arrival-row>strong{font-size:18px;color:#fff;line-height:1.3}
body.raku #routePanel .route-arrival-note{margin:0;font-size:13px;line-height:1.4}
body.raku .raku-route-conditions-button{font-size:14px;min-height:40px;padding:6px;margin-left:auto}
@media(orientation:landscape) and (max-height:520px){body.raku #routeChoices .raku-route-choice{grid-template-columns:1fr;grid-template-rows:repeat(4,auto);justify-items:center;text-align:center;align-content:center}body.raku #routeChoices .raku-route-choice>strong{grid-column:1;grid-row:1;font-size:18px}body.raku #routeChoices .raku-route-choice>span:not(.route-arrivals){grid-column:1;grid-row:2;font-size:15px}body.raku #routeChoices .raku-route-choice>small{grid-column:1;grid-row:3;font-size:13px}body.raku #routeChoices .raku-route-choice .route-arrivals{grid-column:1;grid-row:4}body.raku .raku-route-conditions-button{min-height:32px}}

/* Compact route results: one choice and an independent detail control. */
#routeChoices{display:grid;gap:9px}
.route-result-card{position:relative;min-width:0;display:flex;border:1px solid var(--line);border-left:4px solid var(--route-color);border-radius:16px;background:var(--surface);overflow:hidden}
.route-result-card.selected{border-color:var(--route-color);box-shadow:inset 0 0 0 1px var(--route-color)}
#routeChoices .route-result-select{display:grid;gap:7px;flex:1;min-width:0;padding:12px 54px 12px 14px;text-align:left;background:transparent;color:var(--ink);border:0;border-radius:0;box-shadow:none;text-shadow:none}
.route-result-heading{display:flex;gap:8px;align-items:center;font-size:12px;font-weight:750;color:var(--muted)}
.route-result-name{min-width:0;overflow-wrap:anywhere}.route-selected-mark{color:var(--accent);font-size:15px}
.route-result-metrics{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;font-variant-numeric:tabular-nums}
.route-result-metrics>strong{font-size:26px;line-height:1.2;letter-spacing:-.6px;overflow-wrap:anywhere}.route-result-metrics>span{font-size:13px;color:var(--muted);white-space:nowrap}
.route-tags{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.route-tag{display:inline-flex;align-items:center;gap:4px;border-radius:6px;padding:4px 6px;font-size:11px;font-weight:750;line-height:1.15;white-space:nowrap;border:1px solid transparent}
.route-tag svg{width:14px;height:14px;flex:none}
.tag-free{color:#106948;background:#e6f4ec;border-color:#c1e3d0}.tag-highway{color:#285daa;background:#e9f1ff;border-color:#cdddf6}.tag-toll{color:#92550d;background:#fff1d9;border-color:#f1d4a3}.tag-unknown,.tag-ferry{color:#5b5969;background:#f0eff4;border-color:#dcdbe5}
#routeChoices .route-detail-button,.route-map-compact .route-detail-button{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;border:0;border-radius:12px;background:transparent;color:var(--ink);box-shadow:none;text-shadow:none}
.route-detail-button .icon{width:21px;height:21px}.route-detail-button:hover{background:#809a921a!important}
.route-result-select .route-arrivals{display:block;margin:0;width:auto}
.route-result-select .route-arrival-row{display:flex;justify-content:flex-start;align-items:baseline;flex-wrap:wrap;gap:4px 6px;font-size:11px;line-height:1.3;border:0;padding:0;font-weight:400}
.route-result-select .route-arrival-row>strong{font-size:13px;font-weight:650;color:var(--muted)}
#routePanel .route-sheet-content>.route-arrival-note{display:none}
#routePanel #routeSearchStatus{font-size:11px;margin:4px 0 8px;color:var(--muted)}
#routePanel .route-secondary{margin-top:10px}
.route-map-bubble.route-map-compact{width:200px;min-height:0;display:block;padding:0;border-width:1.5px;border-radius:14px;line-height:1.25}
.route-map-compact .route-bubble-select{display:grid;gap:5px;width:100%;min-height:82px;padding:9px 46px 9px 10px;text-align:left;background:transparent;color:inherit;border:0;border-radius:12px}
.route-map-compact .route-bubble-name{font-size:11px;font-weight:700;color:inherit;overflow-wrap:anywhere}
.route-map-compact strong.route-bubble-time{font-size:19px;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.4px}
.route-map-compact .route-tags{gap:4px}.route-map-compact .route-tag{font-size:10px;padding:3px 4px;gap:3px}.route-map-compact .route-tag svg{width:12px;height:12px}
.route-map-compact .route-detail-button{right:2px;color:inherit;border-left:1px solid #91a59b50;border-radius:0}
.route-map-compact.selected{background:var(--surface);color:var(--ink);border-color:var(--route-color);box-shadow:0 3px 12px #153e3830,inset 0 0 0 1px var(--route-color)}
.route-details-dialog{padding:0;width:min(460px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);overflow:auto}
.route-details-dialog .dialog-heading{position:sticky;top:0;z-index:1;background:var(--surface);padding:12px 16px;border-bottom:1px solid var(--line);margin:0;display:flex;align-items:center;justify-content:space-between;gap:8px}
.route-details-dialog .dialog-heading h2{font-size:18px}.route-details-dialog .icon-button{width:44px;height:44px}
.route-details-body{padding:16px;overflow-wrap:anywhere}.route-detail-profile{font-size:13px;color:var(--muted);margin-bottom:8px}
.route-detail-metrics{font-size:27px;font-weight:800;margin:0 0 12px;font-variant-numeric:tabular-nums}.route-detail-metrics>span{font-size:14px;font-weight:500;color:var(--muted)}
.route-details-body h3{font-size:14px;margin:0 0 8px}.route-detail-fuel dl{margin:0}.route-detail-fuel dl>div{display:grid;grid-template-columns:80px minmax(0,1fr);gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.6}
.route-detail-fuel dt{color:var(--muted)}.route-detail-fuel dd{margin:0;font-weight:700}.route-detail-comparison{padding-top:14px}.route-detail-comparison p{font-size:13px;line-height:1.6}
body.night .tag-free{background:#193e30;color:#abebc8;border-color:#3b6952}body.night .tag-highway{background:#203854;color:#b6d4ff;border-color:#476288}body.night .tag-toll{background:#473720;color:#f7d59d;border-color:#715934}body.night .tag-unknown,body.night .tag-ferry{background:#353541;color:#dddded;border-color:#606071}
body[data-text-size=large] .route-result-metrics>strong{font-size:29px}body[data-text-size=large] .route-tag{font-size:12px}body[data-text-size=large] .route-result-heading{font-size:14px}
body.raku #routeChoices .route-result-card{border-radius:9px}
body.raku #routeChoices .route-result-select{gap:6px;padding:10px 50px 10px 10px}
body.raku #routeChoices .route-result-metrics>strong{font-size:25px}
body.raku #routeChoices .route-result-heading{font-size:15px}
body.raku #routeChoices .route-result-select .route-arrival-row>span{color:var(--muted);font-size:12px}body.raku #routeChoices .route-result-select .route-arrival-row>strong{color:var(--muted);font-size:14px}
@media(max-width:759px){.route-map-bubble.route-map-compact{width:180px}.route-map-compact .route-bubble-select{padding-right:44px}.route-map-compact strong.route-bubble-time{font-size:18px}}
@media(max-width:350px){.route-result-metrics>strong{font-size:23px}body[data-text-size=large] .route-result-metrics>strong{font-size:25px}#routeChoices .route-result-select{padding-left:10px;padding-right:48px}.route-result-metrics{gap:3px 7px}}
@media(orientation:landscape) and (max-height:520px){body.raku #routeChoices .route-result-select{padding:8px 6px 46px;gap:6px}body.raku #routeChoices .route-result-metrics>strong{font-size:20px}body.raku #routeChoices .route-result-metrics>span{font-size:12px}body.raku #routeChoices .route-detail-button{top:auto;bottom:0;right:calc(50% - 22px);transform:none}body.raku #routeChoices .route-tag{font-size:10px}}
body:not(.raku) #routeChoices .route-result-select{grid-template-columns:minmax(0,1fr) auto;gap:6px 8px}
body:not(.raku) .route-result-heading{grid-column:1;grid-row:1}
body:not(.raku) .route-result-metrics{grid-column:1/-1;grid-row:2}
body:not(.raku) .route-result-select>.route-tags{grid-column:1/-1;grid-row:3}
body:not(.raku) .route-result-select>.route-arrivals{grid-column:2;grid-row:1;align-self:center}
body:not(.raku) .route-result-select .route-arrival-row{gap:4px;justify-content:flex-end}
body:not(.raku) .route-result-select .route-arrival-row>span{font-size:10px}
body:not(.raku) #routePanel #routeSearchStatus{text-align:left;line-height:1.4}
.route-details-dialog .route-detail-metrics{font-size:27px;line-height:1.3;font-weight:800;margin:0 0 12px}
body.raku #routeChoices{grid-template-rows:repeat(3,minmax(min-content,1fr));overflow-y:auto;overscroll-behavior-y:contain}
@media(max-width:350px) and (orientation:portrait){
 body.raku #routeChoices .route-result-select{grid-template-columns:minmax(0,1fr) auto;padding:6px 48px 6px 8px;gap:4px 6px}
 body.raku .route-result-heading{grid-column:1;grid-row:1;font-size:13px!important}
 body.raku .route-result-metrics{grid-column:1/-1;grid-row:2}
 body.raku #routeChoices .route-result-metrics>strong{font-size:22px}
 body.raku .route-result-select>.route-tags{grid-column:1/-1;grid-row:3}
 body.raku .route-result-select>.route-arrivals{grid-column:2;grid-row:1;align-self:center}
 body.raku #routeChoices .route-result-select .route-arrival-row{gap:3px;justify-content:flex-end}
 body.raku #routeChoices .route-result-select .route-arrival-row>span{font-size:9px}
 body.raku #routeChoices .route-result-select .route-arrival-row>strong{font-size:11px}
 body.raku #routeChoices .route-tag{font-size:10px;padding:3px 5px}
}
@media(orientation:landscape) and (max-height:520px){body.raku #routeChoices{grid-template-rows:minmax(min-content,1fr)}}

/* Route confirmation shares the same minimal hierarchy as the candidates. */
#routeConfirmPanel #confirmSummary{font-size:28px;line-height:1.3;margin:12px 0}
#routeConfirmPanel .confirm-tags{margin:0 0 10px}
#routeConfirmPanel #confirmArrival{padding:10px 12px;margin:10px 0;background:transparent}
#routeConfirmPanel #confirmArrival .route-arrival-row{border:0;padding:0}
#routeConfirmPanel .confirm-details-button{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:44px;padding:10px;margin:12px 0;font-size:14px}
.route-detail-fuel{border-top:1px solid var(--line);margin-top:16px;padding-top:14px}
.route-detail-fuel>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.route-detail-fuel h3{margin:0}.route-detail-fuel strong{font-size:17px;line-height:1.4}
.route-detail-fuel button{min-height:44px;padding:9px 12px;font-size:13px;margin-top:4px}
.fuel-settings-dialog{width:min(400px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;background:var(--surface);color:var(--ink)}
.fuel-settings-dialog label{display:block;margin:14px 0;font-size:15px}.fuel-settings-dialog input{display:block;width:100%;min-width:0;min-height:44px;margin-top:6px;padding:8px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:8px}
body.raku #routeConfirmPanel #confirmArrival{display:block;margin:0;padding:8px;border:1px solid var(--line)}
body.raku #routeConfirmPanel #confirmDetailsButton{margin:0;min-height:46px;grid-column:1}
@media(orientation:landscape) and (max-height:520px){body.raku #routeConfirmPanel #confirmArrival{grid-column:1;grid-row:4}body.raku #routeConfirmPanel #confirmDetailsButton{grid-column:1;grid-row:5}body.raku #routeConfirmPanel .confirm-scroll{grid-template-rows:auto auto auto auto auto}}
