/* ===== COLORS AND FONTS ===== */
:root{
  --bg:#eef1f3; --surface:#ffffff; --ink:#122130; --muted:#5a6a77; --rule:#d7dee3;
  --accent:#f2a900; --accent-ink:#1d1500; --live:#0e8a5d; --danger:#c3362b; --chip:#e3e8ec;
  --sea:#0f6e9c; --sea-soft:#e1eff6;
  --l1:#1f6fb2; --l2:#2c8653; --l3:#b23f2e; --l4:#7550ad; --l5:#b9720b; --l6:#0e7882;
  --display:'Big Shoulders Display','Arial Narrow',Impact,sans-serif;
  --body:'Atkinson Hyperlegible',system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace;
  color-scheme:light;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
/* Dark mode (follows the phone's setting) */
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#0c1620; --surface:#142231; --ink:#e7eef3; --muted:#93a4b2; --rule:#22364a;
  --accent:#ffbf2e; --accent-ink:#1d1500; --live:#3ddc97; --danger:#ff6f62; --chip:#1c2e40;
  --sea:#5cc2f0; --sea-soft:#13324a; color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0c1620; --surface:#142231; --ink:#e7eef3; --muted:#93a4b2; --rule:#22364a;
  --accent:#ffbf2e; --accent-ink:#1d1500; --live:#3ddc97; --danger:#ff6f62; --chip:#1c2e40;
  --sea:#5cc2f0; --sea-soft:#13324a; color-scheme:dark}

/* ===== BASICS ===== */
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.4;
  -webkit-tap-highlight-color:transparent}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--bg)}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:6px}
.wrap{max-width:560px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}

