:root {
  --qb-ember: #a03a2d;
  --qb-forest: #263f2f;
  --qb-moss: #6f7d45;
  --qb-gold: #c99b3f;
  --qb-paper: #f2ead8;
  --qb-ink: #221811;
  --qb-shadow: #120d0a;
  --bs-primary: var(--qb-ember);
  --bs-primary-rgb: 160, 58, 45;
  --bs-secondary: var(--qb-moss);
  --bs-secondary-rgb: 111, 125, 69;
  --bs-success: var(--qb-forest);
  --bs-success-rgb: 38, 63, 47;
  --bs-warning: var(--qb-gold);
  --bs-warning-rgb: 201, 155, 63;
  --bs-body-bg: var(--qb-paper);
  --bs-body-color: var(--qb-ink);
  --bs-link-color: #7d2e24;
  --bs-link-hover-color: #4f211b;
  --bs-border-color: rgba(34, 24, 17, 0.18);
}

body {
  background:
    linear-gradient(rgba(242, 234, 216, 0.94), rgba(242, 234, 216, 0.94)),
    url("../img/tabletop-pattern.36fb7075f6c6.svg");
  color: var(--qb-ink);
}

a {
  color: var(--bs-link-color);
}

.qb-nav {
  background: linear-gradient(90deg, var(--qb-shadow), var(--qb-forest));
  border-bottom: 1px solid rgba(201, 155, 63, 0.34);
  box-shadow: 0 8px 22px rgba(18, 13, 10, 0.2);
}

.qb-language-switch .form-select {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  min-width: 7rem;
}

.qb-language-switch .form-select:focus {
  border-color: var(--qb-gold);
  box-shadow: 0 0 0 0.2rem rgba(240, 184, 75, 0.18);
}

.qb-language-switch .form-select option {
  color: var(--qb-ink);
}

