/* PinguEye: an air defence radar console. Phosphor green on near-black. */
:root {
  --pe-bg: #05090b;
  --pe-panel: #0a1216;
  --pe-line: #15343a;
  --pe-text: #9fe8c0;
  --pe-dim: #4f7f6c;
  --pe-bright: #d9ffe9;
  --pe-active: #39ff7a;
  --pe-sigint: #ffb000;
  --pe-penint: #4fc3d9;
  --pe-elint: #a58bff;
  --pe-platform: #ff5cf4;
  --pe-alert: #ff4a3d;
}
html, body { margin: 0; height: 100%; background: var(--pe-bg); color: var(--pe-text);
  font-family: "DejaVu Sans Mono", "Consolas", "Menlo", monospace; font-size: 12px; }
a { color: var(--pe-bright); }
.pe-btn { background: #0f2329; color: var(--pe-bright); border: 1px solid #2d6b5a; border-radius: 2px;
  padding: .3em .8em; font: inherit; letter-spacing: .08em; cursor: pointer; text-transform: uppercase; }
.pe-btn:hover { background: #17363d; }
.pe-btn.on { background: #1d5a3c; border-color: var(--pe-active); color: #fff; }
.pe-btn.warn { border-color: var(--pe-alert); }
.pe-label { color: var(--pe-dim); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }

/* layout */
#pe-app { display: grid; grid-template-rows: auto 1fr 22px; grid-template-columns: 1fr 340px;
  height: 100vh; }
#pe-top { grid-column: 1 / 3; display: flex; flex-wrap: wrap; align-items: center; gap: .35em .9em;
  padding: .35em .8em; min-height: 34px; box-sizing: border-box; font-size: 11px;
  background: linear-gradient(#0d1a1f, #071014); border-bottom: 1px solid var(--pe-line); }
#pe-top .title { color: var(--pe-bright); font-weight: bold; letter-spacing: .25em; }
#pe-top .title span { color: var(--pe-active); }
#pe-top .spacer { flex: 1; }
#pe-top .stat { color: var(--pe-dim); white-space: nowrap; }
#pe-top .pe-btn { padding: .2em .55em; white-space: nowrap; font-size: 10px; }
@media (max-width: 1600px) { #pe-top .wide { display: none; } }
#pe-top .stat b { color: var(--pe-text); font-weight: normal; }
#pe-clock { color: var(--pe-bright); letter-spacing: .1em; }
#pe-mapwrap { position: relative; overflow: hidden; }
#pe-map { position: absolute; inset: 0; background: #000; }
#pe-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 450; }
#pe-side { background: var(--pe-panel); border-left: 1px solid var(--pe-line); overflow-y: auto;
  padding: .6em .7em; }
#pe-bottom { grid-column: 1 / 3; display: flex; gap: 2em; align-items: center; padding: 0 .8em;
  border-top: 1px solid var(--pe-line); color: var(--pe-dim); background: #071014; }
#pe-bottom b { color: var(--pe-text); font-weight: normal; }
.pe-phonenote { display: none; }
/* The side panel hidden (the top bar's Panel button): all map. */

/* the map darker and greener */
#pe-map .leaflet-tile-pane { filter: brightness(.55) sepia(.5) hue-rotate(95deg) saturate(1.4); }
#pe-map .leaflet-control-zoom a { background: #0f2329; color: var(--pe-bright); border-color: #2d6b5a; }
#pe-map .leaflet-control-attribution { background: rgba(0,0,0,.6); color: #3d5f52; }
#pe-map .leaflet-control-attribution a { color: #4f7f6c; }

.pe-section { border: 1px solid var(--pe-line); margin-bottom: .7em; padding: .5em .6em; }
.pe-section h3 { margin: 0 0 .4em; font-size: 10px; letter-spacing: .2em; color: var(--pe-dim);
  font-weight: normal; text-transform: uppercase; }
.pe-row { display: flex; flex-wrap: wrap; gap: .35em; align-items: center; }
.pe-filter { display: inline-flex; align-items: center; gap: .3em; margin-right: .6em; cursor: pointer; }
.pe-filter i { display: inline-block; width: 9px; height: 9px; }
.pe-card { border: 1px solid var(--pe-line); border-left: 3px solid var(--pe-text); padding: .45em .55em;
  margin-bottom: .5em; background: #071014; }
.pe-card.ACTIVE { border-left-color: var(--pe-active); }
.pe-card.SIGINT { border-left-color: var(--pe-sigint); }
.pe-card.PENINT { border-left-color: var(--pe-penint); }
.pe-card.ELINT { border-left-color: var(--pe-elint); }
.pe-card.PLATFORM { border-left-color: var(--pe-platform); }
.pe-card .cs { color: var(--pe-bright); font-size: 14px; font-weight: bold; letter-spacing: .08em; }
.pe-card .cls { float: right; font-size: 10px; letter-spacing: .15em; }
.pe-card table { border-collapse: collapse; width: 100%; margin-top: .3em; }
.pe-card td { padding: 1px 0; vertical-align: top; }
.pe-card td:first-child { color: var(--pe-dim); width: 34%; text-transform: uppercase; font-size: 10px;
  letter-spacing: .08em; padding-top: 2px; }
.pe-card .x { float: right; cursor: pointer; color: var(--pe-dim); margin-left: .6em; }
.pe-card textarea { width: 100%; box-sizing: border-box; background: #000; color: var(--pe-active);
  border: 1px solid #2d6b5a; font: inherit; text-transform: uppercase; min-height: 4em; margin-top: .3em; }
.pe-empty { color: var(--pe-dim); font-style: italic; }
.pe-note { color: var(--pe-dim); font-size: 11px; line-height: 1.4; }
.pe-scan { pointer-events: none; position: absolute; inset: 0; z-index: 460;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0,0,0,.18) 2px 3px); }

table.pe-arr { border-collapse: collapse; width: 100%; font-size: 11px; }
table.pe-arr th { color: var(--pe-dim); font-weight: normal; text-align: left; font-size: 10px;
  letter-spacing: .08em; border-bottom: 1px solid var(--pe-line); }
table.pe-arr td { padding: 1px 3px 1px 0; cursor: pointer; }
table.pe-arr tr:hover td { background: #0f2329; }
.pe-iff-nice { color: #5aa9ff; }
.pe-iff-naughty { color: var(--pe-alert); }
.pe-iffrow { display: flex; justify-content: space-between; gap: .4em; }
.pe-iffrow .x { cursor: pointer; color: var(--pe-dim); }
.pe-card .iffbtns { margin-top: .35em; display: flex; gap: .3em; flex-wrap: wrap; }
.pe-card details { margin-top: .3em; }
.pe-card summary { cursor: pointer; color: var(--pe-dim); font-size: 10px; letter-spacing: .12em; }
.pe-card .rmk { font-size: 10px; color: var(--pe-dim); word-break: break-word; }

#pe-modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 2000; display: flex;
  align-items: center; justify-content: center; }
#pe-modal[hidden] { display: none; }
#pe-modal .box { width: 420px; background: var(--pe-panel); border: 1px solid #2d6b5a; padding: 1em;
  box-shadow: 0 0 30px rgba(57,255,122,.12); }
#pe-modal h3 { margin: 0 0 .4em; color: var(--pe-bright); letter-spacing: .1em; font-size: 13px; }
#pe-modal textarea { width: 100%; box-sizing: border-box; background: #000; color: var(--pe-active);
  border: 1px solid #2d6b5a; font: inherit; text-transform: uppercase; }

#pe-hint { position: absolute; z-index: 470; left: 50%; top: 40%; transform: translate(-50%, -50%);
  max-width: 460px; padding: 1em 1.3em; text-align: center; background: rgba(5,9,11,.88);
  border: 1px solid var(--pe-sigint); color: var(--pe-sigint); letter-spacing: .08em; line-height: 1.5; }
#pe-hint[hidden] { display: none; }
#pe-hint .pe-btn { margin-top: .7em; }

#pe-found { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); }
#pe-found[hidden] { display: none; }
#pe-found .box { position: relative; max-width: min(900px, 92vw); border: 3px solid #ff6fae;
  box-shadow: 0 0 50px rgba(255,111,174,.55); background: #000; }
#pe-found img { display: block; width: 100%; max-height: 78vh; object-fit: contain; }
#pe-found .cap { text-align: center; color: #ff8fc0; letter-spacing: .25em; padding: .5em; font-size: 14px; }
#pe-found .x { position: absolute; top: 6px; right: 8px; background: rgba(0,0,0,.6); color: #fff;
  border: 1px solid #ff6fae; font-size: 18px; cursor: pointer; line-height: 1; padding: .1em .4em; }

.pe-warn { color: var(--pe-sigint); border: 1px solid var(--pe-sigint); padding: .4em .6em; line-height: 1.4; }
#pe-found .eggnog { text-align: center; color: #fff; background: #b3123b; font-size: 26px; font-weight: bold;
  letter-spacing: .18em; padding: .35em .5em; text-shadow: 0 0 10px #ff6fae; }

#pe-balls { position: fixed; inset: 0; z-index: 2050; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); }
#pe-balls[hidden] { display: none; }
/* (the Grinch's machine: Grinch green) */
#pe-balls .box { position: relative; background: radial-gradient(#13300f, #040a03); border: 3px solid #8fd400;
  box-shadow: 0 0 40px rgba(143,212,0,.45); padding: .8em 1em 1em; text-align: center; }
