/* QuestDB: simple, human-friendly presentation */
.qdb-shell,
.qdb-modal {
  --panel: #111018;
  --panel2: #181620;
  --border: rgba(255, 255, 255, .14);
  --text: #fffdf8;
  --red: #ff3131;
  --shadow: 0 18px 45px rgba(0, 0, 0, .24);
}

.qdb-shell {
  width: min(1400px, 100%);
  margin: 120px auto 64px;
  padding: clamp(18px, 3vw, 34px);
  overflow: visible;
  color: var(--text);
}

.qdb-shell .badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 49, 49, .38);
  border-radius: 999px;
  background: rgba(255, 49, 49, .1);
  color: #ff8a8a;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.qdb-shell .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #211f2a;
  color: var(--text);
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.qdb-shell .btn:hover {
  border-color: var(--red);
  background: #2a2633;
  transform: translateY(-1px);
}

.qdb-shell .btn--discord {
  border-color: #5865f2;
  background: #5865f2;
}

.qdb-shell .qdb-head {
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.qdb-identity {
  max-width: 760px;
}

.qdb-identity h1,
.qdb-shell > .qdb-head h1 {
  margin: 12px 0 8px !important;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.qdb-identity p,
.qdb-shell > .qdb-head p {
  margin: 0 !important;
  max-width: 68ch !important;
  color: var(--muted) !important;
  font-size: 1rem;
  line-height: 1.65;
}

.qdb-login {
  justify-content: flex-end;
}

.qdb-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qdb-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(135px, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-top: 22px;
  padding: clamp(14px, 2vw, 20px);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel2) 88%, transparent);
  box-shadow: none;
}

.qdb-filters::before {
  content: "Quests finden";
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

html[lang="en"] .qdb-filters::before {
  content: "Find quests";
}

.qdb-filters input[type="search"] {
  grid-column: 1 / -2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  font-size: 1rem;
  border-radius: 12px;
}

.qdb-count {
  grid-column: -2 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  font-weight: 700;
}

.qdb-typechips {
  grid-column: 1 / -1;
  grid-row: 3;
  padding-bottom: 2px;
}

.qdb-chip {
  min-height: 40px;
  padding: 8px 14px;
  background: var(--panel);
  color: var(--muted);
  box-shadow: none !important;
}

.qdb-chip.active {
  color: #fff;
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 20%, var(--panel));
}

.qdb-filters select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 34px 9px 11px;
  border-radius: 11px;
}

.qdb-filters > select {
  display: none;
}

.qdb-filters.advanced-open > select {
  display: block;
}

.qdb-more-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .84rem;
  font-weight: 750;
  cursor: pointer;
}

.qdb-more-toggle:hover,
.qdb-more-toggle[aria-expanded="true"] {
  color: var(--text);
  border-color: color-mix(in srgb, var(--border) 50%, var(--red));
  background: var(--panel);
}
.qdb-upload-teaser {
  margin-top: 14px;
  padding: 13px 15px;
  border-color: var(--border);
  border-radius: 14px;
  background: var(--panel2);
}

.qdb-upload-teaser h3,
.qdb-upload-teaser h2 {
  margin: 0 0 3px;
  font-size: .92rem;
}

.qdb-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 16px;
  margin-top: 22px;
  align-items: start;
}

.qdb-card {
  display: block;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: none;
  transition: border-color .15s ease, transform .15s ease;
}

.qdb-card:hover {
  border-color: color-mix(in srgb, var(--border) 55%, var(--red));
}

.qdb-card[open] {
  grid-column: span 1;
  border-color: color-mix(in srgb, var(--border) 35%, var(--red));
}

.qdb-card__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 17px;
  cursor: pointer;
  list-style: none;
}

.qdb-card__summary::-webkit-details-marker {
  display: none;
}

.qdb-card__summary::marker {
  content: "";
}

.qdb-card__summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -3px;
  border-radius: 14px;
}

.qdb-card__title {
  font-size: 1.08rem;
  line-height: 1.35;
}
.qdb-card__top {
  flex-wrap: wrap;
}

.qdb-card__title {
  min-width: 0;
  flex: 1 1 190px;
}

.qdb-card__quick-rating {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(234, 179, 8, .38);
  border-radius: 999px;
  background: rgba(234, 179, 8, .1);
  color: #facc15;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.qdb-card__quick-rating.is-empty {
  border-color: var(--border);
  background: var(--panel2);
  color: var(--muted);
  font-weight: 700;
}

.qdb-card__meta {
  gap: 5px;
}

.qdb-card__summary .qdb-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  min-height: 0;
  font-size: .9rem;
}

.qdb-card__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: .84rem;
  font-weight: 800;
}

.qdb-card__toggle::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--panel2);
  font-size: 1.1rem;
}

.qdb-card[open] .qdb-card__toggle::after {
  content: "-";
}

.qdb-card__details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 17px 17px;
  border-top: 1px solid var(--border);
}

.qdb-card__details > :first-child {
  margin-top: 14px;
}

.qdb-cond {
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--panel2);
}

.qdb-cond__caption {
  font-size: .9rem;
}

.qdb-map {
  border-radius: 12px;
}

.qdb-rewards {
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, #eab308 6%, var(--panel2));
}

.qdb-rating {
  padding-top: 11px;
}

.qdb-card__foot {
  padding-top: 2px;
}

.qdb-card__foot .btn {
  flex: 1;
  min-height: 42px;
  text-align: center;
}

.qdb-modal__box {
  border-radius: 18px;
}

/* Upload page */
.qup-wrap.qdb-shell,
.qup-wrap {
  width: min(760px, 100%);
  padding: clamp(18px, 3vw, 32px);
}

.qup-wrap > h1 {
  margin: 14px 0 7px !important;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
}

.qup-wrap > p {
  line-height: 1.6;
}

.qup-discord {
  padding: 16px;
  border-color: var(--border);
  background: var(--panel2);
}

.qup-drop {
  padding: clamp(28px, 7vw, 52px) 18px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel2) 90%, transparent);
}

.qup-drop strong {
  margin-bottom: 6px;
  font-size: 1rem;
}

.qup-soon {
  padding: 14px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .qdb-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qdb-filters input[type="search"] {
    grid-column: 1 / -1;
  }

  .qdb-count {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .qdb-typechips {
    grid-row: 4;
  }
}

@media (max-width: 620px) {
  .qdb-shell {
    margin-top: 104px;
    padding: 14px;
  }

  .qdb-shell .qdb-head {
    display: block;
  }

  .qdb-login {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .qdb-filters {
    display: flex;
    flex-direction: column;
  }

  .qdb-filters::before,
  .qdb-filters input[type="search"],
  .qdb-count,
  .qdb-typechips {
    order: initial;
  }

  .qdb-count {
    min-height: 40px;
  }

  .qdb-typechips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qdb-chip {
    width: 100%;
  }

  .qdb-upload-teaser {
    align-items: stretch;
  }

  .qdb-upload-teaser .btn {
    width: 100%;
    text-align: center;
  }

  .qdb-grid {
    grid-template-columns: 1fr;
  }

  .qdb-card__foot {
    align-items: stretch;
    flex-direction: column;
  }

  .qdb-time {
    margin-left: 0;
  }
}
