:root {
  --fe-ink: #15253b;
  --fe-ink-soft: #52657f;
  --fe-line: rgba(24, 52, 89, 0.14);
  --fe-line-strong: rgba(24, 52, 89, 0.24);
  --fe-paper: rgba(255, 255, 255, 0.92);
  --fe-paper-strong: #ffffff;
  --fe-tint: #eef5ff;
  --fe-tint-strong: #dce9fb;
  --fe-accent: #1f4d8f;
  --fe-accent-deep: #153665;
  --fe-accent-soft: #f3b873;
  --fe-shadow: 0 24px 60px rgba(23, 48, 79, 0.10);
  --fe-shadow-soft: 0 12px 30px rgba(23, 48, 79, 0.08);
  --bs-primary: #1f4d8f;
  --bs-primary-rgb: 31, 77, 143;
  --bs-link-color: #1f4d8f;
  --bs-link-hover-color: #153665;
  --bs-border-radius: 1rem;
  --bs-border-radius-lg: 1.35rem;
  --bs-border-radius-xl: 1.75rem;
  --bs-body-bg: #f4f7fb;
  --bs-body-color: #15253b;
}

html {
  position: relative;
  min-height: 100%;
  font-size: 14px;
}

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

body {
  margin: 0;
  margin-bottom: 60px;
  color: var(--fe-ink);
  background:
    radial-gradient(circle at top left, rgba(31, 77, 143, 0.12), transparent 28rem),
    radial-gradient(circle at top right, rgba(243, 184, 115, 0.16), transparent 20rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.btn,
.form-control,
.form-select,
.card,
.modal-content,
.navbar,
.table,
.dropdown-menu {
  border-color: var(--fe-line);
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-dark,
.btn-primary {
  background: linear-gradient(135deg, var(--fe-accent), var(--fe-accent-deep));
  border-color: transparent;
  box-shadow: var(--fe-shadow-soft);
}

.btn-dark:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, var(--fe-accent-deep), #102847);
  border-color: transparent;
}

.btn-outline-dark,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
  border-width: 1.5px;
  background: rgba(255, 255, 255, 0.72);
}

.btn-outline-dark:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  background: var(--fe-ink);
  color: #fff;
}

.btn-outline-danger:hover {
  background: #b42318;
  color: #fff;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.1rem rgba(255, 255, 255, 0.95), 0 0 0 0.25rem rgba(31, 77, 143, 0.24);
}

.navbar {
  margin-top: 1rem;
  border: 1px solid var(--fe-line);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(18px);
  box-shadow: var(--fe-shadow-soft);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-link {
  border-radius: 999px;
  font-weight: 500;
  color: var(--fe-ink-soft) !important;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--fe-ink) !important;
  background: rgba(31, 77, 143, 0.08);
}

.container > main {
  padding-top: 1rem;
}

.card {
  border: 1px solid var(--fe-line);
  border-radius: 1.5rem;
  background: var(--fe-paper);
  box-shadow: var(--fe-shadow-soft);
  overflow: hidden;
}

.card.border-0 {
  border: 1px solid var(--fe-line) !important;
}

.card .card-body {
  padding: 1.5rem;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(31, 77, 143, 0.03);
}

.table > :not(caption) > * > * {
  border-bottom-color: rgba(24, 52, 89, 0.08);
}

.table-light,
.table thead {
  --bs-table-bg: rgba(31, 77, 143, 0.06);
  color: var(--fe-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.form-control,
.form-select {
  border-width: 1.5px;
  border-radius: 1rem;
  min-height: 3.35rem;
  background: rgba(255, 255, 255, 0.82);
}

.form-floating > label {
  color: var(--fe-ink-soft);
}

.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;
}

.modal-content {
  border: 1px solid var(--fe-line);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 35px 90px rgba(18, 37, 61, 0.2);
}

.modal-header,
.modal-footer {
  border-color: rgba(24, 52, 89, 0.08);
}

.footer {
  background: transparent;
}

.footer .container {
  border-top: 1px solid var(--fe-line);
  padding-top: 1rem;
}

.fe-hero {
  position: relative;
  padding: 2.5rem;
  border: 1px solid var(--fe-line);
  border-radius: 2rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 245, 255, 0.92)),
    linear-gradient(135deg, rgba(31, 77, 143, 0.1), rgba(243, 184, 115, 0.12));
  box-shadow: var(--fe-shadow);
  overflow: hidden;
}

