*, *::before, *::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
html, body { margin: 0; padding: 0; }
html { height: 100%; }
body.pg-lapse, body.pg-poops {
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  height: 100vh; height: 100%; min-height: 0;
  overflow: hidden;
}
body {
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #d3ddf0;
  background-color: #05070c;
  background-image:
    -webkit-radial-gradient(900px 460px at 18% -10%, rgba(34, 211, 238, 0.16), transparent 62%),
    -webkit-radial-gradient(900px 460px at 85% -8%, rgba(167, 139, 250, 0.16), transparent 62%),
    -webkit-linear-gradient(180deg, #070a14 0%, #05070c 55%, #0b0514 100%);
  background-image:
    radial-gradient(900px 460px at 18% -10%, rgba(34, 211, 238, 0.16), transparent 62%),
    radial-gradient(900px 460px at 85% -8%, rgba(167, 139, 250, 0.16), transparent 62%),
    linear-gradient(180deg, #070a14 0%, #05070c 55%, #0b0514 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    -webkit-linear-gradient(rgba(110, 140, 210, 0.05) 1px, transparent 1px),
    -webkit-linear-gradient(90deg, rgba(110, 140, 210, 0.05) 1px, transparent 1px);
  background-image:
    linear-gradient(rgba(110, 140, 210, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 140, 210, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-animation: gridpan 24s linear infinite;
  animation: gridpan 24s linear infinite;
  pointer-events: none;
}
@keyframes gridpan { from { background-position: 0 0, 0 0; } to { background-position: 42px 42px, 42px 42px; } }
@-webkit-keyframes gridpan { from { background-position: 0 0, 0 0; } to { background-position: 42px 42px, 42px 42px; } }

.hud-top {
  position: relative;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  padding: 9px 16px;
  background: -webkit-linear-gradient(180deg, rgba(13, 18, 30, 0.92), rgba(8, 12, 22, 0.88));
  background: linear-gradient(180deg, rgba(13, 18, 30, 0.92), rgba(8, 12, 22, 0.88));
  border-bottom: 1px solid rgba(34, 211, 238, 0.22);
}
.hud-top::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: -webkit-linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.55), rgba(167, 139, 250, 0.55), transparent);
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.55), rgba(167, 139, 250, 0.55), transparent);
}
.brand {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
}
.brand img {
  width: 38px; height: 38px; margin-right: 13px;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35), 0 0 18px rgba(34, 211, 238, 0.35);
  -webkit-animation: ghyp 3.2s ease-in-out infinite;
  animation: ghyp 3.2s ease-in-out infinite;
}
@keyframes ghyp { 0%, 100% { box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35), 0 0 16px rgba(34, 211, 238, 0.30); } 50% { box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.55), 0 0 26px rgba(34, 211, 238, 0.5); } }
@-webkit-keyframes ghyp { 0%, 100% { box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35), 0 0 16px rgba(34, 211, 238, 0.30); } 50% { box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.55), 0 0 26px rgba(34, 211, 238, 0.5); } }
.brand .name {
  font-size: 18px; font-weight: 800; letter-spacing: 0.24em; line-height: 1.05;
  color: #eef4ff; text-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
}
.brand .tag {
  font: 600 9px/1.2 Consolas, monospace; letter-spacing: 0.3em; text-transform: uppercase;
  color: #7d8db1; margin-top: 4px;
}
.hud-side { margin-left: auto; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }

