/* Trains (DeepDepths's and GalaxyOne's site.css). Built to be read at a distance: large type, high
   contrast, big targets. Everything you read or press in the system face for clarity. */
@font-face { font-family: 'Lato'; src: url('fonts/Lato-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root {
  --paper: #e9eef6; --card: #f8fafd; --ink: #0d1420; --muted: #3c4a60; --line: #a9b6c9;
  --accent: #1c4fa0; --accent-ink: #ffffff; --ok: #1f6a35; --warn: #8a4b00; --focus: #0b57d0;
  --head: -apple-system, 'Segoe UI', Lato, Arial, sans-serif;
  --body: -apple-system, 'Segoe UI', Lato, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #120c0c; --card: #1d1414; --ink: #fbf3ee; --muted: #d8c4b6; --line: #4a3030;
  --accent: #ffc94d; --accent-ink: #1a1004; --ok: #86d79d; --warn: #f0b766; --focus: #8ab4ff; color-scheme: dark; } }
:root[data-theme="dark"] { --paper: #120c0c; --card: #1d1414; --ink: #fbf3ee; --muted: #d8c4b6; --line: #4a3030;
  --accent: #ffc94d; --accent-ink: #1a1004; --ok: #86d79d; --warn: #f0b766; --focus: #8ab4ff; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 20px/1.45 var(--body); }
h1, h2 { font-family: var(--head); font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: 40px; } h2 { font-size: 28px; }
button, select, input { font: inherit; }
button, .button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 12px 20px;
  min-height: 52px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button.quiet { background: transparent; color: var(--ink); border: 2px solid var(--line); }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
label, .fieldName { font-weight: 700; display: block; margin-bottom: 6px; }   /* .fieldName: the heading of a group of switches */
.help { color: var(--muted); font-size: 18px; margin-top: 4px; }
select, input[type=text], input[type=number], input[type=time] { width: 100%; min-height: 52px; padding: 8px 12px; background: var(--card); color: var(--ink);
  border: 2px solid var(--line); border-radius: 10px; }
/* Safari draws its own select at its own height and ignores ours (text came out squeezed and
   cut off): draw the select ourselves, the same height as the other fields, with its arrow */
select { -webkit-appearance: none; appearance: none; height: 52px; line-height: 1.3; padding-right: 44px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M4 7l6 6 6-6' fill='none' stroke='%23b8a98f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; }
input[type=text], input[type=number], input[type=time] { height: 52px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.error { color: var(--accent); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* a tick box with its words beside it, big enough to see and hit */
.tick { display: flex; align-items: center; gap: 14px; font-weight: 700; margin-top: 18px; cursor: pointer; }
.tick input { width: 30px; height: 30px; min-height: 0; flex: 0 0 auto; margin: 0; accent-color: var(--accent, #e0875f); }
/* the host's live feed on the game page: its own scrolling box, newest at the bottom */
.feedbox { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-top: 6px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
/* the live feed sits flat in the panel: no card border or padding around it (they only took room) */
.feedcard { padding: 0; }
.feedcard h2 { margin-bottom: 2px; }
.feedrow { display: flex; gap: 10px; align-items: baseline; line-height: 1.35; }
.feedrow .dot { flex: 0 0 auto; transform: translateY(2px); }
.feedrow.feed-phase { font-weight: 700; margin-top: 6px; }
/* the host's live feed: country pills, as on the stream */
.feedrow { padding-left: 8px; }
.feedrow .feedtag { flex: 0 0 auto; min-width: 6.4em; text-align: center; font: 700 17px/1 Lato, sans-serif; letter-spacing: .05em; text-transform: uppercase; padding: 5px 6px; border-radius: 5px; }

/* MyStreamRunner's two addresses: name, then the address with its Copy button beside it */
.msrAddr { margin-top: 10px; }
.msrName { font-weight: 700; }
.msrRow { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.msrUrl { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 700; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.msrCopy { flex: 0 0 auto; min-width: 6em; }

/* the kind of game, in front of its name in the games list */
.kindTag { display: inline-block; margin-right: 10px; padding: 2px 10px; border-radius: 999px; font-size: 16px; font-weight: 700; vertical-align: 2px; }
.kindTag.stream { background: #8a2a1e; color: #fff; }
.kindTag.player { background: #2c5a3a; color: #fff; }

/* the team's pill: the away team in red, the home team in blue (the colours on the field) */
.sidetag { flex: 0 0 auto; min-width: 5.2em; text-align: center; font: 700 17px/1 Lato, sans-serif; letter-spacing: .05em; text-transform: uppercase; padding: 5px 6px; border-radius: 5px; color: #fff; }
.sidetag.away { background: #c8402e; }
.sidetag.home { background: #2a63c9; }

/* the voyage page (GalaxyOne's flight page) */
html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
header { flex: 0 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
header h1 { font-size: 30px; }
#phase { font-weight: 700; color: var(--muted); }
main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 0.42fr); }
#view { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #000; }
#loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: #ffe9c4; background: #140a08; z-index: 5; }
#hud { position: absolute; left: 16px; bottom: 16px; width: 330px; max-width: calc(100% - 32px); box-sizing: border-box; background: rgba(20, 10, 8, .66); border: 1px solid rgba(255, 201, 77, .35); border-radius: 10px; padding: 10px 14px; font-weight: 700; }
#hud .row { display: flex; justify-content: space-between; gap: 1em; white-space: nowrap; }
#hud .k { color: #d9c2a8; } #hud .v { font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
#bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); margin-top: 6px; overflow: hidden; visibility: hidden; }
#bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2fb3ff, #ffc94d); }
.hudBox { position: absolute; box-sizing: border-box; background: rgba(20, 10, 8, .66); border: 1px solid rgba(255, 201, 77, .3); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 17px; line-height: 1.3; }
.hudBox .row { display: flex; justify-content: space-between; gap: 1em; white-space: nowrap; }
.hudBox .k { color: #d9c2a8; overflow: hidden; text-overflow: ellipsis; } .hudBox .v { font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.hudHead { color: #ffc94d; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
#nav { left: 16px; top: 16px; width: 340px; }
#near { right: 16px; top: 16px; width: 280px; }
#line { left: 362px; right: 16px; bottom: 16px; height: 74px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
#line .tag { color: #ffc94d; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; } #line.ad .tag { color: #ffd27a; } #line.src .tag { color: #b8f5a0; }
#line .txt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#line.fresh .txt { animation: lineIn .8s ease-out; }
@keyframes lineIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 1100px) { #near { display: none; } }
@media (max-width: 900px) { #nav, #line { display: none; } }
aside { min-height: 0; overflow: auto; border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 16px; -webkit-overflow-scrolling: touch; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.keys button { min-height: 56px; padding: 8px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 18px; min-width: 0; }
.pickRow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pickRow button.blank { visibility: hidden; }
.pickRow button { height: 68px; padding: 4px 3px; font-size: 17px; line-height: 1.12; white-space: normal; overflow: hidden; overflow-wrap: anywhere; min-width: 0; }
.placeRow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 10px; align-items: end; }
.viewRow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 8px; }
.upLine { margin: 6px 0 0; min-height: 1.45em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logrow { line-height: 1.35; padding: 2px 0 2px 10px; border-left: 4px solid transparent; }
.logrow.arrived { border-left-color: #ffc94d; } .logrow.time, .logrow.sight, .logrow.pin { border-left-color: #ffd27a; }
.logrow .t { color: var(--muted); font-size: 16px; margin-right: 8px; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  main { grid-template-columns: 1fr !important; grid-template-rows: 52% minmax(0, 1fr); }
  aside { border-left: 0; border-top: 1px solid var(--line); }
  .keys { grid-template-columns: repeat(3, 1fr); }
}

/* names on the picture: the places, and high up the oceans and continents */
.mapLabel { position: absolute; left: 0; top: 0; padding-left: 10px; margin-top: -11px; white-space: nowrap; color: #eef6fb; font: 700 18px/1.2 Lato, -apple-system, sans-serif; text-shadow: 0 0 4px #000, 0 0 8px #000, 0 0 2px #000; will-change: transform; }
.mapLabel::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: #ffc94d; box-shadow: 0 0 4px #000; }
.mapLabel.dest { color: #ffd27a; font-size: 21px; }
.mapLabel.dest::before { background: #ffd27a; }
.mapLabel.region { padding-left: 0; color: #cfe7f5; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }
.mapLabel.region::before { display: none; }

/* the right column in tabs, as MyDeep's app: a row of pill tabs, only the chosen tab's part scrolls */
aside { overflow: hidden; gap: 8px; padding: 10px 12px; }
.tabs { flex: 0 0 auto; display: flex; gap: 4px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.tabs .tab { flex: 1 1 auto; min-width: 0; padding: 6px 6px; min-height: 0; background: transparent; color: var(--ink); font-weight: 700; font-size: 17px; border-radius: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs .gear { flex: 0 0 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.tabs .gear svg { width: 22px; height: 22px; fill: currentColor; }
.tabs .tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tabBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; -webkit-overflow-scrolling: touch; }
.tabBody .feedcard { flex: 1 0 300px; min-height: 300px; display: flex; flex-direction: column; }
.tabBody .feedbox { flex: 1 1 auto; min-height: 0; max-height: none; }
/* names on the picture: stations in gold, peaks with their height, lakes and glaciers in blue */
.mapLabel.station { color: #ffe3a3; }
.mapLabel.lake::before, .mapLabel.glacier::before { background: #8fd3ff; }
.mapLabel.peak::before { background: #ffffff; }

/* tighter: less room between the keys, the lists and the choices */
aside .card { padding: 12px 14px; }
aside .card h2 { font-size: 24px; }
.keys { margin-top: 6px; gap: 6px; }
.keys button { min-height: 50px; }
.placeRow { margin-top: 8px; gap: 8px; }
.viewRow { margin-top: 6px; }
.pickRow button { height: 56px; }
label, .fieldName { margin-bottom: 4px; }
/* names on the picture stay under the instruments */
.mapLabel { z-index: 1; } #hud, .hudBox { z-index: 3; }
.viewLine { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 8px; align-items: end; }
.viewLine button { min-height: 52px; padding: 8px 12px; }
aside .card h2 { margin-bottom: 2px; }
.pickRow button { height: 52px; }
.upLine { margin-top: 0; }
