*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  background: #fafafa;
}
header {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
header .back-link {
  font-size: 13px;
  color: #555;
  text-decoration: none;
  margin-right: 4px;
}
header .back-link:hover { text-decoration: underline; }
header label { font-size: 14px; }
header input[type="number"] {
  width: 90px;
  padding: 4px 6px;
  font: inherit;
}
header button {
  padding: 6px 14px;
  font: inherit;
  cursor: pointer;
}
#status { margin-left: auto; font-size: 13px; color: #555; }
#hint { color: #c0392b; font-size: 13px; }
#banner {
  padding: 10px 16px;
  background: #fdecea;
  color: #611a15;
  border-bottom: 1px solid #f5c6cb;
  display: none;
}
#banner.visible { display: block; }
main.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
}
.chart-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  min-height: 280px;
}
.chart-card h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.chart-wrapper {
  position: relative;
  height: 240px;
}
@media (max-width: 900px) {
  main.grid { grid-template-columns: 1fr; }
}
