:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f2;
  color: #172016;
}

body {
  margin: 0;
  padding: 20px;
}

main {
  max-width: 920px;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

p {
  margin: 0;
  color: #5b6958;
}

select,
button,
input {
  font: inherit;
}

select,
button,
input[type="number"] {
  min-height: 38px;
  border: 1px solid #b7c3b4;
  border-radius: 6px;
  background: #ffffff;
  color: #172016;
  box-sizing: border-box;
}

select,
button {
  padding: 0 12px;
}

button {
  cursor: pointer;
}

button.primary {
  background: #255f48;
  border-color: #255f48;
  color: #ffffff;
}

.status-strip,
.panel {
  background: #ffffff;
  border: 1px solid #d8e0d4;
  border-radius: 8px;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
  color: #40503d;
}

.tabs {
  display: inline-flex;
  border: 1px solid #b7c3b4;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  margin-top: 18px;
}

.tabs button {
  border: 0;
  border-left: 1px solid #d8e0d4;
  border-radius: 0;
  background: #ffffff;
  color: #40503d;
}

.tabs button:first-child {
  border-left: 0;
}

.tabs button.active {
  background: #255f48;
  color: #ffffff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.press-panel {
  margin-top: 18px;
}

.press-button {
  width: 100%;
  min-height: 220px;
  font-size: 34px;
  font-weight: 750;
  background: #ffffff;
  color: #172016;
}

.press-button:active {
  background: #255f48;
  border-color: #255f48;
  color: #ffffff;
}

.press-status {
  min-height: 24px;
  margin-top: 12px;
  text-align: center;
  color: #40503d;
}

.control-surface {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}

.dial {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.arc {
  position: absolute;
  top: 8%;
  left: 8%;
  right: 8%;
  height: 42%;
  border: 18px solid #dbe2d7;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  box-shadow: inset 0 1px 6px rgba(23, 32, 22, 0.08);
}

.needle {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 7px;
  height: 38%;
  transform-origin: 50% 100%;
  border-radius: 999px;
  background: #b94c46;
  transition: transform 160ms ease;
}

.dial.dragging .needle {
  transition: none;
}

.angle-readout {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.angle-readout span {
  font-size: 56px;
  font-weight: 750;
  line-height: 1;
}

.angle-readout small {
  color: #637060;
  font-size: 14px;
  text-transform: uppercase;
}

.panel {
  padding: 18px;
}

.angle-row,
.preset-row,
.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.angle-row input {
  width: 86px;
  padding: 0 10px;
  text-align: center;
}

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

  header,
  .control-surface {
    display: block;
  }

  select {
    width: 100%;
    margin-top: 12px;
  }

  .panel {
    margin-top: 16px;
  }
}
