html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}

@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 white, 0 0 0 0.25rem #258cfb;
}

body {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  min-width: 320px;
}

a { transition: color .2s ease; }

.navbar-brand { letter-spacing: -.02em; }

.brand-mark,
.auth-brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--bs-primary), #6f42c1);
  border-radius: .75rem;
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.theme-toggle { align-items: center; display: inline-flex; gap: .45rem; }
.theme-icon { font-size: 1.1rem; line-height: 1; }

.page-heading { margin-bottom: 1.5rem; }
.card { border-color: var(--bs-border-color); }
.card-header { background-color: var(--bs-tertiary-bg); }
.story-card { transition: transform .2s ease, box-shadow .2s ease; }
.story-card:hover { box-shadow: var(--bs-box-shadow) !important; transform: translateY(-2px); }
.story-text { white-space: pre-line; line-height: 1.8; }
.table { --bs-table-bg: transparent; }
.table-responsive { border-radius: var(--bs-border-radius); }

.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;
}

.auth-page {
  align-items: center;
  background: linear-gradient(135deg, var(--bs-tertiary-bg), var(--bs-secondary-bg));
  display: flex;
  justify-content: center;
  margin: -1.5rem -0.75rem -3rem;
  min-height: calc(100vh - 180px);
  padding: 2rem 1rem;
}

.auth-card {
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  box-shadow: var(--bs-box-shadow-lg);
  max-width: 430px;
  padding: 2.5rem;
  width: 100%;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.auth-brand-mark { font-size: 1.5rem; height: 3.25rem; width: 3.25rem; }

.auth-title {
  color: var(--bs-heading-color);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-subtitle, .auth-register-text { color: var(--bs-secondary-color); }

.auth-link {
  color: var(--bs-link-color);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-submit {
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .auth-page {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    margin-bottom: -2rem;
    padding: 1rem 0.75rem;
  }

  .auth-card {
    padding: 2rem 1.25rem;
  }
}
