:root{color-scheme:dark;--bg:#091a2b;--panel:#18364a;--ink:#f2fafc;--muted:#a9c5d0;--line:#376078;--bus:#65d6c4;--ferry:#8cbdeb;--warning:#f3b97a;--button:#25475a;--glow:#16425b;--bus-glow:#65d6c433;--h:100dvh;font:14px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:var(--bg)}body[data-theme=dark]{background:#171b24}body[data-theme=red]{--bg:#100000;--panel:#200303;--ink:#ff4a42;--muted:#ce3933;--line:#641410;--bus:#ff4a42;--ferry:#ff4a42;--warning:#ff6c4d;--button:#3d0906;--glow:#260509;--bus-glow:#ff4a4244}button,input,select{font:inherit;color:inherit}button,select,input{border:1px solid var(--line);border-radius:9px;background:var(--button);min-height:44px}button{cursor:pointer;padding:8px 13px;touch-action:manipulation}button:disabled{opacity:.55;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--ferry);outline-offset:2px}input,select{padding:8px;max-width:100%}input[type=checkbox]{width:25px;min-height:25px;accent-color:var(--bus)}input[type=number]{width:100%;min-width:0}input[type=text]{width:100%}a{color:var(--ferry)}.dashboard{max-width:680px;min-height:var(--h);margin:auto;padding:12px;display:flex;flex-direction:column;gap:8px}.mast{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 8px}.eyebrow{font-size:9px;font-weight:700;letter-spacing:2px;color:var(--muted)}h1{font-size:28px;letter-spacing:-1px;line-height:1.1;margin:2px 0 3px}h1 span{font-weight:400;color:var(--ferry)}.header-right{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.status{font-size:10px;letter-spacing:.6px;font-weight:800;color:var(--bus)}.status.warning{color:var(--warning)}.section-head{display:flex;align-items:center;min-height:22px;gap:5px;padding:0 7px;color:var(--muted)}.section-head h2{margin:0;letter-spacing:1.2px;font-size:10px;font-weight:750;flex:1}.section-head h2 span{color:var(--ferry)}.section-head>span{font-size:10px;white-space:nowrap}.page-button{min-height:28px;padding:2px 8px;font-size:10px;border:0;background:transparent}.rows{display:grid;gap:5px}.bus-section{flex:1}.bus-row,.ferry-row{background:var(--panel);border:1px solid var(--line);border-radius:10px;min-height:55px;padding:8px 10px;display:flex;align-items:center;gap:10px;box-shadow:inset 0 1px 0 #ffffff12}.route-badge{flex:0 0 37px;min-height:31px;background:var(--bus);color:var(--bg);display:grid;place-items:center;border-radius:6px;font-size:20px;font-weight:850;letter-spacing:-.5px;box-shadow:0 0 12px var(--bus-glow)}.stop-copy{flex:1;min-width:0}.stop-copy strong{display:block;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stop-copy small{display:block;font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px}.departures{display:flex;gap:9px;text-align:right;align-items:center;font-variant-numeric:tabular-nums}.departure{min-width:30px}.departure strong{display:block;font-size:20px;color:var(--bus);white-space:nowrap}.departure small{display:block;font-size:9px;color:var(--muted)}.departure:not(:first-child) strong{font-size:15px;color:var(--ink)}.old{opacity:1}.old .departure strong,.old .space strong{color:var(--muted)}.empty{font-size:12px;color:var(--muted);line-height:1.45;padding:12px;border:1px dashed var(--line);border-radius:9px;min-height:45px}.empty button{margin:6px 0 0}.ferry-row{border-left:3px solid var(--ferry)}.ferry-time{font-size:20px;font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}.vessel{flex:1;min-width:0;color:var(--muted);font-size:12px}.vessel span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vessel small{font-size:10px}.space{min-width:89px;text-align:right}.space strong{display:block;color:var(--ferry);font-size:18px;font-variant-numeric:tabular-nums}.space small{font-size:9px;color:var(--muted)}.space.low strong,.cancelled .space strong{color:var(--warning)}.space-bar{height:3px;background:var(--line);margin-top:3px;border-radius:5px;overflow:hidden}.space-bar span{display:block;height:100%;background:var(--ferry);width:var(--space)}.cancelled .ferry-time{text-decoration:line-through}footer{display:flex;justify-content:center;gap:8px;padding:2px clamp(24px,6vw,40px) 4px}footer button{flex:1;font-size:12px;background:var(--button);padding:7px 8px;white-space:nowrap}footer button:hover{border-color:var(--bus)}#notice{padding:5px 10px;border-radius:6px;color:var(--warning);font-size:11px;background:var(--panel)}dialog{width:min(94vw,580px);max-height:calc(var(--h) - 24px);padding:0;border:1px solid var(--line);border-radius:15px;background:var(--bg);color:var(--ink)}dialog::backdrop{background:#000b}.dialog-head{padding:10px 14px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:var(--bg);border-bottom:1px solid var(--line);z-index:1}.dialog-head h2{font-size:18px;margin:0}.close{border:0;background:transparent;width:44px}.dialog-body{padding:12px 17px 24px}.dialog-body h3{font-size:14px;margin:20px 0 8px}.hint{font-size:12px;line-height:1.5;color:var(--muted)}.control-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:8px 0}.control-row select{max-width:60%}label{font-size:13px}.input-row{display:flex;gap:7px;margin:7px 0}.input-row>input,.input-row>label{flex:1;min-width:0}.input-row button{flex-shrink:0}summary{padding:12px 0;cursor:pointer}#search-status{font-size:12px;color:var(--warning)}.favorite,.search-result{padding:10px;margin:8px 0;border:1px solid var(--line);border-radius:9px}.favorite strong,.search-result strong{display:block;font-size:13px}.favorite small,.search-result small{color:var(--muted);font-size:11px}.route-options{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.route-option{display:flex;align-items:center;gap:4px;min-height:44px;padding:4px 8px;background:var(--panel);border-radius:6px}.route-option input{width:19px;min-height:19px}.favorite-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:6px}.favorite-actions button{font-size:12px}.search-result button{margin-top:8px;width:100%}dl{font-size:12px}dl>div{display:flex;gap:12px;justify-content:space-between;padding:7px 0;border-bottom:1px solid var(--line)}dt{color:var(--muted)}dd{margin:0;text-align:right;overflow-wrap:anywhere}#events{padding-left:18px;font-size:11px;color:var(--muted);line-height:1.5}#report{width:100%;height:160px;margin-top:8px}#feed-details p{font-size:12px;line-height:1.5}.attribution{font-size:11px}
@media(max-height:430px){.dashboard{padding:6px;gap:3px}.mast{padding:0 9px}h1{font-size:22px}.eyebrow{font-size:8px}.section-head{min-height:21px}.bus-row,.ferry-row{min-height:43px;padding:5px 8px;gap:8px}.rows{gap:4px}.route-badge{flex-basis:31px;min-height:28px;font-size:18px}.stop-copy strong{font-size:13px}.stop-copy small{font-size:10px;margin-top:2px}.departure strong{font-size:18px}.departure:not(:first-child) strong{font-size:14px}.departure small{font-size:8px}.departures{gap:8px}.ferry-time{font-size:18px}.space strong{font-size:16px}footer{padding-bottom:1px;gap:6px}footer button{font-size:11px}#notice{font-size:10px;padding:3px 8px}}
@media(min-height:600px){.dashboard{padding-top:28px;gap:12px}.rows{gap:9px}.bus-row,.ferry-row{min-height:75px}.stop-copy strong{font-size:18px}.departure strong{font-size:25px}.ferry-time{font-size:25px}.space strong{font-size:22px}}
[hidden]{display:none!important}

@media(max-height:380px){.dashboard{gap:2px}.section-head{min-height:18px}.page-button{min-height:24px}.bus-row{min-height:40px;padding-block:4px}.ferry-row{min-height:37px;padding-block:3px}.mast h1{margin-block:1px}.space-bar{margin-top:2px}}

.source-credit{font-size:10px;line-height:1.3;color:var(--muted);text-align:center;margin:0 20px 6px}
.king-county-mark{display:block;width:91px;height:20px;object-fit:contain;flex:none}
@media(max-height:430px){.king-county-mark{width:78px;height:17px}}
.wsdot-mark{display:block;width:20px;height:20px;object-fit:contain;flex:none}
@media(max-height:430px){.wsdot-mark{width:17px;height:17px}}
.ferry-alerts{border:1px solid var(--line);border-radius:7px;background:var(--panel);margin:2px 0 5px;color:var(--muted)}
.ferry-alerts summary{padding:5px 8px;font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.ferry-alerts.has-alerts summary,.ferry-alerts.has-alerts summary::marker{color:var(--warning)}
#ferry-alerts-list{max-height:160px;overflow:auto;padding:0 9px 6px}
.ferry-alert{padding:6px 0;border-top:1px solid var(--line);font-size:11px;line-height:1.35}
.ferry-alert strong,.ferry-alert small{display:block}.ferry-alert small{color:var(--muted)}.ferry-alert p{margin:4px 0 0;color:var(--ink)}
#ferry-alerts-list>.hint{margin:0}
@media(max-height:430px){.ferry-alerts summary{padding:3px 7px;font-size:10px}#ferry-alerts-list{max-height:90px}}
@media(max-width:600px) and (max-height:430px){
 body[data-view=both] #buses{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}
 body[data-view=both] .bus-row{height:40px;min-height:40px;min-width:0;padding:3px 4px;gap:5px}
 body[data-view=both] .route-badge{flex-basis:26px;min-height:27px;font-size:15px;letter-spacing:-.7px}
 body[data-view=both] .stop-copy strong{font-size:12px}
 body[data-view=both] .stop-copy small{font-size:10px;margin-top:1px}
 body[data-view=both] .departures{gap:0}
 body[data-view=both] .departure:not(:first-child){display:none}
 body[data-view=both] .departure strong{font-size:17px}
 body[data-view=both] .departure small{font-size:10px}
 body[data-view=both] .bus-row .departures>small{font-size:9px;max-width:62px}
 body[data-view=both] .bus-section{min-height:0}
 body[data-view=both] footer button{min-height:34px;padding:4px 7px}
 body[data-view=both] .source-credit{display:none}
}

body[data-theme=dark] .dashboard{background:linear-gradient(180deg,#171b24 0,#171b24 54px,#112533 135px,#091a2b 360px);border-inline:0}
body[data-theme=dark] .mast{background:linear-gradient(100deg,#202b37,#1c2836);border:1px solid #354a56;border-radius:9px;box-shadow:inset 0 1px 0 #ffffff10}
body[data-theme=dark] .bus-row{background:linear-gradient(120deg,#1d4555,#18384a);border-color:#345766;box-shadow:inset 0 1px 0 #ffffff12}
body[data-theme=dark] .ferry-row{background:linear-gradient(120deg,#203e53,#19344a);border-color:#496e82;border-left-color:var(--ferry);box-shadow:inset 0 1px 0 #ffffff12}
body[data-theme=dark] .ferry-alerts{background:#1a3b50;border-color:#3a5a6c}
body[data-theme=dark] footer button{background:linear-gradient(180deg,#285367,#204456);border-color:#426676}
body[data-theme=dark] .section-head h2{color:#dceff1}
.bus-row{cursor:pointer}
.bus-row:hover{border-color:var(--bus)}
.bus-row:focus-visible{outline:2px solid var(--bus);outline-offset:2px}
.bus-details-list{display:grid;gap:7px}
.bus-detail-row{display:flex;align-items:center;gap:10px;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}
.bus-detail-route{flex:none;min-width:35px;padding:5px 6px;border-radius:6px;background:var(--bus);color:var(--bg);font-size:17px;font-weight:850;text-align:center}
.bus-detail-destination{flex:1;min-width:0}
.bus-detail-destination strong{display:block;font-size:14px;line-height:1.25;overflow-wrap:anywhere}
.bus-detail-destination small{display:block;margin-top:3px;color:var(--muted);font-size:11px;line-height:1.25}
.bus-detail-due{flex:none;color:var(--bus);font-size:19px;font-variant-numeric:tabular-nums;white-space:nowrap}
#bus-details-meta{margin:0 0 10px}
.route-badge.placeholder{background:var(--button);color:var(--muted);box-shadow:none;font-size:10px}
.bus-empty{text-align:right;line-height:1.1;color:var(--muted)}
.bus-empty strong,.bus-empty small{display:block;white-space:nowrap}
.bus-empty strong{font-size:11px}.bus-empty small{font-size:9px;margin-top:2px}
@media(max-width:600px) and (max-height:430px){
 .section-head h2{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .section-head>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
 #ferry-age{font-size:9px}
 body[data-view=both] .bus-empty strong{font-size:10px}
 body[data-view=both] .bus-empty small{font-size:9px}
}

@media(max-width:600px) and (max-height:430px){
 body[data-view=both] #ferries{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
 body[data-view=both] #ferries .ferry-row{min-width:0;min-height:48px;height:48px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;align-content:center;gap:0 2px;padding:3px 5px;border-left-width:2px}
 body[data-view=both] #ferries .ferry-time{font-size:13px;line-height:1.1}
 body[data-view=both] #ferries .vessel{grid-column:1;grid-row:2;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body[data-view=both] #ferries .vessel small{display:none}
 body[data-view=both] #ferries .space{min-width:0;grid-column:2;grid-row:1 / 3;align-self:center}
 body[data-view=both] #ferries .space strong{font-size:12px;line-height:1.1;white-space:nowrap}
 body[data-view=both] #ferries .space small{font-size:9px}
 body[data-view=both] #ferries .space-bar{display:none}
 body[data-view=both] #ferries .empty{grid-column:1 / -1}
}
