*{box-sizing:border-box}
/* Keep native scrolling in all views, including panels with their own scrollbar styling. */
*{scrollbar-width:none!important}
::-webkit-scrollbar{display:none}
html,body{height:100%;margin:0;overscroll-behavior-y:none;overscroll-behavior-x:auto}
html{-webkit-tap-highlight-color:transparent}
html[data-board-swipes],html[data-board-swipes] body{overscroll-behavior-x:none}
/* The same theme tokens colour the visible board, the offline shell and the browser chrome. */
html[data-shell-mode="rail"]{--lti-shell-bg:var(--rb-blue,#0b12d8);--lti-shell-ink:var(--rb-ink,#fff);--lti-shell-accent:var(--rb-gold,#ffea35)}
html[data-shell-mode="bus"]{--lti-shell-bg:var(--lb-field,#063f34);--lti-shell-ink:var(--lb-ink,#fffefa);--lti-shell-accent:var(--lb-gold,#ffdf53)}
html[data-shell-mode="bus"][data-shell-theme="concourse"]{--lti-shell-mast:#882f39}
html[data-shell-mode],html[data-shell-mode] body,.opening{background:var(--lti-shell-bg,#063f34);color:var(--lti-shell-ink,#fff)}
body{font-family:"Rail Barlow","Arial Narrow",Arial,sans-serif}
#board{height:100%;height:100dvh;width:100%;overflow:hidden}
.opening{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;font-size:1.15rem}

/* An opaque top bar lets installed iPhone web apps extend their masthead color
   into the system status bar. Keep the existing safe area around the controls. */
.lti-header-edge{display:contents}
.lti-opening-edge{display:none}
html[data-iphone-home] :is(.rb-screen,.lb-screen){padding-top:0}
html[data-iphone-home] .lti-header-edge{
  --edge-top:env(safe-area-inset-top,0px);
  --edge-side:max(env(safe-area-inset-left,0px),env(safe-area-inset-right,0px));
  display:block;position:sticky;top:0;z-index:1;flex:none;
  margin-inline:calc(0px - var(--edge-side));
  padding:var(--edge-top) var(--edge-side) 0;
  background-color:var(--lti-shell-mast,var(--lti-shell-bg));
}
html[data-iphone-home] .rb-screen[data-overscan]>.lti-header-edge{
  --edge-top:max(2vh,env(safe-area-inset-top,0px));
  --edge-side:max(2vw,env(safe-area-inset-left,0px),env(safe-area-inset-right,0px));
}
html[data-iphone-home] .lti-opening-edge{
  display:block;position:fixed;inset:0 0 auto;height:max(12px,env(safe-area-inset-top,0px));
  background-color:var(--lti-shell-mast,var(--lti-shell-bg));
}

#feedback{position:fixed;z-index:20;bottom:max(50px,8vh);left:50%;transform:translateX(-50%);padding:10px 16px;max-width:90%;font:600 16px/1.35 "Rail Barlow","Arial Narrow",Arial,sans-serif;background:var(--lti-shell-bg,#101444);color:var(--lti-shell-ink,#fff);border:1px solid currentColor;pointer-events:none}
#feedback:empty{display:none}
#app-update {
  display: none;
  position: fixed;
  inset: auto 0 max(1rem,env(safe-area-inset-bottom)) 0;
  z-index: 100;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0 auto;
  padding: .65em 1em;
  border: 1px solid currentColor;
  background: var(--lti-shell-bg,#101444);
  color: var(--lti-shell-ink,#fff);
  font: 600 clamp(.95rem,2vmin,1.4rem)/1.4 "Rail Barlow","Arial Narrow",Arial,sans-serif;
  text-align: center;
  pointer-events: none;
}
#app-update[data-visible], #app-update span {display:block}
#app-update::backdrop {background:transparent;pointer-events:none}

.lti-name-slot{
  position:relative;display:grid;align-items:center;width:fit-content;max-width:100%;
}
.lti-name-slot::before{
  content:attr(data-lines);display:block;white-space:pre-line;overflow-wrap:anywhere;visibility:hidden;
}
.lti-name-slot>:is(.station-name,.lb-place-name){
  position:absolute;left:0;width:max-content;max-width:var(--lti-name-room,100%);
  font-size:calc(1em * var(--lti-name-scale,1));
}
.lb-place>.lb-place-code{position:relative;top:var(--lti-code-offset,0px)}
