body {
  font-family: system-ui, Arial, sans-serif;
  margin: 16px;
  background: #fafafa;
  color: #111;
}

h2 {
  margin: 0 0 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

label {
  display: block;
  font-size: 12px;
  color: #333;
  margin-bottom: 6px;
}

input[type="date"],
input[type="time"],
select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font: inherit;
  background: #fff;
}

button {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.muted {
  color: #555;
  font-size: 12px;
  margin-top: 6px;
}

.chart {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 10px;
  margin-top: 12px;
}

.chart-source {
  display: block;
  width: fit-content;
  margin: 0 0 4px auto;
  color: #075985;
  font-size: 12px;
}

.chart-plot {
  height: 320px;
  position: relative;
}

.loading {
  display: none;
  margin-top: 10px;
  font-weight: 600;
}

.stations {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.station-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.feedback-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.feedback-panel {
  position: fixed;
  right: 20px;
  bottom: 72px;
  z-index: 20;
  width: min(340px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.feedback-panel[hidden] {
  display: none;
}

.feedback-header,
.feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-header {
  margin-bottom: 14px;
}

.feedback-header h3 {
  margin: 0;
  font-size: 16px;
}

.feedback-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 4px;
  background: transparent;
  color: #333;
  font-size: 24px;
  line-height: 1;
}

.feedback-panel textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border: 1px solid #bbb;
  border-radius: 6px;
  box-sizing: border-box;
  resize: vertical;
  font: inherit;
}

.feedback-actions {
  margin-top: 12px;
  align-items: flex-end;
}

.feedback-status {
  min-height: 18px;
  color: #444;
  font-size: 12px;
  line-height: 1.4;
}

.feedback-status.error {
  color: #b00020;
}

@media (max-width: 600px) {
  body {
    margin: 12px;
  }

  h2 {
    font-size: 20px;
    line-height: 1.2;
  }

  .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 8px;
    align-items: end;
  }

  .row > div,
  .row input,
  .row button {
    width: 100%;
    min-width: 0;
  }

  input[type="date"],
  input[type="time"],
  select,
  button {
    min-height: 44px;
    font-size: 16px;
  }

  .stations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    margin-top: 14px;
  }

  .station-item {
    min-height: 40px;
    white-space: normal;
  }

  .station-item input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }

  .station-item label {
    padding: 8px 0;
  }

  .muted {
    line-height: 1.45;
  }

  .chart {
    margin: 12px -4px 0;
    padding: 6px 2px;
    border-radius: 8px;
  }

  .chart-source {
    margin-right: 8px;
  }

  .chart-plot {
    height: 430px;
  }

  .feedback-toggle {
    right: 12px;
    bottom: 12px;
  }

  .feedback-panel {
    right: 12px;
    bottom: 68px;
    width: calc(100vw - 24px);
  }
}
