body {
  font-family: 'Rokkitt', serif;
  text-align:  center;
  margin-top:  20px;
  background:  white;
  color:       #222;
}
h1 {
  font-family:   'Codystar', cursive;
  font-size:     64px;
  margin-bottom: 5px;
}
h3 {
  font-family: 'Ubuntu Condensed', sans-serif;
  font-size:   18px;
  margin-top:  0px;
  color:       #aaa;
}
.blurb {
  color:     #888;
  font-size: 15px;
}
hr {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}
form {
  margin: 14px auto;
}
form .row {
  margin: 6px 0;
}
label {
  margin: 0 4px 0 10px;
}
input {
  background-color: white;
  color: black;
  border: 2px solid #e7e7e7;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  padding: 2px 4px;
}
.button {
  background-color: #ccc;
  color: black;
  border: 2px solid #e7e7e7;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  padding: 2px 16px;
  margin-left: 8px;
  cursor: pointer;
}
.button:hover {
  background-color: #bbb;
}
.remove {
  border: none;
  background: none;
  color: #999;
  cursor: pointer;
  font-size: 16px;
}
.remove:hover {
  color: #e6194b;
}
#dataTools {
  margin: 10px 0 4px;
}
#dataTools .button {
  display: inline-block;
  margin: 4px;
}
.hint {
  color: #999;
  font-size: 13px;
  margin: 2px 0 6px;
}
#message.ok {
  color: #3cb44b;
}
#message {
  color: #e6194b;
  min-height: 1em;
  margin: 0;
}
#stats {
  color: #666;
}
table {
  margin-left:  auto;
  margin-right: auto;
  border-collapse: collapse;
}
#myEvents td, #myEvents th {
  padding: 3px 10px;
}
#myEvents .swatch {
  width: 40px;
}
#myEvents .dates {
  color: #888;
  font-size: 13px;
}
#divBody {
  padding: 30px 16px;
}
#divContent {
  margin: 0 auto;
  max-width: 700px;
  text-align: center;
}
#canvasWrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
#myCanvas {
  max-width: 100%;
  height: auto;
}
#tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(20, 20, 20, 0.9);
  color: white;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  text-align: left;
  transform: translate(-50%, calc(-100% - 14px));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 1;
}
#tooltip .tt-head {
  color: #ccc;
}
#tooltip .tt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  opacity: 0.75;
}
#tooltip .tt-row.active {
  opacity: 1;
  font-weight: bold;
}
#tooltip .tt-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  flex: none;
}
#tooltip .tt-dates {
  color: #aaa;
  font-weight: normal;
  font-size: 12px;
  margin-left: 4px;
}
#myEvents tbody tr {
  transition: background-color 0.15s;
}
#myEvents tbody tr.active {
  background-color: #f2f2f2;
}

/* Dark mode: follows the browser's light/dark setting. */
:root {
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  body {
    background: #141414;
    color:      #d8d8d8;
  }
  h3, .hint, .remove, .home-link {
    color: #8c8c8c;
  }
  .blurb, #myEvents .dates {
    color: #999;
  }
  #stats {
    color: #aaa;
  }
  hr {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  }
  input {
    background-color: #1f1f1f;
    color: #e8e8e8;
    border-color: #3a3a3a;
  }
  .button {
    background-color: #3a3a3a;
    color: #f0f0f0;
    border-color: #4a4a4a;
  }
  .button:hover {
    background-color: #4a4a4a;
  }
  #tooltip {
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  }
  #tooltip .tt-head {
    color: #555;
  }
  #tooltip .tt-dates {
    color: #777;
  }
  #tooltip .tt-swatch {
    border-color: rgba(0, 0, 0, 0.35);
  }
  #myEvents tbody tr.active {
    background-color: #262626;
  }
}

.home-link {
  display: block;
  text-align: left;
  font-size: 14px;
  color: #999;
  text-decoration: none;
}
.home-link:hover {
  color: #222;
}
@media (prefers-color-scheme: dark) {
  .home-link:hover {
    color: #f0f0f0;
  }
}
