:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #eef1f3;
  color: #182026;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  display: grid;
  place-items: center;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(100%, 460px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

p {
  margin: 5px 0 0;
  color: #60707a;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 1px solid #c6d0d6;
  border-radius: 8px;
  background: #ffffff;
  color: #182026;
  font-size: 24px;
  cursor: pointer;
}

.endpoint {
  margin-bottom: 16px;
}

label {
  display: block;
  margin: 12px 0 7px;
  color: #3a4850;
  font-size: 14px;
  font-weight: 700;
}

label:first-child {
  margin-top: 0;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

input,
select {
  min-width: 0;
  height: 46px;
  border: 1px solid #b9c5cb;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #182026;
}

select {
  width: 100%;
}

.endpoint-row button {
  min-width: 74px;
  border: 0;
  border-radius: 8px;
  background: #246b51;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.telemetry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.telemetry div {
  min-height: 66px;
  padding: 10px;
  border: 1px solid #d1d9dd;
  border-radius: 8px;
  background: #ffffff;
}

.telemetry span {
  display: block;
  margin-bottom: 7px;
  color: #60707a;
  font-size: 13px;
}

.telemetry strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.control {
  min-height: 82px;
  border: 0;
  border-radius: 8px;
  background: #26343b;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.control:active,
.icon-button:active,
.endpoint-row button:active {
  transform: translateY(1px);
}

.forward {
  grid-column: 2;
}

.left {
  grid-column: 1;
}

.stop {
  grid-column: 2;
  background: #c13232;
  box-shadow: 0 0 0 3px rgba(193, 50, 50, 0.16);
}

.right {
  grid-column: 3;
}

.backward {
  grid-column: 2;
}

.message {
  min-height: 24px;
  margin-top: 16px;
  color: #3a4850;
  text-align: center;
}

.control.active {
  outline: 3px solid #6fb49d;
  outline-offset: 3px;
}

@media (max-width: 380px) {
  body {
    padding: 14px;
  }

  .telemetry {
    grid-template-columns: 1fr;
  }

  .control {
    min-height: 74px;
    font-size: 16px;
  }
}
