*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.top-pills {
  scrollbar-width: none;
}

.top-pills::-webkit-scrollbar {
  display: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

.panel-fade {
  animation: panelFade 280ms ease;
}

.mobile-dock {
  bottom: max(1rem, env(safe-area-inset-bottom));
}

.menu-dropdown > summary::-webkit-details-marker {
  display: none;
}

.menu-panel::before {
  content: "";
  position: absolute;
  right: 18px;
  top: -8px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: 1px solid #dbe6ff;
  border-top: 1px solid #dbe6ff;
  transform: rotate(45deg);
}

.menu-item {
  display: flex;
  min-height: 46px;
  align-items: center;
  border-radius: 18px;
  padding: 0 14px;
  color: #43506a;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.menu-item:hover {
  background: #f5f8ff;
  color: #2967f6;
  transform: translateY(-1px);
}

.search-suggestions {
  position: relative;
  z-index: 12;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #dbe6ff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 50px rgba(57, 83, 141, 0.16);
  backdrop-filter: blur(14px);
}

.search-suggestion {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  background: #f8fbff;
  padding: 0 14px;
  color: #2d3951;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: left;
}

.search-suggestion:hover {
  background: #edf4ff;
}

.search-suggestion__main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-suggestion__label {
  display: block;
  color: #22304a;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestion__hint {
  display: none;
  color: #8190aa;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.search-suggestion__type {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe6ff;
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  color: #6f7b93;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  flex-shrink: 0;
}

.brand-filter-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 44px;
  border: 1px solid #dbe6ff;
  border-radius: 999px;
  background: #fff;
  padding: 0 12px 0 8px;
  color: #6f7b93;
  font-size: 0.84rem;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.brand-filter-chip:hover {
  transform: translateY(-1px);
  border-color: #bfd2ff;
}

.brand-filter-chip.is-active {
  border-color: #2967f6;
  background: #eff5ff;
  color: #2967f6;
  box-shadow: 0 12px 24px rgba(41, 103, 246, 0.12);
}

.brand-filter-chip__logo {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  display: inline-flex;
  align-items: center;
  place-items: center;
  border-radius: 999px;
  background: #f5f8ff;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-filter-chip__logo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 2px;
}

.brand-filter-chip__label {
  white-space: nowrap;
  font-size: 0.78rem;
}

.news-status-pill {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbe6ff;
  border-radius: 999px;
  background: #f5f8ff;
  padding: 0 14px;
  color: #2967f6;
  font-size: 0.82rem;
  font-weight: 800;
}

.news-status-pill--soft {
  color: #6f7b93;
  background: #fff;
}

.news-status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  animation: syncPulseGreen 1.9s infinite;
  flex-shrink: 0;
}

.news-intro-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.news-intro-card__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #f6f9ff, #eef4ff);
  color: #2967f6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
  animation: panelFloat 2.8s ease-in-out infinite;
}

.news-card {
  border: 1px solid #dbe6ff;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(41, 103, 246, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  padding: 18px;
  box-shadow: 0 18px 42px rgba(75, 104, 171, 0.12);
}

.news-card__top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.news-card__icon-wrap {
  flex-shrink: 0;
}

.news-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #2967f6, #4d84ff);
  color: #fff;
  box-shadow: 0 16px 28px rgba(41, 103, 246, 0.2);
  animation: panelFloat 3.1s ease-in-out infinite;
}

