@media (prefers-color-scheme: dark) {
  :root {
    --fg: #fff;
    --bg: #222;
    --input: #444;
    --secondary: #999;
    --accent: #2d2;
  }
  input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(100%) brightness(200%);
  }
}
@media (prefers-color-scheme: light) {
  :root {
    --fg: #222;
    --bg: #fff;
    --input: #f5f5f5;
    --secondary: #999;
    --accent: #2d2;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 1em;
  font-family: Lato, sans-serif;
  background-color: var(--bg);
  color: var(--fg);
}

main {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  margin: auto;
}

hr {
  width: 100%;
  margin-block: 0.5em 1.2em;
  border: none;
  border-bottom: 1px solid var(--secondary);
}

label {
  font-size: 1rem;
  display: block;
  margin-bottom: 0.4em;
  font-weight: 600;
}

input,
.activity {
  font-size: 1rem;
  padding: 0.4em;
  width: 100%;
  border: none;
  border: 1px solid var(--secondary);
  border-radius: 4px;
  font-family: inherit;
  background-color: var(--input);
  color: var(--fg);
}

input[type="date"] {
  max-width: 100%;
}

.number-input {
  display: flex;
  margin-bottom: 1em;
  gap: 0.5em;
}

.mb {
  margin-bottom: 1em;
}

.number-input button {
  padding-inline: 1.2em;
  background-color: var(--input);
  border: none;
  border: 1px solid var(--secondary);
  border-radius: 4px;
  color: var(--fg);
}

.activity {
  display: grid;
  gap: 2px;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  margin-bottom: 0.4em;
}
.activity > div {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 15%;
  background-color: var(--accent);
  cursor: pointer;
}

.activity > div.spacer {
  opacity: 0;
}

.activity > div:hover {
  outline: 0.5px solid var(--fg);
  background-color: #ffffff64 !important;
}

button:hover {
  outline: 0.5px solid var(--fg);
  background-color: #ffffff64 !important;
}

label:hover {
  cursor: pointer;
}

.outline {
  outline: 1.5px solid var(--fg);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

button {
  cursor: pointer;
}

button:active {
  opacity: 0.8;
}

i {
  pointer-events: none;
}

@media (min-width: 800px) {
  .activity {
    gap: 5px;
  }
  .outline {
    outline: 2.5px solid var(--fg);
  }
}