.fe-hero::after {
  content: "";
  position: absolute;
  inset: auto -3rem -5rem auto;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 77, 143, 0.16), transparent 70%);
}

.fe-kicker {
  margin-bottom: 0.75rem;
  color: var(--fe-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fe-outline-card {
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--fe-line-strong);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--fe-shadow-soft);
}

.fe-outline-card h2,
.fe-outline-card h3 {
  letter-spacing: -0.03em;
}

.fe-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--fe-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--fe-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.fe-map-shell {
  width: min(100%, 34rem);
  min-width: min(100%, 22rem);
  min-height: 24rem;
  border: 1px solid var(--fe-line-strong);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--fe-shadow-soft);
  overflow: hidden;
}

.fe-map-shell--full {
  width: 100%;
  min-width: 0;
  min-height: 34rem;
}

.fe-results-shell {
  padding: 1.5rem;
  border: 1px solid var(--fe-line-strong);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--fe-shadow-soft);
}

.fe-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.fe-place-card {
  padding: 1.15rem 1.15rem 1rem;
  border: 1px solid var(--fe-line);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.9);
}

.fe-place-description {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(31, 77, 143, 0.1);
  border-radius: 1rem;
  background: rgba(31, 77, 143, 0.04);
}

.fe-place-label {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--fe-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fe-copy-address-button {
  min-height: auto;
  padding: 0.55rem 0.9rem;
}

.fe-copy-feedback {
  min-height: 1rem;
}

.fe-place-event-box {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(31, 77, 143, 0.1);
  border-radius: 1rem;
  background: rgba(243, 184, 115, 0.08);
}

.fe-place-event-item + .fe-place-event-item {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(31, 77, 143, 0.14);
}

.fe-place-card--empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  text-align: center;
}

.fe-place-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fe-place-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(31, 77, 143, 0.08);
  color: var(--fe-accent-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

.fe-result-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(31, 77, 143, 0.1);
  color: var(--fe-accent-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.fe-map-frame {
  width: 100%;
  height: 100%;
  min-height: 24rem;
  border: 0;
}

.fe-map-canvas {
  width: 100%;
  height: 100%;
  min-height: 24rem;
}

.fe-map-marker {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 0;
  background: transparent;
}

.fe-map-marker__dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(18, 37, 61, 0.24);
}

.fe-map-marker--center .fe-map-marker__dot {
  background: #cf2e2e;
}

.fe-map-marker--place.fe-map-marker--none .fe-map-marker__dot {
  background: var(--fe-accent);
}

.fe-map-marker--place.fe-map-marker--future .fe-map-marker__dot {
  background: #f08c2e;
}

.fe-map-marker--place.fe-map-marker--today .fe-map-marker__dot {
  background: #2ca24f;
}

.fe-map-marker--place .fe-map-marker__dot {
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  font-size: 0.68rem;
}

.fe-map-popup__address-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.fe-map-popup__order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.7rem;
  margin-bottom: 0.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(31, 77, 143, 0.08);
  color: var(--fe-accent-deep);
  font-size: 0.76rem;
  font-weight: 800;
}

.fe-map-popup__copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 1px solid rgba(31, 77, 143, 0.18);
  border-radius: 999px;
  background: rgba(31, 77, 143, 0.06);
  color: var(--fe-accent-deep);
}

.fe-map-popup__copy-button:hover {
  background: rgba(31, 77, 143, 0.12);
}

.fe-map-popup__copy-icon {
  position: relative;
  width: 0.8rem;
  height: 0.8rem;
  border: 1.6px solid currentColor;
  border-radius: 0.15rem;
}