.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-card__version,
.news-card__date {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-card__version {
  border: 1px solid #dbe6ff;
  background: #eff5ff;
  color: #2967f6;
}

.news-card__date {
  border: 1px solid #e9eefb;
  background: #fff;
  color: #6f7b93;
}

.news-card__title {
  margin: 14px 0 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #1c2434;
}

.news-card__body {
  margin: 12px 0 0;
  color: #6f7b93;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.75;
}

.news-card__media {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid #e7efff;
  border-radius: 24px;
  background: #f8fbff;
  padding: 8px;
}

.news-card__media--video {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.news-card__image {
  display: block;
  width: 100%;
  max-height: 360px;
  border-radius: 18px;
  object-fit: cover;
}

.news-card__video-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #fff;
  padding: 10px 14px;
  color: #2967f6;
  font-size: 0.84rem;
  font-weight: 800;
}

.news-card__video-url {
  color: #6f7b93;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid #dbe6ff;
  border-radius: 18px;
  background: #fff;
  padding: 13px 16px;
  color: #2967f6;
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.news-card__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(41, 103, 246, 0.12);
}

.compact-station-card {
  border: 1px solid #edf2ff;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  padding: 18px;
  box-shadow: 0 14px 32px rgba(91, 121, 179, 0.06);
}

.compact-station-card__price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.96rem;
  font-weight: 800;
}

.compact-station-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-station-card__meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e8efff;
  border-radius: 999px;
  background: #fff;
  padding: 8px 12px;
  color: #6f7b93;
  font-size: 0.82rem;
  font-weight: 700;
}

.sync-pulse {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #22c55e;
  animation: syncPulseGreen 1.9s infinite;
}

.sync-pulse-busy {
  background: #64748b;
  animation-name: syncPulseSlate;
}

.sync-pulse-error {
  background: #ef4444;
  animation-name: syncPulseRed;
}

.sync-pulse-warn {
  background: #f59e0b;
  animation-name: syncPulseAmber;
}

.map-shell {
  min-height: 360px;
}

.map-page .map-shell {
  min-height: min(82vh, 860px);
}

.map-page #mapSection {
  padding-bottom: 6.5rem;
}

.map-layout {
  display: grid;
  gap: 16px;
}

.map-hero {
  position: relative;
}

.map-hero__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding-inline: 4px;
}

.map-hero__count {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid #dbe6ff;
  border-radius: 999px;
  background: #f5f8ff;
  padding: 0 14px;
  color: #6f7b93;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.map-hero__canvas {
  position: relative;
}

.map-brand-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding-inline: 4px;
}

.map-brand-panel__label {
  display: block;
  color: #8da2cb;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.map-brand-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-hero__hint {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 20;
  display: grid;
  gap: 6px;
  max-width: min(320px, calc(100% - 28px));
  border: 1px solid rgba(219, 230, 255, 0.96);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  padding: 12px 14px;
  box-shadow: 0 18px 30px rgba(75, 104, 171, 0.14);
  backdrop-filter: blur(12px);
}

.map-hero__hint-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #eef4ff;
  padding: 8px 12px;
  color: #2967f6;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.map-hero__hint p {
  margin: 0;
  color: #6f7b93;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.map-side {
  align-self: start;
}

@media (min-width: 1100px) {
  .map-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.82fr);
    align-items: start;
  }

  .map-side {
    position: sticky;
    top: 1.25rem;
  }
}

.map-page .leaflet-bottom {
  bottom: 92px;
}

.leaflet-container {
  font-family: "Inter", sans-serif;
  background: #f7faff;
}

.leaflet-control-zoom {
  border: 1px solid #dbe6ff !important;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(75, 104, 171, 0.12) !important;
}

.leaflet-control-zoom a {
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  color: #2967f6 !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(75, 104, 171, 0.16);
}

.leaflet-popup-content {
  margin: 14px 16px;
  min-width: 220px;
}

.leaflet-popup-tip {
  box-shadow: none;
}

.brand-marker-wrap {
  background: transparent;
  border: 0;
}

.brand-marker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 118px;
  padding: 6px 8px 6px 6px;
  border: 1px solid #dbe6ff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(75, 104, 171, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.brand-marker:hover,
.brand-marker.is-active {
  transform: translateY(-1px) scale(1.02);
  border-color: #a9c4ff;
  box-shadow: 0 18px 34px rgba(41, 103, 246, 0.24);
}

.brand-marker__logo {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 14px rgba(75, 104, 171, 0.12);
}

