/* transit.js / transit_run.js / transit_taxi.js / map_app.js: destination picker, ride panel, taxi panels, the map panel and the phone map app */
/* cards: ticket gate picker, taxi destinations, taxi payment. Minimal translucent card, content height, centred */
body :is(#trPanel,#trTaxi,#trTaxiPay){position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(92vw,360px);max-width:360px;height:auto;max-height:calc(var(--mob-vh,100vh) - 32px);overflow-y:auto;box-sizing:border-box;padding:20px;display:block;z-index:11;background:rgba(10,10,14,.62);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.07);border-radius:16px;outline:0;box-shadow:none;color:rgba(255,255,255,.92);font-family:var(--font-ui);touch-action:pan-y}
body :is(#trPanel,#trTaxi,#trTaxiPay,#mapPanel,#trRide)[hidden]{display:none}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-h{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 6px}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-ht{flex:1;min-width:0}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-eb{display:block;font-size:11px;font-weight:400;line-height:1.3;color:rgba(255,255,255,.55);letter-spacing:.04em;margin:0 0 2px}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-t{display:block;font-size:16px;font-weight:600;line-height:1.35;color:rgba(255,255,255,.95)}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-x{flex:none;width:44px;height:44px;margin:-8px -10px 0 0;padding:0;display:flex;align-items:center;justify-content:center}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-sub{margin:0 0 14px;font-size:12px;font-weight:400;line-height:1.5;color:rgba(255,255,255,.6);font-variant-numeric:tabular-nums}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-c{text-align:center;margin:10px 0 14px}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-rows{display:flex;flex-direction:column;gap:8px}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-row{display:flex;flex-direction:row;align-items:center;gap:12px;width:100%;height:64px;padding:0 14px;box-sizing:border-box;text-align:left;font:inherit;color:#eee1c1;background:#35414d;border:2px solid #a18f70;border-radius:0;box-shadow:2px 2px 0 #111821}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-row:active{background:#29343f}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-badge{flex:none;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:13px;font-weight:600;color:#fff}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-taxi{background:#e8b020;color:#111}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-m{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-n{font-size:15px;font-weight:600;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:rgba(255,255,255,.95)}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-s{font-size:12px;font-weight:400;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:rgba(255,255,255,.6)}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-p{flex:none;font-size:15px;font-weight:600;color:#fff;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-row.poor .tpc-p{color:#ff5a5a}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-q{display:block;width:100%;margin:10px 0 0;padding:10px 0 2px;background:transparent;border:0;border-radius:0;font-size:13px;font-weight:400;color:rgba(255,255,255,.6);text-align:center}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-btn{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;height:48px;padding:0 16px;box-sizing:border-box;font:inherit;font-size:15px;font-weight:600;color:#eee1c1;background:#35414d;border:2px solid #a18f70;border-radius:0;box-shadow:2px 2px 0 #111821}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-btn small{font-size:12px;font-weight:400;color:rgba(238,225,193,.7);font-variant-numeric:tabular-nums}
body :is(#trPanel,#trTaxi,#trTaxiPay) .tpc-btn:disabled{opacity:.35}
body #trTaxiPay{width:min(92vw,320px)}
body .trt-fare{font-size:34px;font-weight:600;text-align:center;color:#e8c46a;background:rgba(255,255,255,.06);border-radius:12px;padding:14px 6px;margin:6px 0 0;letter-spacing:0;font-variant-numeric:tabular-nums}
/* ride panel: the announcement over the car */
/* the ride card is a UIK pixel plate (.uik-panel .uik-plate, set in trEl) and owns the top of the screen: the date, quest and job cards step aside while riding */
#trRide{position:absolute;left:50%;top:max(8px,env(safe-area-inset-top));transform:translateX(-50%);width:min(360px,94vw);height:152px;overflow:hidden;z-index:9;padding:2px 4px;box-sizing:border-box;color:#fff;pointer-events:auto;font-variant-numeric:tabular-nums}
/* fixed height: three rows of fixed size, nothing in them resizes the card */
#trRide .trr-top{height:44px}#trRide .trr-top>div{min-width:0;flex:1}#trRide .trr-top b,#trRide .trr-top small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#trRide .trr-dots{height:22px;margin:4px 0 2px}#trRide .trr-row{height:46px}#trRide .trr-row button{min-height:44px;min-width:96px}
body:has(#trRide:not([hidden])) :is(#topbar,#goalCard,#gdBanner,#jobHud){display:none!important}
.trr-top small{display:block;min-height:1.3em}
.trr-top{display:flex;align-items:center;gap:8px}
.trr-badge{width:26px;height:26px;border-radius:50%;border:2px solid #fff;display:flex;align-items:center;justify-content:center;font-size:14px;flex:none}
.trr-top b{display:block;font-size:17px;color:#fff;font-weight:600}
.trr-top small{font-size:10px;color:rgba(255,255,255,.6)}
.trr-dots{display:flex;align-items:center;margin:6px 0 2px;font-size:10px}
.trr-dots i{width:10px;height:10px;border-radius:50%;background:#1a2a3a;border:2px solid #7a9ac0;flex:none}
.trr-dots i.d{background:#7ad0ff}.trr-dots i.t{border-color:#ffb030}
.trr-dots i.v{width:6px;height:6px;border-width:1px}
.trr-dots u{flex:1;height:2px;background:#3a5a7a;margin:0 3px;min-width:8px}
.trr-dots em{font-style:normal;position:relative;margin:0 0 0 3px;color:#c8d8e8;white-space:nowrap}
.trr-row{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#c8d8e8;gap:8px}
.trr-row button{font-size:12px;padding:2px 10px}
.trr-row button:disabled{opacity:.35}
/* map: panel and phone app */
body #mapPanel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(92vw,440px);max-height:calc(var(--mob-vh,100vh) - 32px);overflow-y:auto;box-sizing:border-box;padding:16px;display:block;z-index:11;background:rgba(10,10,14,.62);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.07);border-radius:16px;outline:0;color:rgba(255,255,255,.92);font-family:var(--font-ui);touch-action:pan-y}
.mp-tabs{display:flex;gap:4px}
.mp-tabs button{flex:1;font-size:12px;padding:3px 4px}
.mp-tabs button.on{background:#fff;color:#111}
.mp-cv{display:block;image-rendering:pixelated;background:#141018;border:2px solid #1a0c08;margin:4px auto;touch-action:none;max-width:100%}
.mp-zoom{display:flex;gap:4px;justify-content:center}
.mp-zoom button{font-size:12px;padding:2px 8px}
.mp-dest{display:flex;align-items:center;gap:6px;justify-content:space-between;font-size:11px;background:#2a1a24;border:2px solid #7a5a3a;padding:3px 6px;margin-top:3px}
.mp-dest.sel{background:#1c2a24;border-color:#4a8a5a}
.mp-dest button{font-size:11px;padding:2px 6px;flex:none}
.mp-chips{display:flex;flex-wrap:wrap;gap:3px;margin:4px 0}
.mp-chips button{font-size:10px;padding:1px 5px;border-width:2px}
.mp-chips button.on{border-color:#ffe9a8;background:#3a2a1a;color:#ffe9a8}
.mp-list{list-style:none;margin:0;padding:0;max-height:34vh;overflow-y:auto;touch-action:pan-y}
.mp-list li{display:flex;align-items:center;gap:6px;padding:3px 2px;min-height:24px;border-bottom:1px dotted #ddd5c4;font-size:11px}
.mp-list li img{width:22px;height:26px;image-rendering:pixelated;flex:none;object-fit:contain}
.mp-list li div{flex:1;min-width:0;display:flex;flex-direction:column}
.mp-list li span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-list li i{font-style:normal;font-size:9px;color:#8a8294}
.mp-list li b{font-weight:normal;font-size:12px;white-space:nowrap}
.mp-list li button{font-size:10px;padding:1px 5px;flex:none}
.mp-list li.on{background:#e6f2e2}
.mp-note{font-size:10px;color:#6a6274;margin:4px 0;line-height:1.35}.mp-note.big{font-size:12px;text-align:center;margin:12px 0}
#mapPanel .mp-list li{border-bottom-color:rgba(255,255,255,.08)}#mapPanel .mp-list li.on{background:rgba(255,255,255,.08)}#mapPanel .mp-note{color:rgba(255,255,255,.6)}#mapPanel .mp-list li i{color:rgba(255,255,255,.6)}
#mapPanel .mp-list li span,#mapPanel .mp-list li b{color:rgba(255,255,255,.92)}
#phoneBody .mp-tabs button,#phoneBody .mp-zoom button,#phoneBody .mp-chips button,#phoneBody .mp-dest button,#phoneBody .mp-list li button{font-size:10px;padding:1px 4px;border-width:2px}
#phoneBody .mp-cv{margin:calc(var(--px)*1) auto}
/* map app: one full screen panel (phone and desktop). Header with a small zone label, tabs, chips; the stage holds the canvas and its overlays, all inside it */
body #mapPanel.mpfull{position:absolute;left:50%;top:calc(env(safe-area-inset-top) + 52px);bottom:calc(env(safe-area-inset-bottom) + 8px);height:auto;transform:translateX(-50%);width:min(calc(100vw - 16px),1100px);max-height:none!important;overflow:hidden!important;padding:8px;display:flex;flex-direction:column;touch-action:none}
body #mapPanel.mpfull[hidden]{display:none}
#mapPanel .mp-shell{display:flex;flex-direction:column;gap:6px;flex:1 1 0;min-height:0}
#mapPanel .mp-side{display:flex;flex-direction:column;gap:6px;flex:none;min-width:0}
#mapPanel .mp-head{display:flex;align-items:center;gap:8px;min-height:44px}
#mapPanel .mp-zn{flex:1;min-width:0;font-size:14px;font-weight:600;color:rgba(255,255,255,.85);white-space:normal;overflow-wrap:anywhere}
#mapPanel .mp-tabs{display:flex;gap:6px}
#mapPanel .mp-tabs button{flex:1 1 0;min-width:0;min-height:44px;font-size:14px;padding:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#mapPanel .mp-close{flex:none;min-width:44px;min-height:44px;padding:0}
#mapPanel .mp-chips{display:flex;flex-wrap:nowrap;gap:6px;margin:0;overflow-x:auto;overflow-y:hidden;touch-action:pan-x;scrollbar-width:none;-webkit-overflow-scrolling:touch}
#mapPanel .mp-chips::-webkit-scrollbar{display:none}
#mapPanel .mp-chips button{flex:none;min-height:44px;min-width:56px;padding:0 14px;font-size:13px;white-space:nowrap;border-width:2px}
#mapPanel .mp-stage{position:relative;flex:1 1 0;min-height:0;min-width:0;border-radius:12px;overflow:hidden;background:#141018;border:1px solid rgba(255,255,255,.14)}
#mapPanel .mp-stage>.mp-cv{position:absolute;left:0;top:0;width:100%;height:100%;margin:0;border:0;max-width:none;touch-action:none;image-rendering:pixelated}
#mapPanel .mp-scroll{position:absolute;left:0;top:0;right:0;bottom:0;overflow-y:auto;padding:8px;touch-action:pan-y;box-sizing:border-box;background:rgba(10,10,14,.55)}
#mapPanel .mp-scroll .mp-cv{margin:6px auto}
#mapPanel .mp-lbls{position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;overflow:hidden}
#mapPanel .mp-lb{position:absolute;box-sizing:border-box;font-size:12px;line-height:18px;padding:2px 6px;border-radius:6px;background:rgba(10,10,14,.82);border:1px solid rgba(255,255,255,.35);color:#fff;white-space:nowrap}
#mapPanel .mp-lb.d{border-color:#ffd040;color:#ffe9a8}#mapPanel .mp-lb.w{border-color:#58a8e8;color:#b8d4ea}#mapPanel .mp-lb.h{border-color:#ff8a7a}
#mapPanel .mp-lb.district{background:rgba(14,22,30,.65);border-color:rgba(180,207,212,.2);color:#d5e6e9;font-weight:600}
#mapPanel .mp-top,#mapPanel .mp-bot{position:absolute;left:8px;right:8px;display:flex;flex-direction:column;gap:6px;pointer-events:none}
#mapPanel .mp-top{top:8px}#mapPanel .mp-bot{bottom:8px}
#mapPanel .mp-credit{align-self:flex-end;font-size:9px;line-height:1.2;color:rgba(255,255,255,.62);text-shadow:0 1px 2px rgba(0,0,0,.7);pointer-events:none}
#mapPanel .mp-top>*{pointer-events:auto}
#mapPanel .mp-cardwrap{position:absolute;left:8px;right:8px;bottom:62px;pointer-events:none}#mapPanel .mp-cardwrap>*{pointer-events:auto}
#mapPanel .mp-ctl{display:flex;justify-content:space-between;align-items:flex-end;gap:8px;pointer-events:none}
#mapPanel .mp-ctl>*{pointer-events:auto}
#mapPanel .mp-zoom{display:flex;gap:8px;justify-content:flex-end}
#mapPanel .mp-zoom button{width:48px;height:48px;min-width:48px;padding:0}
#mapPanel .mp-me{min-height:48px;padding:0 14px;font-size:14px}
#mapPanel .mp-ctl button{background:rgba(16,14,22,.92);border:2px solid rgba(255,255,255,.3);border-radius:10px;color:#fff}
#mapPanel .mp-dest{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;margin:0;padding:3px 4px 3px 10px;font-size:13px;line-height:1.3;color:#fff;border:2px solid #ffd040;border-radius:10px;background:rgba(16,14,22,.92);box-sizing:border-box}
#mapPanel .mp-dest.wp{border-color:#58a8e8}#mapPanel .mp-dest.goal{border-color:rgba(255,255,255,.35)}
#mapPanel .mp-dest .mp-dt{flex:1;min-width:0}
#mapPanel .mp-dest b{font-weight:600}
#mapPanel .mp-dest button{flex:none;min-height:44px;min-width:60px;font-size:13px;padding:0 10px}
#mapPanel .mp-card{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 8px 8px 12px;border:2px solid #fff;border-radius:12px;background:rgba(16,14,22,.96);color:#fff;box-sizing:border-box}
#mapPanel .mp-ct{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:2px}
#mapPanel .mp-ct b{font-size:15px;font-weight:600;overflow-wrap:anywhere}
#mapPanel .mp-ct i{font-style:normal;font-size:12px;color:rgba(255,255,255,.7)}
#mapPanel .mp-gobtn{flex:none;min-height:48px;padding:0 16px;font-size:14px;font-weight:700;background:#35414d;color:#eee1c1;border:2px solid #a18f70;border-radius:0;box-shadow:2px 2px 0 #111821}
#mapPanel .mp-card.grp .mp-ct{flex:1 1 100%}
#mapPanel .mp-pick{flex:1 1 40%;min-height:44px;font-size:13px;padding:0 8px;white-space:normal;overflow-wrap:anywhere}
#mapPanel em.ok,#mapPanel em.ng{font-style:normal;font-size:11px;margin-left:6px}
#mapPanel em.ok{color:#8fe0a0}#mapPanel em.ng{color:#ff9a8a}
#mapPanel .mp-list{max-height:none;overflow:visible}
#mapPanel .mp-list li{min-height:52px;font-size:13px}
#mapPanel .mp-list li button{min-height:44px;min-width:64px;font-size:12px}
@media (orientation:landscape) and (max-height:520px){
  #mapPanel .mp-shell{flex-direction:row}
  #mapPanel .mp-side{width:172px;min-height:0}
  #mapPanel .mp-chips{flex-direction:column;overflow-x:hidden;overflow-y:auto;touch-action:pan-y;flex:1 1 0;min-height:0}
  #mapPanel .mp-chips button{width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis}
}
/* map panel, calm version: top bar (name, close), one corner of small icon buttons, a slim guidance line, filter and menu in popups */
#mapPanel .mp-shell{position:relative}
#mapPanel .mp-head{min-height:40px}
#mapPanel .mp-fab{position:absolute;right:8px;bottom:8px;max-height:calc(100% - 64px);display:flex;flex-direction:column;flex-wrap:wrap-reverse;align-content:flex-end;gap:6px;z-index:3;pointer-events:none}
#mapPanel .mp-fab>*{pointer-events:auto}#mapPanel .mp-zoom{display:contents}
#mapPanel .mp-fab button{position:relative;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;font-size:18px;line-height:1;background:rgba(16,14,22,.92);border:2px solid rgba(255,255,255,.3);border-radius:10px;color:#fff}
#mapPanel .mp-fab button.on{border-color:#ffe9a8}
#mapPanel .mp-fab button i{position:absolute;left:50%;top:50%;display:block}
#mapPanel .mp-menub i{width:16px;height:2px;margin:-1px 0 0 -8px;background:#fff;box-shadow:0 -6px 0 #fff,0 6px 0 #fff}
#mapPanel .mp-filb i{width:0;height:0;margin:-4px 0 0 -8px;border-left:8px solid transparent;border-right:8px solid transparent;border-top:12px solid #fff}
#mapPanel .mp-me i{width:12px;height:12px;margin:-8px 0 0 -8px;border:2px solid #fff;border-radius:50%;box-shadow:inset 0 0 0 3px rgba(16,14,22,.92),inset 0 0 0 8px #fff}
#mapPanel .mp-pop{position:absolute;right:60px;bottom:8px;max-width:calc(100% - 72px);max-height:calc(100% - 64px);overflow-y:auto;touch-action:pan-y;display:flex;flex-direction:column;gap:6px;padding:8px;border:2px solid rgba(255,255,255,.35);border-radius:12px;background:rgba(16,14,22,.97);z-index:4;box-sizing:border-box}
#mapPanel .mp-pop .mp-chips{flex-direction:column;flex-wrap:nowrap;overflow:visible;touch-action:pan-y}
#mapPanel .mp-pop .mp-chips button,#mapPanel .mp-menu>button{width:100%;min-width:132px;min-height:44px;text-align:left;padding:0 14px;font-size:14px;white-space:nowrap}
#mapPanel .mp-menu>button.on{background:#fff;color:#111}
#mapPanel .mp-top{top:6px;left:6px;right:6px;gap:4px}
#mapPanel .mp-bot{left:8px;right:auto;bottom:6px}
#mapPanel .mp-credit{align-self:flex-start;max-width:calc(100vw - 100px)}
#mapPanel .mp-cardwrap{left:8px;right:64px;bottom:26px}
#mapPanel .mp-top .mp-dest,#mapPanel .mp-scroll .mp-dest{min-height:32px;padding:0 2px 0 10px;font-size:12px;border-width:1px;border-radius:8px;flex-wrap:nowrap}
#mapPanel .mp-dest .mp-dt{white-space:normal;overflow-wrap:anywhere}
#mapPanel .mp-list li span{white-space:normal;overflow:visible;overflow-wrap:anywhere}
#mapPanel .mp-top .mp-dest button,#mapPanel .mp-scroll .mp-dest button{min-height:44px;min-width:44px;padding:0 8px;font-size:18px;line-height:1;margin-left:auto}#mapPanel .mp-pop .mp-chips{flex:none}
@media (orientation:landscape) and (max-height:520px){
  #mapPanel .mp-side{width:120px}
  #mapPanel .mp-cardwrap{right:116px}
}