.chip {
  display: inline-block; font: 600 10px/1 Consolas, monospace; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(120, 150, 220, 0.30); color: #9fb0d0; background: rgba(20, 28, 44, 0.55);
}
.hud-side .chip + .chip, .hud-side .chip + a { margin-left: 10px; }
.chips { margin-top: 12px; }
.chips .chip { margin-left: 0; }
.chips .chip + .chip { margin-left: 10px; }
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px;
  background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.9);
  -webkit-animation: blink 1.4s ease-in-out infinite;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@-webkit-keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.panel {
  position: relative;
  background: rgba(9, 14, 24, 0.86);
  border: 1px solid rgba(120, 150, 220, 0.16);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: -webkit-linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.7), rgba(167, 139, 250, 0.7), transparent);
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.7), rgba(167, 139, 250, 0.7), transparent);
}
.panel::after {
  content: ""; position: absolute; left: 0; right: 0; height: 130px; top: -160px;
  background: -webkit-linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.055), transparent);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.055), transparent);
  -webkit-animation: sweep 6s linear infinite;
  animation: sweep 6s linear infinite;
  pointer-events: none;
}
@keyframes sweep { 0% { top: -160px; } 100% { top: 120%; } }
@-webkit-keyframes sweep { 0% { top: -160px; } 100% { top: 120%; } }
.corners span { position: absolute; width: 16px; height: 16px; border: 0 solid rgba(34, 211, 238, 0.75); }
.corners .tl { top: 8px; left: 8px; border-top-width: 2px; border-left-width: 2px; }
.corners .tr { top: 8px; right: 8px; border-top-width: 2px; border-right-width: 2px; }
.corners .bl { bottom: 8px; left: 8px; border-bottom-width: 2px; border-left-width: 2px; }
.corners .br { bottom: 8px; right: 8px; border-bottom-width: 2px; border-right-width: 2px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 14px 16px 18px; }
.pad { padding: 16px 20px 18px; }
.lab {
  display: block; font: 600 10px/1 Consolas, monospace; letter-spacing: 0.34em;
  text-transform: uppercase; color: #5b6b8c; margin: 0 0 12px;
}
.lab::before { content: "▸ "; color: #22d3ee; }
.lab.block2 { margin-top: 12px; }

#state {
  display: inline-block; font: 700 20px/1.2 Consolas, monospace; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 13px 20px; border-radius: 14px;
  background: rgba(6, 10, 18, 0.72); border: 1px solid rgba(120, 150, 220, 0.28);
  color: #e8f1ff; text-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}
#state.ok {
  color: #5ef2b0; border-color: rgba(52, 211, 153, 0.50);
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.14), inset 0 0 14px rgba(52, 211, 153, 0.07);
}
#state.bad {
  color: #ff8f87; border-color: rgba(248, 113, 113, 0.50);
  text-shadow: 0 0 16px rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 22px rgba(248, 113, 113, 0.14), inset 0 0 14px rgba(248, 113, 113, 0.07);
}
#state.warn {
  color: #ffd479; border-color: rgba(251, 191, 36, 0.50);
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.12), inset 0 0 14px rgba(251, 191, 36, 0.06);
}
#state.ready { -webkit-animation: ripple 1s ease-out infinite; animation: ripple 1s ease-out infinite; }
@keyframes ripple { 0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.35); } 100% { box-shadow: 0 0 0 12px rgba(251, 191, 36, 0); } }
@-webkit-keyframes ripple { 0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.35); } 100% { box-shadow: 0 0 0 12px rgba(251, 191, 36, 0); } }

#det { margin-top: 16px; font: 13px/1.5 Consolas, monospace; color: #8fa0c0; }
#det b { color: #dbe6ff; font-weight: 700; }
#cache {
  font: 11px/1.4 Consolas, monospace; letter-spacing: 0.06em;
  color: #57637e; margin: 10px 0 2px; min-height: 15px;
}
#cache.cacheok { color: #5ef2b0; text-shadow: 0 0 10px rgba(52, 211, 153, 0.4); }