/* ===== HEADER ===== */
header.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;background:var(--bg)}
header.top .wrap{display:flex;align-items:center;gap:12px;padding-block:14px 10px}
.mark{width:34px;height:34px;border-radius:8px;background:var(--accent);display:grid;place-items:center;flex:none}
.mark svg{width:22px;height:22px}
.brand{font-family:var(--display);font-weight:800;font-size:26px;letter-spacing:.04em;text-transform:uppercase;line-height:1}
.status{margin-left:auto;display:flex;align-items:center;gap:6px;font-family:var(--mono);font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.status .dot{width:8px;height:8px;border-radius:50%;background:var(--live)}
.status.demo .dot{background:var(--accent)}
.status.err .dot{background:var(--danger)}
.themebtn{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;color:var(--ink);flex:none}
.themebtn svg{width:20px;height:20px}

/* ===== CONTENT ===== */
main{padding-block:4px 110px}
.banner{display:flex;gap:10px;align-items:flex-start;background:var(--chip);border-radius:12px;padding:10px 12px;font-size:14px;color:var(--muted);margin-bottom:14px}
.banner b{color:var(--ink)}
.banner .tag{flex:none;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;background:var(--accent);color:var(--accent-ink);padding:2px 6px;border-radius:4px;margin-top:1px}
h2.section{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:6px 0 10px;font-weight:700}
.stack{display:flex;flex-direction:column;gap:14px}

/* Card for each stop */
.card{background:var(--surface);border-radius:16px;overflow:hidden;box-shadow:0 1px 0 var(--rule)}
.card-head{display:flex;align-items:center;gap:10px;padding:12px 8px 10px 16px;border-bottom:1px solid var(--rule)}
.card-head .open{flex:1;min-width:0;text-align:left}
.stopname{font-family:var(--display);font-weight:800;font-size:24px;line-height:1.05;text-transform:uppercase;letter-spacing:.02em;text-wrap:balance}
.stopmeta{font-size:13px;color:var(--muted)}
.star{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;flex:none;color:var(--muted)}
.star[aria-pressed="true"]{color:var(--accent)}
.star svg{width:24px;height:24px}

/* One departure row */
ul.deps{list-style:none;margin:0;padding:0}
.dep{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:10px 16px;width:100%;text-align:left}
ul.deps li + li .dep{border-top:1px solid var(--rule)}
button.dep:hover{background:var(--chip)}
.badge{min-width:42px;height:32px;padding:0 8px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:4px;color:#fff;background:var(--c,var(--l1));
  font-family:var(--display);font-weight:800;font-size:20px;letter-spacing:.02em;flex:none}
.badge.water{background:var(--sea);border-radius:16px}
.badge svg{width:16px;height:16px}
.dest{min-width:0}
.dest .to{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dest .sub{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.dest .sub s{opacity:.8}
.when{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.when .big{font-family:var(--display);font-weight:800;font-size:30px;line-height:1}
.when .unit{font-size:13px;color:var(--muted);margin-left:2px}
.when .clock{font-family:var(--mono);font-size:17px}
.when .at{display:block;font-family:var(--mono);font-size:11px;color:var(--muted);margin-top:3px}
.when.now .big{color:var(--accent)}
.rt{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--live);margin-left:6px;vertical-align:middle;animation:pulse 2s ease-in-out infinite}
@keyframes pulse{50%{opacity:.3}}
.dep.cancelled .to,.dep.cancelled .when{text-decoration:line-through;color:var(--muted)}
.dep.cancelled .sub .x{color:var(--danger);font-weight:700}
.more{display:block;width:100%;padding:12px 16px;border-top:1px solid var(--rule);text-align:left;font-size:14px;font-weight:700;color:var(--muted)}
.empty-row{padding:16px;color:var(--muted);font-size:14px}

/* Ferry card: two directions, next departure big, the two after small */
.card.ferry .card-head{background:var(--sea-soft)}
.ferryicon{width:36px;height:36px;border-radius:50%;background:var(--sea);color:#fff;display:grid;place-items:center;flex:none}
.ferryicon svg{width:20px;height:20px}
.dir{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--rule)}
.dir:first-child{border-top:0}
.dir .from{font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.dir .later{font-family:var(--mono);font-size:15px;font-variant-numeric:tabular-nums}
.dir .later span + span::before{content:" · ";color:var(--muted)}

/* Single stop page */
.backbar{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.back{display:flex;align-items:center;gap:4px;height:40px;padding:0 12px 0 6px;border-radius:10px;background:var(--chip);font-weight:700;font-size:15px}
.back svg{width:20px;height:20px}
.detail-head{display:flex;align-items:flex-start;gap:10px;margin-bottom:12px}
.detail-head .stopname{font-size:34px}
.segment{display:grid;grid-template-columns:1fr 1fr;background:var(--chip);border-radius:12px;padding:4px;margin-bottom:12px}
.segment button{height:38px;border-radius:9px;font-weight:700;font-size:15px;color:var(--muted)}
.segment button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.12)}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.chipbtn{height:34px;padding:0 12px;border-radius:999px;background:var(--chip);font-weight:700;font-size:14px;display:flex;align-items:center;gap:6px}
.chipbtn[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
.chipbtn i{width:10px;height:10px;border-radius:3px;background:var(--c)}
.chipbtn.sea{background:var(--sea-soft);color:var(--sea)}
.chipbtn svg{width:16px;height:16px}

/* Platform overview: one block per platform, lines and where they go */
.plat{display:grid;grid-template-columns:auto 1fr;gap:14px;padding:14px 16px;border-top:1px solid var(--rule)}
.plat:first-child{border-top:0}
.plat .code{width:48px;height:48px;border-radius:10px;border:2px solid var(--ink);display:grid;place-items:center;
  font-family:var(--display);font-weight:800;font-size:26px;line-height:1}
.plat ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;min-width:0}
.plat li{display:flex;align-items:center;gap:10px;min-width:0}
.plat li .to{min-width:0;font-weight:700;overflow-wrap:anywhere}
.note{font-size:13px;color:var(--muted);padding:10px 2px 0}

/* Search */
.searchbox{display:flex;gap:8px;margin-bottom:12px}
.searchbox input{flex:1;min-width:0;height:50px;border-radius:14px;border:2px solid var(--rule);background:var(--surface);color:var(--ink);
  padding:0 14px;font:inherit;font-size:17px}
.searchbox input:focus{border-color:var(--accent);outline:none}
.nearby{height:50px;padding:0 14px;border-radius:14px;background:var(--accent);color:var(--accent-ink);font-weight:700;display:flex;align-items:center;gap:6px;flex:none}
.nearby svg{width:18px;height:18px}
.results{list-style:none;margin:0;padding:0;background:var(--surface);border-radius:16px;overflow:hidden}
.result{display:flex;align-items:center;gap:8px;border-top:1px solid var(--rule);padding-left:16px}
.result:first-child{border-top:0}
.result .open{flex:1;min-width:0;text-align:left;padding:12px 0}
.result .nm{font-weight:700}
.result .lc{font-size:13px;color:var(--muted)}
.hint{color:var(--muted);font-size:14px;padding:4px 2px}
.hint.tip{font-size:13px;margin:-4px 0 10px}
.quick{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.emptystate{background:var(--surface);border-radius:16px;padding:24px 18px}
.emptystate h3{font-family:var(--display);font-weight:800;font-size:26px;text-transform:uppercase;margin:0 0 6px}
.emptystate p{margin:0 0 14px;color:var(--muted)}

/* Trip page: every stop from here to the end, as a vertical timeline */
.trip-head{display:flex;align-items:center;gap:12px;margin-bottom:4px}
.trip-head .stopname{font-size:30px}
.trip-sub{font-size:14px;color:var(--muted);margin-bottom:14px;font-variant-numeric:tabular-nums}
.tl{list-style:none;margin:0;padding:14px 16px 6px}
.tl li{display:grid;grid-template-columns:52px 20px 1fr;gap:10px;min-height:46px}
.tl .t{text-align:right;font-family:var(--mono);font-size:14px;font-variant-numeric:tabular-nums;padding-top:1px}
.tl .t s{display:block;font-size:11px;color:var(--muted)}
.tl .rail{position:relative}
.tl .rail::before{content:"";position:absolute;left:50%;top:0;bottom:0;width:3px;transform:translateX(-50%);background:var(--c)}
.tl li:first-child .rail::before{top:10px}
.tl li:last-child .rail::before{bottom:auto;height:10px}
.tl .rail i{position:absolute;left:50%;top:4px;width:13px;height:13px;border-radius:50%;transform:translateX(-50%);
  background:var(--surface);border:3px solid var(--c);box-sizing:border-box}
.tl li:first-child .rail i,.tl li:last-child .rail i{width:17px;height:17px;top:2px;background:var(--c)}
.tl .nm{min-width:0;overflow-wrap:anywhere;padding-top:1px}
.tl li:first-child .nm,.tl li:last-child .nm{font-weight:700}
.tl li.passed{opacity:.45}
.tl li.skip .nm{text-decoration:line-through;color:var(--muted)}

/* From-to planner (in the Search tab) */
.planbox{position:relative;background:var(--surface);border-radius:16px;padding:6px 56px 6px 16px;margin-bottom:12px}
.pf{display:grid;grid-template-columns:34px 1fr;align-items:center;min-height:50px}
.pf + .pf{border-top:1px solid var(--rule)}
.pf label{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.pf input{min-width:0;border:0;background:none;color:var(--ink);font:inherit;font-size:17px;height:46px;outline:none}
.pf input::placeholder{color:var(--muted)}
.pf-star{grid-template-columns:34px 1fr auto}
#starHint{display:flex;align-items:center;gap:6px}
#starHint svg{width:14px;height:14px;color:var(--accent);flex:none}
.pf .star{width:40px;height:40px}
.pf .star svg{width:22px;height:22px}
.swap{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:10px;background:var(--chip);display:grid;place-items:center}
.swap svg{width:20px;height:20px}
.tripcards{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.tripcard{background:var(--surface);border-radius:16px;overflow:hidden}
.tc-head{display:grid;grid-template-columns:1fr auto;gap:6px 12px;width:100%;text-align:left;padding:12px 16px}
.tc-times{font-family:var(--display);font-weight:800;font-size:26px;line-height:1;font-variant-numeric:tabular-nums}
.tc-times span{color:var(--muted);font-size:20px;margin:0 4px}
.tc-dur{font-family:var(--mono);font-size:14px;color:var(--muted);align-self:center}
.tc-legs{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.tc-legs .arrow{color:var(--muted);font-size:13px}
.walkchip{display:inline-flex;align-items:center;gap:2px;font-family:var(--mono);font-size:13px;color:var(--muted)}
.walkchip svg{width:16px;height:16px}
.tc-meta{grid-column:1 / -1;font-size:13px;color:var(--muted)}
.badge.sm{min-width:34px;height:24px;font-size:16px;padding:0 6px;border-radius:6px}

/* Steps inside an opened trip: a small timeline, same style as the trip page */
.jr{list-style:none;margin:0;padding:12px 16px 14px;border-top:1px solid var(--rule)}
.jr li{display:grid;grid-template-columns:44px 18px 1fr;gap:10px}
.jr .t{text-align:right;font-family:var(--mono);font-size:14px;font-variant-numeric:tabular-nums;padding-top:1px}
.jr .t s{display:block;font-size:11px;color:var(--muted)}
.jr .rail{position:relative}
.jr .stop .rail i{position:absolute;left:50%;top:3px;width:14px;height:14px;border-radius:50%;transform:translateX(-50%);
  background:var(--surface);border:3px solid var(--c,var(--muted));box-sizing:border-box}
.jr .ride .rail::before,.jr .walk .rail::before{content:"";position:absolute;left:50%;top:-2px;bottom:-2px;transform:translateX(-50%)}
.jr .ride .rail::before{width:4px;border-radius:2px;background:var(--c)}
.jr .walk .rail::before{border-left:3px dotted var(--muted)}
.jr .stop .nm{font-weight:700;min-width:0;overflow-wrap:anywhere}
.jr .stop .nm small{display:block;font-weight:400;font-size:12px;color:var(--muted)}
.jr .ride .nm,.jr .walk .nm{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 0;font-size:14px;color:var(--muted);min-width:0}
.jr .ride .nm b{color:var(--ink)}
/* The line also runs out of the stop where you get on, and into the one where you get off */
.jr .stop.on .rail::before,.jr .stop.off .rail::before,.jr .mid .rail::before{content:"";position:absolute;left:50%;width:4px;border-radius:2px;transform:translateX(-50%);background:var(--c)}
.jr .stop.on .rail::before{top:10px;bottom:-2px}
.jr .stop.off .rail::before{top:-2px;height:12px}
.jr .stop .rail i{z-index:1}
/* Stops in between: small dot, normal weight */
.jr .mid .rail::before{top:-2px;bottom:-2px}
.jr .mid .rail i{position:absolute;left:50%;top:6px;width:9px;height:9px;border-radius:50%;transform:translateX(-50%);
  background:var(--surface);border:2px solid var(--c);box-sizing:border-box;z-index:1}
.jr .mid .t{font-size:13px;color:var(--muted)}
.jr .mid .nm{padding:1px 0 7px;font-size:15px;min-width:0;overflow-wrap:anywhere}
.jr .walk .nm svg{width:16px;height:16px;flex:none}

/* Big button under the planner that switches to the stop search */
.bigbtn{display:grid;grid-template-columns:24px 1fr 20px;align-items:center;gap:12px;width:100%;min-height:60px;padding:10px 14px 10px 16px;
  margin-bottom:14px;border-radius:16px;background:var(--surface);border:2px solid var(--rule);text-align:left}
.bigbtn:hover{border-color:var(--accent)}
.bigbtn svg{width:24px;height:24px;color:var(--accent)}
.bigbtn .chev{width:20px;height:20px;color:var(--muted)}
.bigbtn b{display:block;font-size:16px}
.bigbtn small{display:block;font-size:13px;color:var(--muted)}

/* Reorder list: one row per stop with up/down arrows */
.order{list-style:none;margin:0;padding:0;background:var(--surface);border-radius:16px;overflow:hidden}
.order li{display:grid;grid-template-columns:28px 1fr auto auto;align-items:center;gap:8px;padding:8px 8px 8px 16px;border-top:1px solid var(--rule)}
.order li:first-child{border-top:0}
.order .n{font-family:var(--mono);color:var(--muted);font-variant-numeric:tabular-nums}
.order .nm{font-weight:700;min-width:0;overflow-wrap:anywhere}
.ordbtn{width:44px;height:44px;border-radius:10px;background:var(--chip);display:grid;place-items:center}
.ordbtn svg{width:20px;height:20px}
.ordbtn:disabled{opacity:.3;cursor:default}
.listfoot{display:flex;justify-content:center;margin-top:14px}
.textbtn{height:40px;padding:0 16px;border-radius:10px;background:var(--chip);font-weight:700;font-size:14px}
.textbtn.primary{background:var(--ink);color:var(--bg)}

/* Today / tomorrow on the stop page, now / tomorrow in the planner */
.daybar,.whenrow{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px}
.whenrow input{height:34px;border-radius:999px;border:2px solid var(--rule);background:var(--surface);color:var(--ink);padding:0 10px;font:inherit;font-size:14px}
/* "Vis vei" (Google Maps) */
.maplink{display:inline-flex;align-items:center;gap:4px;font-size:14px;font-weight:700;color:var(--ink);text-decoration:underline;white-space:nowrap}
.maplink svg{width:16px;height:16px;color:var(--accent)}
.detail-head .maplink{margin-top:4px}
.result .maplink{padding:0 4px}
/* Save one line in Mine stopp */
.saveline{display:inline-flex;align-items:center;gap:6px;margin-bottom:10px}
.saveline svg{width:18px;height:18px;color:var(--accent)}
.line-open{display:flex;align-items:center;gap:10px}
.line-open > span{min-width:0}
.line-open .stopmeta{display:block}
.stack .buyrow,.card + .buyrow{padding:12px 0 0}
/* Info page: plain text, no boxes */
.info{max-width:62ch}
.info h2{font-size:18px;margin:22px 0 6px}
.info h2:first-child{margin-top:4px}
.info p,.info li{font-size:15px;line-height:1.5;margin:0 0 8px}
.info ul{padding-left:20px;margin:0 0 12px}
.info a{color:inherit}
.credit .linkbtn{font-size:12px}

/* Recently searched stops: a plain list with a small heading, no extra box */
.recent-head{display:flex;justify-content:space-between;align-items:baseline;margin:2px 2px 6px;font-size:14px;font-weight:700;color:var(--muted)}
.linkbtn{font-size:14px;color:var(--muted);text-decoration:underline;padding:4px 0}
.results.recent{margin-bottom:14px}
.results.recent .result .open{padding:9px 0}

/* Ticket page: the company where you are first, then everyone A–Å */
.tk-intro{color:var(--muted);font-size:14px;margin:0 0 14px;max-width:46ch}
.tk-near{background:var(--surface);border-radius:16px;padding:16px;margin-bottom:18px;border:2px solid var(--accent)}
.tk-near .lbl{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.tk-near .nm{font-family:var(--display);font-weight:800;font-size:30px;line-height:1.05;text-transform:uppercase;margin:4px 0 2px}
.tk-near .rg{color:var(--muted);font-size:14px;margin-bottom:14px}
.buybtn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:0 16px;border-radius:14px;
  background:var(--accent);color:var(--accent-ink);font-weight:700;font-size:16px;text-decoration:none}
.buybtn svg{width:20px;height:20px}
.locbtn{display:flex;align-items:center;gap:10px;width:100%;min-height:54px;padding:10px 16px;margin-bottom:18px;border-radius:16px;
  background:var(--surface);border:2px dashed var(--rule);font-weight:700;text-align:left}
.locbtn svg{width:22px;height:22px;color:var(--accent);flex:none}
.locbtn small{display:block;font-weight:400;font-size:13px;color:var(--muted)}
.ops{list-style:none;margin:0;padding:0;background:var(--surface);border-radius:16px;overflow:hidden}
.ops li + li{border-top:1px solid var(--rule)}
.ops a{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;padding:12px 16px;color:inherit;text-decoration:none}
.ops a:hover{background:var(--chip)}
.ops .nm{font-weight:700}
.ops .rg{font-size:13px;color:var(--muted)}
.ops .app{font-size:13px;color:var(--muted);text-align:right}
.ops .app b{display:block;color:var(--ink);font-weight:700}
.tk-note{font-size:13px;color:var(--muted);padding:12px 2px 0}
.tk-note a{color:inherit}
/* "Buy ticket" link at the bottom of an opened trip */
.buyrow{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 16px}
.buyrow a{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:12px;
  background:var(--chip);color:var(--ink);font-weight:700;font-size:14px;text-decoration:none}
.buyrow a:hover{background:var(--accent);color:var(--accent-ink)}
.buyrow svg{width:18px;height:18px}

/* Source credit required by Entur's licence */
.credit{font-size:12px;color:var(--muted);text-align:center;padding:20px 8px 0}
.credit a{color:inherit}
.credit p{margin:0 0 6px}

/* ===== BOTTOM TABS ===== */
nav.tabs{position:fixed;left:0;right:0;bottom:0;z-index:6;background:var(--surface);border-top:1px solid var(--rule);
  padding-bottom:env(safe-area-inset-bottom,0px)}
nav.tabs .wrap{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;padding-block:8px}
.tab{height:52px;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:12px;font-weight:700;color:var(--muted)}
.tab svg{width:22px;height:22px}
.tab[aria-selected="true"]{color:var(--ink);background:var(--chip)}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);
  padding:10px 16px;border-radius:999px;font-size:14px;font-weight:700;z-index:7;max-width:calc(100% - 32px)}
@media (prefers-reduced-motion: reduce){.rt{animation:none}}

/* ===== SPONSOR CARD (hidden in index.html until you have a sponsor) ===== */
/* Change these to match the sponsor's look */
.sponsor{
  --sp-bg: var(--surface);        /* card background */
  --sp-logo-bg: var(--chip);      /* box behind the logo */
  --sp-font: var(--body);         /* font for the sponsor's name */
  display:grid;grid-template-columns:56px 1fr auto;grid-template-rows:auto auto;gap:6px 14px;align-items:center;
  margin-top:14px;padding:14px 16px;border-radius:16px;background:var(--sp-bg);color:var(--ink);text-decoration:none}
.sp-tag{grid-column:1 / -1;font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)} /* "Sponset" must stay visible (markedsføringsloven) */
.sp-logo{width:56px;height:56px;border-radius:12px;background:var(--sp-logo-bg);object-fit:contain;padding:8px}
.sp-text{min-width:0}
.sp-text b{display:block;font-family:var(--sp-font);font-size:19px;line-height:1.15}
.sp-text small{display:block;font-size:14px;color:var(--muted)}
.sp-ext{width:22px;height:22px;color:var(--muted)}
/* Only show it on "Mine stopp" */
#viewFav[hidden] + .sponsor{display:none}

/* ===== Less rounded corners (looks less generic). Overrides the corner sizes above ===== */
.card,.tripcard,.results,.ops,.order,.planbox,.bigbtn,.emptystate,.tk-near,.locbtn,.banner,.sponsor{border-radius:4px}
.segment,.segment button,.back,.textbtn,.chipbtn,.buyrow a,.buybtn,.nearby,.searchbox input,.whenrow input,
.swap,.ordbtn,.star,.tab,.themebtn,.mark,.badge,.badge.water,.badge.sm,.plat .code,.sp-logo,.ferryicon,.toast,.banner .tag{border-radius:3px}

/* ===== LAST BUS HOME (box at the top of "Mine stopp") ===== */
.homebox{background:var(--surface);border-radius:4px;padding:12px 16px 14px;margin-bottom:14px}
.hb-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 8px;margin-bottom:6px}
.hb-head b{font-size:17px}
.hb-head span{color:var(--muted);font-size:14px}
.hb-head .linkbtn{margin-left:auto}
.hb-row{display:grid;grid-template-columns:48px 1fr;align-items:center;gap:2px 10px;padding:8px 0;border-top:1px solid var(--rule)}
.hb-lbl{font-size:13px;font-weight:700;color:var(--muted)}
.hb-time{font-family:var(--mono);font-size:18px;font-variant-numeric:tabular-nums}
.hb-what{grid-column:2;min-width:0;font-size:14px;color:var(--muted);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.hb-what .badge{min-width:32px;height:22px;font-size:14px;padding:0 6px}
.hb-note{font-size:14px;color:var(--muted);margin:4px 0 10px}
.hb-note.small{font-size:12px;margin:8px 0 0}
.hb-warn{font-size:14px;font-weight:700;color:var(--danger);margin:6px 0 10px}
.homebox .textbtn{margin-top:8px}
.hb-input{width:100%;height:46px;border-radius:3px;border:2px solid var(--rule);background:var(--bg);color:var(--ink);padding:0 12px;font:inherit;font-size:16px;margin:4px 0 10px}
.hb-input:focus{border-color:var(--accent);outline:none}
/* ===== END LAST BUS HOME ===== */

.starhinting {font-size: 0.8rem; color: var(--muted)}