#pe-balls .title { color: #b6ff00; font-size: 26px; font-weight: bold; letter-spacing: .2em; text-shadow: 0 0 12px #4c8a00; }
#pe-balls .sub { color: #cfe8a9; font-size: 10px; letter-spacing: .12em; margin-bottom: .4em; max-width: 520px; margin-left: auto;
  margin-right: auto; }
#pe-balls canvas { display: block; margin: 0 auto; max-width: 92vw; }
#pe-balls .result { white-space: normal; max-width: 640px; margin-left: auto; margin-right: auto; }
#pe-balls .result { color: #fff; font-size: 18px; letter-spacing: .12em; min-height: 1.4em; margin-top: .3em;
  text-shadow: 0 0 8px #8fd400; }
#pe-balls .x { position: absolute; top: 6px; right: 8px; background: transparent; color: #ffd84a;
  border: 1px solid #ffd84a; font-size: 18px; cursor: pointer; line-height: 1; padding: .1em .4em; }

/* The fighter game */
.pe-card.FIGHTER { border-left-color: #ffffff; }
.pe-lock { color: #ff4a3d; font-weight: bold; letter-spacing: .15em; animation: pe-blink .8s steps(2) infinite; }
@keyframes pe-blink { 50% { opacity: 0; } }
.pe-btn[disabled] { opacity: .35; cursor: default; }
.pe-score { border-collapse: collapse; width: 100%; margin-bottom: .4em; }
.pe-score td { padding: 1px 0; color: var(--pe-bright); }
.pe-score td:last-child { text-align: right; font-weight: bold; color: #ffd84a; }
.pe-score tr:first-child td { color: #ff8b8b; }
.pe-go { color: var(--pe-active); letter-spacing: .06em; margin: .2em 0; }
.pe-nogo { color: var(--pe-sigint); letter-spacing: .06em; margin: .2em 0; }
.pe-bases td .pe-btn { padding: .05em .4em; font-size: 10px; margin-left: .2em; }
/* REFUEL ("2×10:05": how many, the first one ready in) on one line; the
   base names wrap instead. */
.pe-bases td.rf, .pe-bases td:last-child { white-space: nowrap; }
.pe-bases tr.hist td { color: #ffd84a; font-size: 11px; }
.pe-loadout { margin: .35em 0 .15em; gap: .3em; }
.pe-loadout select { background: #000; color: var(--pe-active); border: 1px solid #2d6b5a; font: inherit; }
           background: rgba(0,0,0,.65); }
                background: radial-gradient(#2a0d0d, #0b0404); border: 3px solid #ff4a3d; padding: 1em 1.2em;
                box-shadow: 0 0 40px rgba(255,74,61,.35); }
                 border-bottom: 1px solid rgba(255,74,61,.15); }
#pe-toast { position: fixed; top: 46px; left: 50%; transform: translateX(-50%); z-index: 2040; max-width: 80vw;
            background: #1a0b0b; border: 2px solid #ff4a3d; color: #ffd9d4; padding: .5em 1em; letter-spacing: .08em;
            font-weight: bold; box-shadow: 0 0 20px rgba(255,74,61,.3); }
#pe-toast.good { border-color: #ffd84a; color: #ffd84a; }
/* (v2: a clear bar under the top bar -- bigger, can't be missed) */
#pe-toast { font-size: 15px; padding: .55em 1.4em; min-width: 40vw; text-align: center; z-index: 2600;
            box-shadow: 0 0 30px rgba(0,0,0,.8); }
#pe-toast.good { background: #1c1700; }
#pe-toast.sticky { animation: pe-toast-pulse 1.2s ease-in-out infinite; }
@keyframes pe-toast-pulse { 50% { box-shadow: 0 0 34px rgba(255,216,74,.6); } }
#pe-toast[hidden] { display: none; }

/* Santa & Mavis control (admins) */
.pe-smblock { border-left: 2px solid #3a2a2a; padding: .2em 0 .3em .5em; margin-bottom: .4em; }
.pe-smblock .pe-row { gap: .25em; margin-top: .25em; flex-wrap: wrap; }
.pe-smblock .sm-in { width: 3.6em; background: #000; color: var(--pe-active); border: 1px solid #2d6b5a; font: inherit; }

/* The fighters' datalink */
#pe-datalink { position: absolute; left: 10px; bottom: 26px; z-index: 900; width: min(520px, 60%);
               background: rgba(4,12,10,.88); border: 1px solid #2d6b5a; box-shadow: 0 0 14px rgba(57,255,122,.12); }
#pe-datalink[hidden] { display: none; }
#pe-datalink .hd { display: flex; align-items: center; gap: .5em; padding: .2em .5em; color: var(--pe-bright);
                   letter-spacing: .2em; font-size: 10px; border-bottom: 1px solid var(--pe-line); }
#pe-datalink .hd .pe-btn { padding: 0 .5em; }
#pe-datalink #dl-wide { margin-left: auto; }
#pe-datalink { display: flex; flex-direction: column; max-width: calc(100% - 20px); max-height: calc(100% - 40px); }
#pe-datalink[hidden] { display: none; }
#pe-datalink.wide { right: calc(min(380px, 40%) + 20px); width: auto !important; }   /* clear of the chat */
#pe-datalink.min { width: auto !important; right: auto; height: auto !important; }      /* just its title bar */
#pe-datalink.sized #dl-lines { max-height: none; flex: 1 1 auto; }
#dl-grip { cursor: nesw-resize; color: var(--pe-dim); padding: 0 .2em; font-size: 14px; user-select: none; touch-action: none; }
#dl-grip:hover { color: #fff; }
#dl-lines { max-height: 9.5em; overflow-y: auto; padding: .25em .5em; font-size: 11px; line-height: 1.35; }
#pe-datalink.min #dl-lines { display: none; }
#dl-lines .dl { color: #7fa89a; }
#dl-lines .dl.mine { color: #d9ffe9; }
#dl-lines .dl.note.good { color: #ffd84a; font-weight: bold; }      /* notices to you (this page only) */
#dl-lines .dl.note.err { color: #ff6b5b; font-weight: bold; }
#dl-lines .dl .t { color: #4f6e64; margin-right: .5em; }
#dl-lines .dl .cs { color: #fff; cursor: pointer; margin-right: .4em; }

/* The game's scoreboard over the map */
#pe-scoreboard { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 950;
                 display: flex; align-items: center; gap: 1.2em; padding: .35em 1.2em;
                 background: linear-gradient(#2a0b0b, #120404); border: 2px solid #ffd84a; border-radius: 4px;
                 box-shadow: 0 0 24px rgba(255,216,74,.25); white-space: nowrap; pointer-events: none; }
#pe-scoreboard[hidden] { display: none; }
#pe-scoreboard .side { display: flex; align-items: baseline; gap: .45em; letter-spacing: .12em; font-size: 13px; color: #ffe9b0; }
#pe-scoreboard .pts { font-size: 30px; font-weight: bold; color: #ffd84a; text-shadow: 0 0 10px #ff9d00; line-height: 1; }
#pe-scoreboard .santa .pts { color: #ff6b6b; text-shadow: 0 0 10px #ff2020; }
#pe-scoreboard .vs { color: #9a7d3a; font-size: 12px; letter-spacing: .3em; }
#pe-scoreboard .ops { display: flex; gap: 1em; }
#pe-scoreboard .op { display: flex; align-items: baseline; gap: .35em; font-size: 12px; color: #ffe9b0; letter-spacing: .1em; }
#pe-scoreboard .op .pts { font-size: 22px; }
#pe-scoreboard .op.me { color: #fff; }
#pe-toast { top: 38px; }

/* Your fighters' control panels, at the left of the map */
#pe-fpanels { position: absolute; left: 10px; top: 92px; z-index: 920; width: 280px; display: flex; flex-direction: column;
              max-height: calc(100% - 300px); overflow-y: auto; overflow-x: hidden; }
/* Everything in a panel wraps rather than widening it (no side scrolling). */
#pe-fpanels .fp { box-sizing: border-box; max-width: 100%; }
#pe-fpanels .fp .top { flex-wrap: nowrap; }
#pe-fpanels .fp .top .ty { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pe-fpanels .fp .top .lk:empty { display: none; }
#pe-fpanels .fp .ln { overflow-wrap: anywhere; }
#pe-fpanels .fp { background: rgba(6,14,16,.92); border: 1px solid #c9d6dc; border-left: 4px solid #fff; padding: .4em .55em;
                  margin-bottom: 8px; font-size: 11px; box-shadow: 0 0 12px rgba(0,0,0,.6); }
#pe-fpanels .fp.locked { border-color: #ff4a3d; animation: pe-fplock 0.8s steps(2) infinite; }
@keyframes pe-fplock { 50% { border-color: #5a1010; } }
#pe-fpanels .fp .top { display: flex; align-items: baseline; gap: .5em; }
#pe-fpanels .fp .cs { color: #fff; font-weight: bold; font-size: 14px; letter-spacing: .08em; cursor: pointer; }
#pe-fpanels .fp .ty { color: var(--pe-dim); }
#pe-fpanels .fp .lk { margin-left: auto; color: #ff4a3d; font-weight: bold; letter-spacing: .15em; }
#pe-fpanels .fp .ln { color: var(--pe-bright); margin-top: .15em; }
#pe-fpanels .fp .ln b { color: #fff; font-weight: normal; }
#pe-fpanels .fp .fuel { height: 6px; background: #1a2a26; margin: .25em 0 .1em; position: relative; }
#pe-fpanels .fp .fuel i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--pe-active); }
#pe-fpanels .fp .fuel s { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #ff4a3d; }
#pe-fpanels .fp .row { display: flex; gap: .25em; margin-top: .35em; align-items: center; flex-wrap: wrap; }
#pe-fpanels .fp input { width: 3.4em; background: #000; color: var(--pe-active); border: 1px solid #2d6b5a; font: inherit; }
#pe-fpanels .fp .pe-btn { padding: .15em .45em; font-size: 10px; }


#pe-scoreboard { pointer-events: auto; cursor: help; }
.pe-pop { position: fixed; inset: 0; z-index: 2070; display: flex; align-items: center; justify-content: center;
            background: rgba(0,0,0,.65); }
.pe-pop[hidden] { display: none; }
.pe-pop .box { position: relative; width: min(680px, 94vw); max-height: 88vh; overflow-y: auto; padding: 1em 1.3em;
                 background: var(--pe-panel); border: 2px solid #ffd84a; box-shadow: 0 0 30px rgba(255,216,74,.2); }
.pe-pop .title { color: #ffd84a; font-size: 18px; font-weight: bold; letter-spacing: .15em; margin-bottom: .4em; }
.pe-pop h4 { margin: .8em 0 .2em; color: var(--pe-bright); letter-spacing: .15em; font-size: 11px; text-transform: uppercase; }
.pe-pop p { margin: .2em 0; line-height: 1.45; color: var(--pe-text); }
.pe-pop b { color: #fff; }
.pe-pop .x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }

#pe-fpanels .fp .pe-btn.pending { background: #5a4a10; border-color: #ffd84a; color: #fff; }

.pe-iffrow.pe-me span:first-child { color: #fff; font-weight: bold; background: #1d5a3c; padding: 0 .3em; }
#pe-scoreboard .op.me { color: #fff; font-weight: bold; background: rgba(255,216,74,.18); padding: 0 .4em; border-radius: 3px; }

#pe-fpanels .fp .fpstate { color: #fff; letter-spacing: .06em; }
#pe-fpanels .fp .fpmode .pe-btn.on[data-k="m-auto"] { background: #1d5a3c; border-color: var(--pe-active); }
#pe-fpanels .fp .fpmode .pe-btn.on[data-k="m-man"] { background: #5a4a10; border-color: #ffd84a; }
#pe-fpanels .fp .fpmode .pe-btn.on[data-k="m-rtb"] { background: #10305a; border-color: #5aa9ff; }
#pe-fpanels .fp.rtb { border-left-color: #5aa9ff; opacity: .85; }
#pe-fpanels .fp .pe-btn[disabled]:not(.on), #pe-fpanels .fp input[disabled] { opacity: .35; }

/* The game: OPS MSG, STCA, the scoreboard, warning shots, fake/blinking Santas. */
.pe-btn.pe-ops { background: #5a1010; border-color: #ff4a3d; color: #fff; font-weight: bold; letter-spacing: .1em; }
.pe-btn.pe-ops.unread { animation: pe-opsblink .7s steps(2) infinite; }
@keyframes pe-opsblink { 50% { background: #ff2a1a; color: #fff; box-shadow: 0 0 12px #ff4a3d; } }
.pe-btn.pe-stca { background: #3a2a00; border-color: #ffb000; color: #ffd84a; font-weight: bold; letter-spacing: .15em; }
.pe-btn.pe-stca.alert { animation: pe-stcablink .5s steps(2) infinite; }
.pe-btn.pe-stca.seen { background: #5a1a10; border-color: #ff4a3d; color: #ffb3a8; }   /* (read: steady while it lasts) */
.pe-btn.pe-stca.idle { background: #1d1a10; border-color: #6b5a2a; color: #b39a55; font-weight: normal; }
@keyframes pe-stcablink { 50% { background: #ff2a1a; border-color: #fff; color: #fff; } }
#pe-stcabox { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); z-index: 960;
              background: rgba(30,10,4,.95); border: 2px solid #ffb000; padding: .6em .9em; min-width: 320px;
              max-width: 90%; text-align: center; color: #ffe9b0; letter-spacing: .06em; }
#pe-stcabox[hidden] { display: none; }
#pe-stcabox .hd { color: #ff4a3d; font-weight: bold; letter-spacing: .2em; margin-bottom: .3em; }
#pe-stcabox .pe-btn { margin: .25em; padding: .3em .7em; }
#pe-stcabox .reply { color: #fff; margin-top: .3em; }
#pe-stcabox .reply.ok { color: #ffd84a; }
#pe-stcabox .reply.fail { color: #ffb3a8; }
.pe-pop .notam { white-space: pre-wrap; font: 12px/1.45 "DejaVu Sans Mono", monospace; color: var(--pe-active);
                 background: #000; border: 1px solid #1d4a3e; padding: .6em .8em; margin: .5em 0; }
.pe-pop .notam.old { color: var(--pe-dim); }
.pe-pop table.pe-arr td, .pe-pop table.pe-arr th { padding: .15em .5em; }
.pe-pop tr.me td { color: #fff; background: rgba(255,216,74,.18); }
.pe-pop .badge { display: inline-block; padding: 0 .4em; margin: .1em 0; border: 1px solid #ffd84a; color: #ffd84a;
                 font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
/* The score ticker under the scoreboard. */
#pe-scorefeed { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); z-index: 940;
                width: min(560px, 80%); pointer-events: none; overflow: hidden; }
#pe-scorefeed .tick { margin-top: 3px; padding: .2em .8em; background: rgba(20,14,0,.88); border-top: 1px solid #ffd84a;
                      border-bottom: 1px solid #ffd84a; color: #ffe9b0; letter-spacing: .12em; font-size: 12px;
                      white-space: nowrap; animation: pe-tickin .5s ease-out; transition: opacity .8s; }
#pe-scorefeed .tick b { color: #ffd84a; }
#pe-scorefeed .tick.me { color: #fff; background: rgba(60,45,0,.92); }
#pe-scorefeed .tick.santa { border-color: #ff4a3d; color: #ffb3a8; }
#pe-scorefeed .tick.santa b { color: #ff6b6b; }
#pe-scorefeed .tick.gone { opacity: 0; }
@keyframes pe-tickin { from { transform: translateX(105%); } to { transform: translateX(0); } }
#pe-scoreboard .rank { font-size: 11px; color: #ffe9b0; letter-spacing: .12em; }
#pe-scoreboard .final { color: #fff; background: #8a1010; border: 1px solid #ff4a3d; padding: .1em .5em;
                        font-size: 11px; letter-spacing: .15em; }
#pe-fpanels .fp.sighting { border-color: #ffd84a; animation: pe-fplock 0.8s steps(2) infinite; }
#pe-fpanels .fp .pe-btn.pe-warn { background: #5a1010; border-color: #ff4a3d; color: #fff; font-weight: bold; }
#pe-fpanels .fp .pe-btn.pe-warn[disabled] { background: #2a1414; border-color: #553; color: #866; opacity: .5; }
#pe-fpanels .fp .fpmode .pe-btn.on[data-k="m-orbit"] { background: #3a1d5a; border-color: #b18cff; }
#pe-fpanels .fp .ln.sg { color: #ffd84a; }
#pe-fpanels .fp .pe-btn.pe-hold { background: #10305a; border-color: #5aa9ff; color: #fff; font-weight: bold; }
#pe-fpanels .fp .pe-btn.pe-hold[disabled] { background: #141a2a; border-color: #335; color: #668; opacity: .5; }

/* Admins' controls: a floating panel (no backdrop: the map stays usable,
   e.g. for Move), closed only by its CLOSE button. */
#pe-admin { position: fixed; top: 40px; right: 8px; z-index: 2000; width: min(460px, 96vw); max-height: calc(100vh - 56px);
            overflow-y: auto; background: rgba(6,14,16,.97); border: 2px solid #ffb000; box-shadow: 0 0 30px rgba(0,0,0,.7); }
#pe-admin[hidden] { display: none; }
#pe-admin .hd { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center;
                background: #3a2a00; color: #ffd84a; font-weight: bold; letter-spacing: .3em; padding: .35em .6em; }
#pe-admin .pe-adminbtns .pe-btn { margin: .15em; }
.pe-btn#btn-admin { border-color: #ffb000; color: #ffd84a; }
.pe-btn#btn-admin.on { background: #3a2a00; }

/* Fighter panels folded down to the essentials (its fold button). */
#pe-fpanels .fp .fpmini { margin-left: .4em; padding: 0 .45em; }
#pe-fpanels .fp.mini .ln:not(.fpstate):not(.sg), #pe-fpanels .fp.mini .fuel,
#pe-fpanels .fp.mini .row:not(.warnrow) { display: none; }

/* Tablets and other touch screens (e.g. the GETAC F110): controls big
   enough for a finger (or a glove). */
@media (pointer: coarse) {
  .pe-btn { min-height: 34px; padding: .45em .9em; font-size: 13px; }
  #pe-top .pe-btn { font-size: 12px; padding: .35em .7em; min-height: 32px; }
  #pe-side { font-size: 13px; }
  .pe-filter { display: inline-flex; align-items: center; padding: .25em .4em .25em 0; }
  .pe-filter input { width: 20px; height: 20px; }
  .pe-bases td .pe-btn { font-size: 12px; padding: .35em .6em; min-height: 32px; }
  #pe-fpanels { width: 310px; }
  #pe-fpanels .fp { font-size: 12.5px; }
  #pe-fpanels .fp .pe-btn { font-size: 12px; padding: .4em .6em; min-height: 34px; }
  #pe-fpanels .fp input { width: 4em; font-size: 15px; min-height: 30px; }
  #pe-datalink { font-size: 12.5px; }
  #pe-datalink .hd .pe-btn { min-height: 30px; padding: 0 .9em; }
  .pe-pop .x { font-size: 32px; }
  #pe-admin .pe-btn { min-height: 32px; }
}

/* Phones: watch only -- the map and the scoreboard. */
/* Phones (pingueye_phone.js): the map, a compact top bar, and a bottom sheet with tabs holding the panels. */
body.pe-phone #pe-app { grid-template-columns: 1fr; grid-template-rows: 1fr; padding-bottom: 62px; box-sizing: border-box; }   /* (the top bar is in MENU) */
body.pe-phone #pe-side, body.pe-phone #pe-fpanels, body.pe-phone #pe-stcabox,
body.pe-phone #pe-bottom, body.pe-phone #pe-hint, body.pe-phone #pe-admin { display: none !important; }
body.pe-phone #pe-top { gap: .25em .5em; padding: .25em .4em; font-size: 10px; }
body.pe-phone #pe-top > .stat, body.pe-phone #pe-top #btn-players, body.pe-phone #pe-top #btn-sectors,
body.pe-phone #pe-top #btn-legend, body.pe-phone #pe-top #btn-arrivals, body.pe-phone #pe-top .spacer,
body.pe-phone #pe-top #pe-clock, body.pe-phone .pe-phonenote { display: none !important; }
body.pe-phone #fssg-hud .pe-note, body.pe-phone #fssg-hud .stat[title^="The next"] { display: none; }
body.pe-phone #pe-top .pe-btn { font-size: 10px; padding: .3em .5em; min-height: 28px; }
body.pe-phone #pe-scoreboard { transform: translateX(-50%) scale(.7); transform-origin: top center; max-width: 140%; }
body.pe-phone #pe-scorefeed { top: 44px; width: 94%; }
body.pe-phone #pe-scorefeed .tick { font-size: 10px; white-space: normal; }
#ph-sheet { display: none; }
body.pe-phone #ph-sheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400;
  background: #061013; border-top: 1px solid #2d6b5a; box-shadow: 0 -6px 20px rgba(0,0,0,.6); max-height: 62px; transition: max-height .2s; }
#ph-last { flex: 0 0 auto; height: 22px; line-height: 22px; padding: 0 .5em; font-size: 11px; color: #d9ffe9; white-space: nowrap;
  overflow: hidden; background: rgba(4,14,12,.95); border-bottom: 1px solid #12332a; }
#ph-last[hidden] { display: none; }
#ph-last .ph-run { display: inline-block; white-space: nowrap; }
#ph-last .ph-run.long { animation: ph-run linear infinite; }
@keyframes ph-run { 0%, 15% { transform: translateX(0); } 85%, 100% { transform: translateX(var(--shift)); } }
body.pe-phone #ph-sheet[hidden] { display: none; }
body.pe-phone #ph-sheet.open { max-height: 55vh; height: 55vh; }
@media (max-height: 500px) { body.pe-phone #ph-sheet.open { max-height: 70vh; height: 70vh; } }   /* (a phone on its side) */
#ph-tabs { display: flex; flex: 0 0 40px; }
#ph-tabs .pe-btn { flex: 1; font-size: 10px; padding: 0 .2em; border-radius: 0; border-width: 0 1px 0 0; letter-spacing: .04em; position: relative; }
#ph-tabs .pe-btn.on { background: #1d5a3c; color: #fff; }
#ph-tabs .pe-btn.has:not(.on) { color: #80e0ff; }
#ph-tabs .pe-btn.stca { animation: pe-stcablink .5s steps(2) infinite; }      /* (a conflict alert) */             /* (FIGHTERS: you have some up) */
#ph-tabs .pe-btn .dot { display: none; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #ffd84a; }
#ph-tabs .pe-btn.new .dot, #ph-tabs .pe-btn.jb .dot { display: block; }   /* (.jb: the jukebox is playing) */
#ph-panes { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: .3em .5em; }
#ph-panes #fssg-boxtoggle { display: none; }
#ph-panes #fssg-vatsimbox.folded > * { display: revert !important; }
#ph-panes .ph-pane > * { position: static !important; width: auto !important; max-width: none !important; max-height: none !important;
  height: auto !important; transform: none !important; margin: 0 0 .4em; }
#ph-panes #pe-chat .body { display: block !important; }
#ph-panes #pe-chat #chat-min, #ph-panes #pe-datalink #dl-wide, #ph-panes #pe-datalink #dl-min, #ph-panes #pe-datalink #dl-grip { display: none; }
#ph-panes #dl-lines { max-height: none; }
#ph-panes .pe-btn { min-height: 34px; }
#ph-panes .fssg-showbtns { display: flex; flex-wrap: wrap; gap: .3em; }
#ph-panes #btn-info { display: inline-block !important; margin-bottom: .5em; }
#ph-panes #fssg-myfighters.folded .mf { display: block; }      /* (in its tab: always open) */
#ph-panes .ph-pane[hidden] { display: none !important; }
/* the top bar, in MENU: everything it has, wrapped */
#ph-panes #pe-top { display: flex !important; flex-wrap: wrap; gap: .4em; border: 0; padding: 0; background: none; }
#ph-panes #pe-top > * { display: inline-flex !important; }
#ph-panes #pe-top > [hidden], #ph-panes #pe-top #pe-clock, #ph-panes #pe-top .spacer,
#ph-panes #pe-top #btn-ops, #ph-panes #pe-top #btn-sectors { display: none !important; }   /* (v1's, gone) */
/* CHAT: the whole tab */
#ph-panes .ph-pane[data-pane="chat"]:not([hidden]) { height: 100%; display: flex; flex-direction: column; }
#ph-panes #pe-chat { flex: 1 1 auto; display: flex !important; flex-direction: column; min-height: 0; margin: 0; }
#ph-panes #pe-chat .body { flex: 1 1 auto; display: flex !important; flex-direction: column; min-height: 0; }
#ph-panes #chat-log { flex: 1 1 auto; max-height: none !important; overflow-y: auto; min-height: 0; }
/* popups: the whole screen */
body.pe-phone .fssg-pop, body.pe-phone .pe-pop .box { top: 0 !important; left: 0 !important; transform: none !important;
  width: 100vw !important; max-width: 100vw !important; max-height: 100vh !important; height: auto; box-sizing: border-box; }
body.pe-phone #pe-balls .box { transform: scale(.68); transform-origin: top center; }
body.pe-phone #fssg-banner { top: 6px !important; font-size: 11px !important; max-width: 96vw !important; }

/* The chat: the shared controllers' chat and private chats (tabs). */
#pe-chat { position: absolute; right: 10px; bottom: 26px; z-index: 905; width: min(380px, 40%);
           background: rgba(4,10,12,.94); border: 1px solid #2d6b5a; display: flex; flex-direction: column; }
#pe-chat .hd { display: flex; align-items: center; gap: .3em; padding: .2em .4em; color: var(--pe-bright);
               letter-spacing: .15em; border-bottom: 1px solid #1d4a3e; flex-wrap: wrap; }
#pe-chat .hd .ct { margin-right: .3em; }
#pe-chat .hd #chat-min { margin-left: auto; padding: 0 .5em; }
#pe-chat #chat-unread { color: #ffd84a; font-weight: bold; }
#pe-chat .tab { cursor: pointer; padding: .05em .45em; border: 1px solid #2d6b5a; color: var(--pe-dim); font-size: 10px; letter-spacing: .05em; }
#pe-chat .tab.on { color: #fff; background: #1d5a3c; border-color: var(--pe-active); }
#pe-chat .tab.new { color: #ffd84a; border-color: #ffd84a; }
#pe-chat .tab .x { margin-left: .4em; color: var(--pe-alert); }
#pe-chat.min .body { display: none; }
#chat-log { height: 12em; overflow-y: auto; padding: .25em .5em; font-size: 11px; line-height: 1.35; }
#chat-log .m .t { color: #4f6e64; margin-right: .4em; }
#chat-log .m .n { color: #9fd4ff; margin-right: .4em; }
#chat-log .m .n .w { color: #7fa89a; font-size: .85em; letter-spacing: .03em; }
#chat-log .m.mine .n { color: #fff; }
#chat-log .sys { color: var(--pe-dim); font-style: italic; }
#chat-form { display: flex; gap: .3em; padding: .3em .4em; border-top: 1px solid #1d4a3e; }
#chat-form input { flex: 1; min-width: 0; background: #000; color: var(--pe-active); border: 1px solid #2d6b5a; font: inherit; padding: .2em .4em; }
#chat-foot { padding: 0 .5em .3em; }
#chat-foot a { cursor: pointer; }
[data-chat] { cursor: pointer; text-decoration: underline dotted; }
#pe-callbox { position: fixed; inset: 0; z-index: 2080; display: flex; align-items: center; justify-content: center;
              background: rgba(0,0,0,.45); }
#pe-callbox[hidden] { display: none; }
#pe-callbox .box { background: var(--pe-panel); border: 2px solid #9fd4ff; padding: 1em 1.4em; text-align: center; min-width: 300px; }
#pe-callbox .title { color: #9fd4ff; font-weight: bold; letter-spacing: .2em; margin-bottom: .4em; }
@media (pointer: coarse) {
  #pe-chat { font-size: 12.5px; }
  #chat-form input { font-size: 15px; min-height: 30px; }
  #pe-chat .tab { font-size: 12px; padding: .3em .6em; }
}
body.pe-phone #pe-callbox { display: none !important; }   /* (private chats are off anyway) */
/* Air defence sectors: the chooser */
.pe-secwrap { display: flex; gap: 1em; align-items: flex-start; flex-wrap: wrap; }
#sec-map { flex: 1 1 300px; min-width: 240px; }
.pe-secmap { width: 100%; max-height: 60vh; }
.pe-secmap path { fill: #12302a; stroke: #5d8f84; stroke-width: 1; cursor: pointer; }
.pe-secmap path:hover { fill: #1d4a3c; }
.pe-secmap path.on { fill: #1f7a4a; stroke: var(--pe-active); stroke-width: 1.5; }
.pe-secmap text { fill: #fff; font: bold 10px "DejaVu Sans Mono", monospace; text-anchor: middle; cursor: pointer; }
.pe-secmap text.n { fill: #ffd84a; font-size: 9px; }
#sec-list { flex: 1 1 220px; font-size: 11px; }
#sec-list .pe-filter { display: block; margin: .15em 0; }
#pe-datalink #dl-filter.on { color: #fff; background: #1d5a3c; border-color: var(--pe-active); }

/* the phone's "show my sector" button, under the zoom (pingueye.js zoomMySector) */
.pe-mysector { display: none; }
body.pe-phone .pe-mysector { display: block; }
#pe-map .pe-mysector a { background: #0f2329; color: #d9ffe9; border-color: #2d6b5a; font-size: 20px; line-height: 30px; }

/* the Help popup's picture of BAN32N (the radar 747 the ADPs sit in) */
.pe-info-pic { margin: 8px 0 10px; text-align: center; }
.pe-info-pic img { max-width: 100%; max-height: 260px; border: 1px solid #2c4a3a; }
.pe-info-pic figcaption { font-size: 12px; color: #9aa5ab; margin-top: 3px; }
