html {
  font-size: 14px;
  --galaxy-accent: #5b9fd4;
  --galaxy-accent-strong: #1b6ec2;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--bs-body-bg), 0 0 0 0.25rem var(--galaxy-accent);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.log-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
}

.payload-json {
  font-size: 0.75rem;
  max-height: 16rem;
  overflow: auto;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  padding: 0.75rem;
  border-radius: 0.375rem;
  margin-top: 0.5rem;
}

.library-cover img {
  object-fit: cover;
  background: var(--bs-tertiary-bg);
}

.library-cover-empty {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-size: 0.7rem;
  text-align: center;
}

.heatmap-wrap {
  overflow-x: auto;
}

.heatmap {
  display: grid;
  grid-template-columns: 2.5rem repeat(24, minmax(14px, 1fr));
  gap: 2px;
  min-width: 28rem;
}

.heatmap-hour,
.heatmap-day,
.heatmap-corner {
  font-size: 0.65rem;
  color: var(--bs-secondary-color);
  text-align: center;
}

.heatmap-day {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.25rem;
}

.heatmap-cell {
  min-height: 14px;
  border-radius: 2px;
  background-color: color-mix(in srgb, var(--galaxy-accent) calc(var(--level, 0) * 100%), var(--bs-tertiary-bg));
}

.play-strip {
  position: relative;
  height: 1.5rem;
  background: var(--bs-tertiary-bg);
  border-radius: 0.25rem;
}

.play-tick {
  position: absolute;
  top: 0.25rem;
  width: 3px;
  height: 1rem;
  background: var(--galaxy-accent);
  border-radius: 1px;
}

.nav-pills .nav-link {
  color: var(--galaxy-accent);
}

.nav-pills .nav-link.active {
  background-color: var(--galaxy-accent-strong);
}

.tag-pill {
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  font-size: calc(0.75rem * var(--tag-scale, 1));
  font-weight: 500;
  text-decoration: none;
}

.tag-pill:hover {
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] {
  --galaxy-accent: #7eb6e6;
  --galaxy-accent-strong: #3d8fd1;
}

[data-bs-theme="light"] {
  --galaxy-accent: #1b6ec2;
  --galaxy-accent-strong: #1b6ec2;
}