.brand-marker__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.brand-marker__prices {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-marker__name {
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #2967f6;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-marker__prices span {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1;
  color: #43506a;
  white-space: nowrap;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 56px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(91, 121, 179, 0.08);
}

.brand-badge--compact {
  min-height: 48px;
  padding: 6px 12px 6px 6px;
  gap: 8px;
}

@media (max-width: 640px) {
  .top-pills {
    flex-wrap: wrap;
    overflow: visible;
  }

  .top-pills > * {
    max-width: 100%;
  }

  .menu-panel {
    width: min(260px, calc(100vw - 2.5rem));
  }

  .compact-station-card {
    padding: 16px;
  }

  .site-beta-badge {
    padding-inline: 0.55rem;
  }

  .site-beta-label {
    display: none;
  }

  .brand-filter-chip {
    min-height: 36px;
    gap: 7px;
    padding: 0 10px 0 6px;
    font-size: 0.74rem;
  }

  .brand-filter-chip__logo {
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    height: 20px;
    min-height: 20px;
    max-height: 20px;
  }

  .brand-filter-chip__label {
    font-size: 0.72rem;
  }

  .news-intro-card,
  .news-card__top {
    gap: 12px;
  }

  .news-intro-card__icon,
  .news-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
  }

  .news-card {
    padding: 16px;
    border-radius: 26px;
  }

  .news-card__body {
    font-size: 0.92rem;
    line-height: 1.65;
  }

  .news-card__link {
    width: 100%;
    justify-content: center;
  }

  .brand-badge {
    min-height: 48px;
    padding: 6px 12px 6px 6px;
    gap: 8px;
  }

  .map-page #mapSection {
    padding-bottom: 7.25rem;
  }
}

.brand-badge__logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 8px 18px rgba(91, 121, 179, 0.1);
}

.brand-badge__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.brand-badge__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14ch;
}

.brand-badge--compact .brand-badge__label {
  max-width: 9ch;
}

.compact-station-card__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-station-card__address {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.selected-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.selected-card-actions > * {
  min-width: 0;
}

.selected-card-actions > * span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-banner-warn {
  border-color: #ffe0a3;
  background: #fff7e8;
  color: #a16207;
}

.service-banner-error {
  border-color: #ffd6d6;
  background: #fff5f5;
  color: #ef3232;
}

@media (max-width: 640px) {
  .map-shell {
    min-height: 320px;
  }

  .map-page .map-shell {
    min-height: 74vh;
  }

  .map-page #mapSection {
    padding-bottom: 7rem;
  }

  .map-hero__head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 10px;
  }

  .map-hero__count {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 0.8rem;
  }

  .map-brand-panel {
    gap: 10px;
    margin-bottom: 10px;
  }

  .map-brand-panel__chips {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .map-brand-panel__chips::-webkit-scrollbar {
    display: none;
  }

  .map-hero__hint {
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    gap: 5px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .map-hero__hint p {
    font-size: 0.78rem;
  }

  .brand-marker {
    min-width: 104px;
    padding: 5px 7px 5px 5px;
    gap: 7px;
    border-radius: 16px;
  }

  .brand-marker__logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand-marker__prices span {
    font-size: 0.57rem;
  }

  .mobile-dock {
    bottom: max(0.85rem, env(safe-area-inset-bottom));
  }

  .menu-panel {
    width: min(270px, calc(100vw - 2.5rem));
  }

  .selected-card-actions {
    grid-template-columns: 1fr;
  }
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes syncPulseGreen {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.38);
  }

  70% {
    transform: scale(1.06);
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@keyframes syncPulseSlate {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(100, 116, 139, 0.28);
  }

  70% {
    transform: scale(1.06);
    box-shadow: 0 0 0 8px rgba(100, 116, 139, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(100, 116, 139, 0);
  }
}

@keyframes syncPulseRed {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.34);
  }

  70% {
    transform: scale(1.06);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

@keyframes syncPulseAmber {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.34);
  }

  70% {
    transform: scale(1.06);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}