.fe-map-popup__copy-icon::before {
  content: "";
  position: absolute;
  top: -0.28rem;
  left: 0.18rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 1.6px solid currentColor;
  border-radius: 0.15rem;
  background: rgba(255, 255, 255, 0.7);
}

.fe-map-popup__feedback {
  min-height: 1rem;
  margin-top: 0.25rem;
}

.fe-map-placeholder {
  position: relative;
  min-height: 24rem;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--fe-ink-soft);
  background:
    linear-gradient(135deg, rgba(31, 77, 143, 0.08), rgba(243, 184, 115, 0.10)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 245, 253, 0.94));
}

.fe-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 77, 143, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 77, 143, 0.08) 1px, transparent 1px);
  background-size: 2.75rem 2.75rem;
}

.fe-map-pin {
  position: relative;
  z-index: 1;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1rem;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, var(--fe-accent), var(--fe-accent-deep));
  box-shadow: 0 12px 28px rgba(31, 77, 143, 0.24);
}

.fe-map-pin::after {
  content: "";
  position: absolute;
  inset: 0.65rem;
  border-radius: 50%;
  background: #fff;
}

.fe-map-page {
  display: grid;
  gap: 1.5rem;
}

.fe-map-header {
  max-width: 48rem;
}

.fe-map-control-panel {
  padding: 1.5rem 1.5rem 1.25rem;
}

.fe-filter-section + .fe-filter-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(31, 77, 143, 0.12);
}

.fe-advanced-filters {
  margin-top: 1rem;
}

.fe-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.fe-family-filter-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.fe-family-filter-card {
  grid-column: span 3;
  padding: 1rem 1rem 0.9rem;
  border: 1px solid var(--fe-line);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.62);
}

.fe-family-filter-card--compact {
  grid-column: span 3;
}

.fe-family-filter-card--wide {
  grid-column: span 6;
}

.fe-filter-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.fe-range-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fe-range-meta > div {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.fe-dual-range {
  position: relative;
  height: 2.4rem;
  display: flex;
  align-items: center;
}

.fe-dual-range__track {
  position: absolute;
  inset: 50% 0 auto;
  height: 0.45rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(31, 77, 143, 0.12), rgba(31, 77, 143, 0.24));
}

.fe-dual-range__input {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.fe-dual-range__input::-webkit-slider-runnable-track {
  height: 0.45rem;
  background: transparent;
}

.fe-dual-range__input::-moz-range-track {
  height: 0.45rem;
  background: transparent;
  border: 0;
}

.fe-dual-range__input::-webkit-slider-thumb {
  appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: -0.32rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--fe-accent);
  box-shadow: 0 4px 16px rgba(31, 77, 143, 0.22);
  cursor: pointer;
  pointer-events: auto;
}

.fe-dual-range__input::-moz-range-thumb {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--fe-accent);
  box-shadow: 0 4px 16px rgba(31, 77, 143, 0.22);
  cursor: pointer;
  pointer-events: auto;
}

.fe-dual-range__input--min {
  z-index: 2;
}

.fe-dual-range__input--max {
  z-index: 3;
}

.fe-filter-chip {
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--fe-line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--fe-ink-soft);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.fe-filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 77, 143, 0.34);
  color: var(--fe-ink);
}

.fe-filter-chip[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--fe-accent), var(--fe-accent-deep));
  color: #fff;
  box-shadow: var(--fe-shadow-soft);
}

.text-muted {
  color: var(--fe-ink-soft) !important;
}

@media (max-width: 991.98px) {
  .navbar {
    margin-top: 0.5rem;
  }

  .fe-hero {
    padding: 1.5rem;
    border-radius: 1.5rem;
  }

  .fe-map-shell {
    width: 100%;
    min-width: 0;
  }

  .fe-family-filter-card,
  .fe-family-filter-card--compact,
  .fe-family-filter-card--wide {
    grid-column: span 12;
  }

  .fe-filter-select {
    width: 100%;
    min-width: 0;
  }

  .fe-range-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .fe-results-grid {
    grid-template-columns: 1fr;
  }
}
