.qe-blr-pref {
  position: fixed;
  right: 24px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 94px);
  z-index: 998;
  width: min(400px, calc(100vw - 32px));
  color: #10203c;
  background: #ffffff;
  border: 1px solid rgba(16, 32, 60, .08);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(16, 32, 60, .22), 0 2px 10px rgba(16, 32, 60, .08);
  padding: 20px;
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transform: translate3d(30px, 34px, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity .36s cubic-bezier(.22, 1, .36, 1), transform .36s cubic-bezier(.22, 1, .36, 1);
}

.qe-blr-pref.qe-blr-pref-show {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
}

.qe-blr-pref-inner { position: relative; }

.qe-blr-pref-close {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(16, 32, 60, .1);
  background: #f1f4f9;
  color: #64708a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qe-blr-pref-close:hover,
.qe-blr-pref-close:focus-visible {
  border-color: rgba(224, 165, 46, .55);
  color: #10203c;
  outline: none;
}

.qe-blr-pref-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 40px 13px 0;
  padding: 6px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f4b73e, #ffd36b);
  color: #5a3a06;
  border: 1px solid rgba(224, 165, 46, .55);
  box-shadow: 0 2px 10px rgba(224, 165, 46, .35);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  animation: qe-blr-kicker-pulse 2.2s ease-in-out infinite;
}

.qe-blr-pref-kicker-ico {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

@keyframes qe-blr-kicker-pulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(224, 165, 46, .3); }
  50% { box-shadow: 0 3px 16px rgba(224, 165, 46, .62); }
}

.qe-blr-pref h2 {
  margin: 0 0 10px;
  color: #10203c;
  font-family: inherit;
  font-size: 1.72rem;
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -.015em;
}

.qe-blr-pref h2 b {
  font-weight: 700;
  font-style: italic;
  font-family: "Times New Roman", Times, serif;
}

.qe-blr-pref p {
  margin: 0 0 18px;
  color: #5a6678;
  font-size: .88rem;
  line-height: 1.5;
}

.qe-blr-pref-options {
  display: grid;
  gap: 11px;
  margin-bottom: 0;
}

.qe-blr-pref-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 11px 15px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  background: #f1f4f9;
  color: #10203c;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.qe-blr-pref-option:hover {
  background: #ffffff;
  border-color: rgba(224, 165, 46, .45);
  box-shadow: 0 10px 26px rgba(16, 32, 60, .13), 0 0 0 1px rgba(224, 165, 46, .28);
  transform: translateY(-2px);
}

.qe-blr-pref-option:hover .qe-blr-pref-arrow {
  color: #e0a52e;
  transform: translateX(3px);
}

.qe-blr-pref-option:hover .qe-blr-pref-badge {
  border-color: rgba(224, 165, 46, .4);
  background: #eef2f9;
}

.qe-blr-pref-option:focus-visible {
  outline: none;
  border-color: #e0a52e;
  box-shadow: 0 0 0 3px rgba(224, 165, 46, .25);
}

.qe-blr-pref-option.is-selected {
  background: #fdf7ea;
  border-color: #e0a52e;
  box-shadow: 0 6px 18px rgba(224, 165, 46, .16);
}

/* Map-pin icon with initials */
.qe-blr-pref-badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eaf0f8;
  border: 1px solid rgba(16, 32, 60, .1);
  color: #33456a;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.qe-blr-pref-option.is-selected .qe-blr-pref-badge {
  background: #fdf3d9;
  border-color: #e6b84e;
  color: #9a6a1c;
}

.qe-blr-pref-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qe-blr-pref-name {
  font-size: 1rem;
  font-weight: 700;
  color: #10203c;
  line-height: 1.2;
}

.qe-blr-pref-sub {
  font-size: .78rem;
  font-weight: 500;
  color: #6b7688;
  line-height: 1.2;
}

.qe-blr-pref-arrow {
  margin-left: auto;
  flex: 0 0 auto;
  color: #9aa4b5;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  transition: color .15s ease, transform .15s ease;
}

.qe-blr-pref-option.is-selected .qe-blr-pref-arrow { color: #e0a52e; }

/* While a vote is being saved, freeze the list and fade the unpicked rows. */
.qe-blr-pref-options.is-locked { pointer-events: none; }
.qe-blr-pref-options.is-locked .qe-blr-pref-option:not(.is-selected) { opacity: .5; }

.qe-blr-pref-msg {
  min-height: 0;
  margin-top: 0;
  color: #c2410c;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.qe-blr-pref-msg:not(:empty) { margin-top: 12px; }

.qe-blr-pref-msg.ok { color: #0f7a52; }
.qe-blr-pref-msg.err { color: #c2410c; }

/* Quiet, low-contrast escape — present but not competing with the rows. */
.qe-blr-pref-later {
  display: block;
  margin: 12px auto 0;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: #8a94a6;
  font-family: inherit;
  font-weight: 500;
  font-size: .78rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.qe-blr-pref-later:hover,
.qe-blr-pref-later:focus-visible {
  color: #5a6678;
  outline: none;
}

@media (max-width: 700px) {
  .qe-blr-pref {
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 82px);
    width: auto;
    padding: 14px;
    border-radius: 12px;
    transform: translate3d(0, 36px, 0);
  }

  .qe-blr-pref-close { width: 28px; height: 28px; font-size: 20px; }

  .qe-blr-pref-kicker { margin-bottom: 9px; padding: 5px 9px; gap: 5px; font-size: .6rem; }
  .qe-blr-pref-kicker-ico { width: 11px; height: 11px; }

  .qe-blr-pref h2 { font-size: 1.18rem; line-height: 1.17; margin-bottom: 6px; }
  .qe-blr-pref p { font-size: .74rem; line-height: 1.4; margin-bottom: 11px; }

  .qe-blr-pref-options { gap: 7px; }
  .qe-blr-pref-option { min-height: 0; gap: 10px; padding: 8px 11px; }
  .qe-blr-pref-badge { width: 34px; height: 34px; border-radius: 8px; font-size: .6rem; }
  .qe-blr-pref-name { font-size: .88rem; }
  .qe-blr-pref-sub { font-size: .7rem; }
  .qe-blr-pref-arrow { font-size: 1rem; }

  .qe-blr-pref-later { margin-top: 8px; padding: 4px 10px; font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
  .qe-blr-pref {
    transform: translate3d(0, 0, 0);
    transition: opacity .2s ease;
  }
  .qe-blr-pref-option { transition: background .15s ease, border-color .15s ease; }
  .qe-blr-pref-option:hover { transform: none; }
  .qe-blr-pref-kicker { animation: none; }
}