#prog {
  display: none; height: 10px; margin-top: 10px;
  background: rgba(6, 10, 18, 0.8); border: 1px solid rgba(120, 150, 220, 0.22);
  border-radius: 8px; overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
}
#fill {
  height: 100%; width: 0%; border-radius: 8px;
  background: -webkit-linear-gradient(90deg, #22d3ee, #a78bfa, #f472b6);
  background: linear-gradient(90deg, #22d3ee, #a78bfa, #f472b6);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.6);
  -webkit-transition: width .2s ease; transition: width .2s ease;
}

#force { margin-top: 20px; padding-top: 16px; border-top: 1px dashed rgba(120, 150, 220, 0.20); }
#force .hint { font: 11px/1.5 Consolas, monospace; letter-spacing: 0.06em; color: #8fa0c0; margin: 0 0 12px; }
.frow { display: -webkit-flex; display: flex; }
.btn {
  -webkit-flex: 1; flex: 1; display: block; text-align: center; text-decoration: none;
  font: 700 12px/1 Consolas, monospace; letter-spacing: 0.18em; padding: 14px 10px; border-radius: 12px;
  color: #eaf3ff; border: 1px solid rgba(120, 150, 220, 0.30); background: rgba(16, 24, 40, 0.6);
}
.btn:first-child { margin-right: 12px; }
.btn-lapse { color: #7df3ff; border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.10); box-shadow: 0 0 16px rgba(34, 211, 238, 0.18), inset 0 0 12px rgba(34, 211, 238, 0.06); }
.btn-poops { color: #d4c6ff; border-color: rgba(167, 139, 250, 0.45); background: rgba(167, 139, 250, 0.10); box-shadow: 0 0 16px rgba(167, 139, 250, 0.18), inset 0 0 12px rgba(167, 139, 250, 0.06); }

#foot {
  text-align: center; font: 10px/1.7 Consolas, monospace; letter-spacing: 0.14em;
  text-transform: uppercase; color: #46526b; padding: 6px 14px 14px;
}
#foot b { color: #6fb7c9; font-weight: 700; }

.term { max-width: 900px; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
body.pg-lapse .wrap, body.pg-poops .wrap {
  -webkit-flex: 1 1 auto; flex: 1 1 auto;
  min-height: 0; overflow: hidden;
}
.term-bar {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(120, 150, 220, 0.16);
  background: rgba(10, 15, 27, 0.6);
}
.dots span { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dots span:nth-child(1) { background: #ff5f57; }
.dots span:nth-child(2) { background: #febc2e; }
.dots span:nth-child(3) { background: #28c840; }
.term-title { font: 600 10px/1 Consolas, monospace; letter-spacing: 0.22em; color: #6d7da0; text-transform: uppercase; }
.term-title.live { color: #5ef2b0; }
.readout { padding: 12px 18px 2px; }
#meta { font: 11px/1.5 Consolas, monospace; letter-spacing: 0.08em; color: #7d8db1; padding: 2px 18px 8px; }
#meta b { color: #cfe0ff; }
#out {
  white-space: pre-wrap; word-break: break-word;
  font: 12px/1.6 Consolas, "Courier New", monospace;
  color: #c9d8f2; background: #04070e;
  -webkit-flex: 1 1 auto; flex: 1 1 auto;
  min-height: 0;
  padding: 12px 18px; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
#out::after { content: "▊"; color: #22d3ee; -webkit-animation: blink 1.1s steps(1) infinite; animation: blink 1.1s steps(1) infinite; }
.ok { color: #5ef2b0; }
.bad { color: #ff8f87; }
.warn { color: #ffd479; }

.pg-poops .lab::before { color: #a78bfa; }
.pg-poops .corners span { border-color: rgba(167, 139, 250, 0.80); }
.pg-poops .term { border-color: rgba(167, 139, 250, 0.30); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 26px rgba(167, 139, 250, 0.10); }
.pg-poops #out::after { color: #a78bfa; }
.pg-poops .hud-top { border-bottom-color: rgba(167, 139, 250, 0.22); }
.pg-poops .hud-top::after { background: -webkit-linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.55), rgba(34, 211, 238, 0.40), transparent); background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.55), rgba(34, 211, 238, 0.40), transparent); }
.pg-poops .brand .name { text-shadow: 0 0 14px rgba(167, 139, 250, 0.45); }
.pg-poops .brand img { box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.40), 0 0 16px rgba(167, 139, 250, 0.30); }

@media (max-height: 650px) {
  .hud-top { padding: 8px 12px; }
  .brand img { width: 30px; height: 30px; margin-right: 10px; }
  .brand .name { font-size: 15px; }
  .brand .tag { margin-top: 2px; }
  .wrap { padding: 10px 12px 12px; }
  .pad { padding: 12px 16px 14px; }
  #state { font: 700 16px/1.2 Consolas, monospace; padding: 9px 16px; }
  #det { margin-top: 10px; }
  #force { margin-top: 10px; padding-top: 10px; }
  .chips { margin-top: 10px; }
  .lab { margin: 0 0 8px; }
  .lab.block2 { margin-top: 10px; }
  .btn { padding: 10px 8px; }
  #foot { padding: 4px 12px 10px; }
  .readout { padding: 8px 14px 2px; }
  #meta { padding: 2px 14px 6px; }
  #out { padding: 10px 14px; font-size: 11px; }
}