.qb-user-menu .dropdown-toggle {
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  max-width: 14rem;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qb-user-menu .dropdown-toggle:hover,
.qb-user-menu .dropdown-toggle:focus,
.qb-user-menu .dropdown-toggle.show {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.qb-user-menu .dropdown-menu {
  background: rgba(255, 248, 232, 0.98);
  border: 1px solid rgba(201, 155, 63, 0.34);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(18, 13, 10, 0.22);
  min-width: 12rem;
  padding: 0.45rem;
}

.qb-user-menu .dropdown-item {
  border-radius: 6px;
  color: var(--qb-ink);
}

.qb-user-menu .dropdown-item:hover,
.qb-user-menu .dropdown-item:focus {
  background: rgba(160, 58, 45, 0.12);
  color: var(--qb-ink);
}

.btn-primary {
  --bs-btn-bg: var(--qb-ember);
  --bs-btn-border-color: #b54b37;
  --bs-btn-color: #fff8e8;
  --bs-btn-hover-bg: #7d2e24;
  --bs-btn-hover-border-color: #7d2e24;
  --bs-btn-active-bg: #63231c;
  --bs-btn-active-border-color: #63231c;
  box-shadow: 0 0.65rem 1.5rem rgba(18, 13, 10, 0.24);
}

.btn-outline-primary {
  --bs-btn-color: var(--qb-ember);
  --bs-btn-border-color: var(--qb-ember);
  --bs-btn-hover-bg: var(--qb-ember);
  --bs-btn-hover-border-color: var(--qb-ember);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--qb-gold);
  box-shadow: 0 0 0 0.2rem rgba(201, 155, 63, 0.2);
}

.qb-messages {
  bottom: auto;
  left: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 4.75rem;
  z-index: 20;
}

.qb-messages .container {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.qb-messages .alert {
  align-items: flex-start;
  backdrop-filter: blur(10px);
  background: rgba(255, 248, 232, 0.94);
  border: 1px solid rgba(201, 155, 63, 0.45);
  border-left: 0.35rem solid var(--qb-gold);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(18, 13, 10, 0.22);
  color: var(--qb-ink);
  display: flex;
  gap: 0.85rem;
  margin: 0;
  max-width: 48rem;
  padding: 1rem 1.25rem;
  pointer-events: auto;
  width: min(100%, 32rem);
}

.qb-messages .alert::before {
  background: var(--qb-gold);
  border-radius: 999px;
  box-shadow: 0 0 0 0.25rem rgba(201, 155, 63, 0.18);
  content: "";
  flex: 0 0 auto;
  height: 0.65rem;
  margin-top: 0.45rem;
  width: 0.65rem;
}

.qb-messages .alert-success {
  border-left-color: var(--qb-forest);
}

.qb-messages .alert-success::before {
  background: var(--qb-forest);
  box-shadow: 0 0 0 0.25rem rgba(38, 63, 47, 0.16);
}

.qb-messages .alert-danger,
.qb-messages .alert-error {
  border-left-color: var(--qb-ember);
}

.qb-messages .alert-danger::before,
.qb-messages .alert-error::before {
  background: var(--qb-ember);
  box-shadow: 0 0 0 0.25rem rgba(160, 58, 45, 0.16);
}

.qb-messages .alert-info {
  border-left-color: var(--qb-moss);
}

.qb-messages .alert-info::before {
  background: var(--qb-moss);
  box-shadow: 0 0 0 0.25rem rgba(111, 125, 69, 0.16);
}

.qb-messages .btn-close {
  margin-left: auto;
  opacity: 0.65;
  padding: 0.45rem;
}

.qb-messages .btn-close:focus {
  box-shadow: 0 0 0 0.2rem rgba(201, 155, 63, 0.22);
}

.qb-hero {
  color: #fff8e8;
  isolation: isolate;
  min-height: min(720px, calc(100vh - 4rem));
  overflow: hidden;
  position: relative;
}

.qb-hero::before,
.qb-hero::after {
  content: "";
  inset: 0;
  position: absolute;
  z-index: -2;
}

.qb-hero::before {
  background: var(--qb-hero-image, url("../img/tirakan_map.2826c92eaa00.jpg")) center 38% / cover no-repeat;
  filter: blur(3px) saturate(0.9) sepia(0.12);
  transform: scale(1.035);
}

.qb-hero::after {
  background:
    radial-gradient(circle at 70% 35%, rgba(201, 155, 63, 0.18), transparent 34rem),
    linear-gradient(105deg, rgba(18, 13, 10, 0.88), rgba(38, 63, 47, 0.76) 47%, rgba(125, 46, 36, 0.58));
  box-shadow: inset 0 -80px 100px rgba(18, 13, 10, 0.52);
  z-index: -1;
}

.qb-hero .container {
  position: relative;
}

.qb-kicker {
  color: #e7c372;
  letter-spacing: 0.08em;
}

.qb-hero .lead {
  max-width: 42rem;
  text-shadow: 0 2px 16px rgba(18, 13, 10, 0.55);
}

.qb-form-hero {
  display: flex;
  align-items: center;
}

.qb-form-panel {
  backdrop-filter: blur(10px);
  color: var(--qb-ink);
}

.qb-suggestion-remove {
  min-height: calc(3.5rem + 2px);
}

.qb-page-hero {
  min-height: auto;
}

.qb-page-hero::before {
  background-attachment: fixed;
}

.qb-simple-hero {
  border-bottom: 1px solid rgba(201, 155, 63, 0.28);
}

.qb-simple-hero .container {
  min-height: clamp(15rem, 28vh, 22rem);
  display: flex;
  align-items: center;
}

.qb-simple-hero-content {
  display: grid;
  gap: 1rem;
  max-width: 48rem;
}

.qb-simple-hero-actions {
  margin-top: 0.35rem;
}

.qb-page-heading {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.qb-page-heading .lead {
  color: rgba(255, 248, 232, 0.86);
}

.qb-hero-panel {
  backdrop-filter: blur(10px);
  color: var(--qb-ink);
}

.qb-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.qb-stat-grid div {
  background: rgba(242, 234, 216, 0.62);
  border: 1px solid rgba(34, 24, 17, 0.12);
  border-radius: 8px;
  padding: 1rem;
}

.qb-stat-grid span {
  color: rgba(34, 24, 17, 0.68);
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.qb-stat-grid strong {
  display: block;
  font-size: 1.05rem;
}

.qb-panel,
.qb-card,
.qb-table-scene {
  background: rgba(255, 248, 232, 0.88);
  border: 1px solid rgba(34, 24, 17, 0.15);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(18, 13, 10, 0.14);
  padding: 1.5rem;
}

.qb-table-scene {
  backdrop-filter: blur(8px);
  color: var(--qb-ink);
}

.qb-session-list {
  display: grid;
  gap: 0.75rem;
}

.qb-session-link {
  background: rgba(242, 234, 216, 0.64);
  border: 1px solid rgba(34, 24, 17, 0.12);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
}

.qb-session-link:hover,
.qb-session-link:focus {
  border-color: rgba(201, 155, 63, 0.82);
  box-shadow: 0 10px 24px rgba(18, 13, 10, 0.14);
  color: inherit;
}

.qb-session-title {
  font-weight: 700;
}

.qb-session-meta {
  color: rgba(34, 24, 17, 0.68);
  font-size: 0.9rem;
}

.qb-card {
  color: inherit;
  display: block;
  height: 100%;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
}

.qb-card > :not(.qb-card-image) {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.qb-card > :last-child {
  margin-bottom: 1.5rem !important;
}

.qb-card > :not(.qb-card-image):first-child {
  margin-top: 1.5rem;
}

.qb-card-image,
.qb-gathering-image-preview {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.qb-card-image {
  border-bottom: 1px solid rgba(34, 24, 17, 0.12);
  margin-bottom: 1rem;
}

.qb-gathering-image-preview {
  border: 1px solid rgba(34, 24, 17, 0.15);
  border-radius: 8px;
  max-height: 18rem;
}

.qb-card:hover {
  border-color: rgba(201, 155, 63, 0.82);
  box-shadow: 0 16px 38px rgba(18, 13, 10, 0.18);
}

.qb-panel .list-group-item {
  background: transparent;
  border-color: rgba(34, 24, 17, 0.12);
}

.qb-dice {
  align-items: center;
  background:
    linear-gradient(135deg, #f0cf83, var(--qb-gold));
  border-radius: 8px;
  color: var(--qb-ink);
  display: inline-flex;
  font-weight: 800;
  height: 4rem;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 8px 18px rgba(18, 13, 10, 0.18);
  transform: rotate(8deg);
  width: 4rem;
}

footer {
  background: rgba(255, 248, 232, 0.72);
}

@media (max-width: 575.98px) {
  .qb-messages {
    bottom: 1rem;
    top: auto;
  }

  .qb-messages .alert {
    max-width: none;
    padding: 0.9rem 1rem;
    width: 100%;
  }
}
