:root {
  --bg: #f3f2ef;
  --card: #ffffff;
  --ink: #111111;
  --muted: #6f6b66;
  --line: #e4e1db;
  --accent: #e31c5f;
  --tap: 40px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.06), 0 8px 24px rgba(17, 17, 17, 0.04);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 400px at 10% -10%, #fff 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

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

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.filters {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  padding: 16px;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 140px;
  flex: 1 1 140px;
}

.filters select,
.filters input[type="date"] {
  min-height: var(--tap);
  width: 100%;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafaf8;
  color: var(--ink);
}

.filters select:focus,
.filters input[type="date"]:focus {
  outline: 2px solid rgba(227, 28, 95, 0.35);
  border-color: var(--accent);
}

.filters .check {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--tap);
  min-width: auto;
  flex: 0 0 auto;
  padding: 0 12px;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: #fafaf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.filters input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}



.status {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
}

.charts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chart-card h2 {
  margin: 0 2px 8px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.note {
  margin: 0 2px 10px;
  color: var(--muted);
  font-size: 13px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 340px;
}

.chart-wrap canvas {
  max-width: 100% !important;
}

.hidden { display: none !important; }

@media (max-width: 800px) {
  .shell {
    width: 100%;
    padding: 16px 16px 32px;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  h1 { font-size: 22px; }

  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filters label {
    min-width: 0;
    flex: none;
    width: 100%;
  }

  .filters select,
  .filters input[type="date"] {
    min-height: 48px;
    font-size: 16px;
  }

  .filters .check {
    min-height: 48px;
  }

  .chart-card { padding: 12px 8px 6px; }
  .chart-wrap { height: 240px; }
}
