:root {
  color-scheme: dark;
  --body-bg: #000000;
  --surface: #1a1a1a;
  --surface-strong: #000000;
  --surface-muted: rgba(255, 255, 255, 0.03);
  --header-bg: rgb(0 0 0 / 85%);
  --overlay: rgba(0, 0, 0, 0.6);
  --code-bg: rgba(0, 0, 0, 0.25);
  --toast-bg: rgba(12, 15, 20, 0.82);
  --toast-border: 1px solid rgba(255, 255, 255, 0.08);
  --toast-success-color: #86efac;
  --toast-success-bg: rgba(34, 197, 94, 0.14);
  --toast-error-color: #fff;
  --toast-error-bg: rgba(185, 28, 28, 0.96);
  --toast-info-color: var(--accent);
  --closed-bg: rgb(0 0 0);
  --closed-color: #ff0000;
  --shop-only-bg: rgba(245, 166, 35, 0.12);
  --shop-only-color: #f5c76b;
  --alert-error-bg: rgba(239, 68, 68, 0.1);
  --alert-error-border: rgba(239, 68, 68, 0.25);
  --alert-error-text: #fca5a5;
  --theme-color: #000000;
  --status-bar-color: #000000;
  --gradient-accent: rgba(245, 166, 35, 0.08);
  --gradient-green: rgba(34, 197, 94, 0.04);
  --bg: #0c0f14;
  --bg-card-hover: #1f2533;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f0f2f5;
  --text-secondary: #8b95a8;
  --text-muted: #5c6578;
  --accent: #f5a623;
  --accent-dim: rgba(245, 166, 35, 0.15);
  --tg-link: #6ab3f3;
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.12);
  --status-yes-title: #86efac;
  --status-no-title: #fca5a5;
  --status-stale-title: #fde047;
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.12);
  --yellow: #eab308;
  --yellow-dim: rgba(234, 179, 8, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --list-gap: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 0px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --coffee-cup: #d4a574;
  --coffee-hint-bg: rgba(245, 166, 35, 0.16);
  --coffee-hint-text: #f5c76b;
}

[data-theme="light"] {
  color-scheme: light;
  --body-bg: #e8ecf1;
  --surface: #ffffff;
  --surface-strong: #f4f6f9;
  --surface-muted: rgba(0, 0, 0, 0.03);
  --header-bg: rgb(255 255 255 / 92%);
  --overlay: rgba(15, 23, 42, 0.35);
  --code-bg: rgba(0, 0, 0, 0.06);
  --toast-bg: rgba(255, 255, 255, 0.98);
  --toast-border: 1px solid rgba(0, 0, 0, 0.1);
  --toast-success-color: #166534;
  --toast-success-bg: rgba(34, 197, 94, 0.14);
  --toast-error-color: #7f1d1d;
  --toast-error-bg: #fee2e2;
  --toast-info-color: #92400e;
  --closed-bg: #fee2e2;
  --closed-color: #dc2626;
  --shop-only-bg: rgba(245, 166, 35, 0.18);
  --shop-only-color: #92400e;
  --alert-error-bg: rgba(239, 68, 68, 0.08);
  --alert-error-border: rgba(239, 68, 68, 0.2);
  --alert-error-text: #b91c1c;
  --theme-color: #ffffff;
  --status-bar-color: #ffffff;
  --gradient-accent: rgba(245, 166, 35, 0.14);
  --gradient-green: rgba(34, 197, 94, 0.1);
  --bg: #f4f6f9;
  --bg-card-hover: #eef1f6;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #1a2233;
  --text-secondary: #5c6578;
  --text-muted: #8b95a8;
  --accent-dim: rgba(245, 166, 35, 0.2);
  --green-dim: rgba(34, 197, 94, 0.14);
  --status-yes-title: #166534;
  --status-no-title: #b91c1c;
  --status-stale-title: #92400e;
  --red-dim: rgba(239, 68, 68, 0.1);
  --yellow-dim: rgba(234, 179, 8, 0.14);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
  --coffee-cup: #a16207;
  --coffee-hint-bg: rgba(245, 166, 35, 0.22);
  --coffee-hint-text: #b45309;
  --tg-link: #2481cc;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  touch-action: manipulation;
  background-color: var(--status-bar-color);
  scrollbar-gutter: stable;
}

/* iPhone / iPad: без отдельного увеличения — те же размеры, что на Android */
html.ios {
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Шторки: компактный зазор снизу на iPhone/iPad */
html.ios .sheet:not(.sheet--messages:has(.messages-compose--chat)) {
  padding-bottom: max(2px, calc(var(--safe-bottom) * 0.25));
}

/* iOS Safari: скрытые поля в других шторках всё равно попадают в панель ↑↓ над клавиатурой */
html.ios .sheet.hidden textarea,
html.ios .sheet.hidden input:not([type='hidden']):not([type='checkbox']):not([type='radio']):not([type='button']):not([type='submit']),
html.ios textarea:disabled,
html.ios input:not([type='hidden']):not([type='checkbox']):not([type='radio']):not([type='button']):not([type='submit']):disabled {
  display: none !important;
}

/* iOS/Android PWA: заливка области под статус-баром цветом шапки */
@media (display-mode: standalone), (display-mode: fullscreen) {
  body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 0px);
    background: var(--status-bar-color);
    z-index: 10001;
    pointer-events: none;
  }
}

body {
  font-family: var(--font);
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--gradient-accent), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, var(--gradient-green), transparent);
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 16px 0;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top, 0px);
  background: var(--status-bar-color);
  pointer-events: none;
}

.header__top {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
}

.header__main {
  flex: 1;
  min-width: 0;
}

.header__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header__title-row .header__title {
  flex: 1;
  min-width: 0;
}

.header__icon {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(245, 166, 35, 0.4));
}

.header__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-right: -8px;
}

.header__actions .btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--text-muted);
}

.header__actions .btn-icon:active {
  background: transparent;
  color: var(--text);
  opacity: 0.75;
}

.header__actions .btn-icon svg {
  width: 20px;
  height: 20px;
}

@keyframes badge-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.header__actions #btnMenu svg {
  width: 21px;
  height: 21px;
}

.header-menu {
  position: relative;
  margin-right: -2px;
}

.header-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  min-width: 268px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.header-menu__panel.hidden {
  display: none;
}

.header-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.header-menu__item:active {
  background: var(--surface-muted);
}

a.header-menu__item {
  text-decoration: none;
}

.header-menu__item--donate .header-menu__icon,
.header-menu__item--donate .header-menu__label {
  color: var(--accent);
}

.header-menu__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.header-menu__label {
  flex: 1;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-icon:active {
  transform: scale(0.94);
  background: var(--surface-strong);
  color: var(--text);
}

#btnTheme .theme-toggle__moon,
#btnTheme .theme-toggle__sun {
  display: none;
}

#btnTheme[data-target-theme="dark"] .theme-toggle__moon {
  display: block;
}

#btnTheme[data-target-theme="light"] .theme-toggle__sun {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Filters */
.filters-wrap {
  padding-bottom: 10px;
}

.filters-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filters-toolbar .filters {
  flex: 1 1 auto;
  min-width: 0;
}

.view-toggle {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.view-toggle__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.view-toggle__btn:active {
  transform: scale(0.96);
}

.view-toggle__btn--active {
  background: var(--accent-dim);
  color: var(--accent);
}

.filters {
  display: flex;
  align-items: center;
  min-width: 0;
}

.fuel-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.fuel-filter__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
  min-width: 7.5rem;
  max-width: min(100%, 12rem);
  height: 38px;
  padding: 0 2.25rem 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b95a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.fuel-filter__select:hover {
  border-color: var(--border-strong);
}

.fuel-filter__select:focus {
  outline: none;
  border-color: rgba(245, 166, 35, 0.55);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.fuel-filter__select option {
  background: var(--surface);
  color: var(--text);
}

.filters-hint {
  margin: 6px 2px 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}

.alert-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--alert-error-bg);
  border: 1px solid var(--alert-error-border);
  font-size: 0.8125rem;
  color: var(--alert-error-text);
  line-height: 1.45;
}

.alert-banner--warn {
  background: var(--accent-dim);
  border-color: rgba(245, 166, 35, 0.25);
  color: var(--accent);
}

.alert-banner code {
  font-size: 0.75rem;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.app:has(.alert-banner:not(.hidden)) .header {
  padding-bottom: var(--list-gap);
}

.site-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 2px var(--list-gap);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.28);
}

.site-banner.hidden {
  display: none;
}

.site-banner__text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text);
}

.site-banner__close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.site-banner__feedback-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  vertical-align: baseline;
}

.site-banner__feedback-link:hover {
  opacity: 0.85;
}

[data-theme="light"] .site-banner {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.18);
}

.filter-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.filter-chip:active {
  transform: scale(0.96);
}

.filter-chip.active {
  background: var(--accent-dim);
  border-color: rgba(245, 166, 35, 0.35);
  color: var(--accent);
}

/* Main */
.main {
  flex: 1;
  padding: 0 2px 0;
}

/* Station cards */
.station-list {
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
  padding-top: var(--list-gap);
}

.station-list--compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.station-list--compact .station-list__insert {
  grid-column: 1 / -1;
}

.station-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  width: 100%;
  min-height: 148px;
  height: 100%;
  padding: 10px 10px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
  font: inherit;
  color: inherit;
  overflow: hidden;
  gap: 6px;
}

.station-tile:active {
  transform: scale(0.97);
}

.station-tile--closed {
  opacity: 0.82;
}

.station-tile__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  flex-shrink: 0;
}

.station-tile__logo {
  display: flex;
  justify-content: flex-start;
  flex-shrink: 0;
}

.brand-logo--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  font-size: 1.125rem;
  line-height: 1;
}

.station-tile__logo .brand-logo,
.station-tile__logo .brand-logo--fallback {
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  object-fit: contain;
}

.station-tile__head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  padding-top: 1px;
}

.station-tile__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
}

.station-tile__comments {
  display: block;
  width: 100%;
  line-height: 1.35;
  flex-shrink: 0;
}

.station-tile__fuels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
  width: 100%;
  flex-shrink: 0;
}

.station-tile__fuel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.6875rem;
  line-height: 1.25;
}

.station-tile__fuel--yes {
  border-color: rgba(52, 211, 153, 0.22);
}

.station-tile__fuel--no {
  border-color: rgba(248, 113, 113, 0.22);
}

.station-tile__fuel--unknown,
.station-tile__fuel--stale {
  border-color: var(--border);
}

[data-theme="light"] .station-tile__fuel {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .station-tile__fuel--yes {
  border-color: rgba(22, 163, 74, 0.2);
}

[data-theme="light"] .station-tile__fuel--no {
  border-color: rgba(220, 38, 38, 0.18);
}

.station-tile__fuel:nth-child(even) {
  align-items: flex-end;
  text-align: right;
}

.station-tile__fuel:nth-child(even) .station-tile__fuel-label .fuel-label--stacked {
  align-items: flex-end;
}

.station-tile__fuel-label {
  font-weight: 600;
  color: var(--text);
  max-width: 100%;
  word-break: break-word;
}

.station-tile__fuel-label .fuel-label--stacked {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
}

.station-tile__fuel-label .fuel-label__main {
  font-size: 0.6875rem;
  font-weight: 600;
}

.station-tile__fuel-label .fuel-label__sub {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.station-tile__fuel-status {
  font-weight: 500;
}

.station-tile__fuel--yes .station-tile__fuel-status {
  color: var(--green);
}

.station-tile__fuel--no .station-tile__fuel-status {
  color: var(--red);
}

.station-tile__fuel--unknown .station-tile__fuel-status,
.station-tile__fuel--stale .station-tile__fuel-status {
  color: var(--text-muted);
}

.station-tile__fuel--stale .station-tile__fuel-status {
  color: var(--yellow);
}

.station-tile__fuels-empty {
  grid-column: 1 / -1;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.station-tile__name {
  display: block;
  width: 100%;
  line-height: 1.35;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.station-tile__name-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  flex-shrink: 0;
}

.station-tile__name-row .station-tile__name {
  flex: 1;
  min-width: 0;
  width: auto;
}

.station-tile__name-row .station-card__canister {
  flex-shrink: 0;
  margin-left: auto;
  margin-top: 1px;
}

.station-tile__address {
  display: block;
  width: 100%;
  line-height: 1.35;
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.station-tile__rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.station-tile__rating-star {
  color: var(--accent);
  font-size: 0.8125rem;
}

.station-tile__rating-value {
  font-weight: 600;
  color: var(--text-secondary);
}

.station-tile__status {
  font-size: 0.75rem;
  font-weight: 500;
}

.station-tile--open .station-tile__status {
  color: var(--green);
}

.station-tile--closed .station-tile__status {
  color: var(--red);
}

.station-tile__comments {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.station-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.station-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.station-card__head .station-card__info {
  flex: 1;
  min-width: 0;
}

.station-card__head .station-card__canister {
  margin-left: auto;
  align-self: center;
}

.station-card__closure-row {
  margin-bottom: 12px;
}

.station-card__closure-row .station-card__closure {
  width: 100%;
}

.station-card__closure-row .station-card__closure-opt {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.75rem;
}

.station-card--closed {
  border-color: rgba(167, 139, 250, 0.25);
}

.station-card__closed {
  margin: -4px 0 10px;
  padding: 8px 10px;
  background: var(--closed-bg);
  color: var(--closed-color);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-left: -16px;
  margin-right: -16px;
  text-align: center;
}

.station-card__shop-only {
  margin: -4px 0 10px;
  padding: 8px 10px;
  background: var(--shop-only-bg);
  color: var(--shop-only-color);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-left: -16px;
  margin-right: -16px;
  text-align: center;
}

.station-card__info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.station-card__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 1;
}

.station-card__name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.station-card__canister {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.station-card__canister--yes {
  color: var(--green);
}

.station-card__canister--no {
  color: #f87171;
}

.station-card__canister-icon {
  display: block;
}

.station-card__canister-check {
  fill: var(--surface);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.station-card__info .brand-logo,
.station-card__info .brand-logo--fallback {
  align-self: flex-start;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  min-width: 36px;
  max-width: 56px;
  object-fit: contain;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-dot--tatneft { background: #00a651; }
.brand-dot--gazpromneft { background: #0072bc; }
.brand-dot--lukoil { background: #e30613; }
.brand-dot--rosneft { background: #ffd100; }
.brand-dot--teboil { background: #003da5; }
.brand-dot--ptk { background: #ff6600; }
.brand-dot--gazprom { background: #0066b3; }

.station-card__address {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.25;
  word-break: break-word;
}

.station-card__closure {
  display: flex;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-strong);
}

.station-card__closure-opt {
  padding: 6px 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}

.station-card__closure-opt + .station-card__closure-opt {
  border-left: 1px solid var(--border);
}

.station-card__closure-opt:active {
  opacity: 0.85;
}

.station-card__closure-opt--active.station-card__closure-opt--open {
  background: var(--green-dim);
  color: var(--green);
}

.station-card__closure-opt--active.station-card__closure-opt--closed {
  background: rgba(167, 139, 250, 0.18);
  color: #c4b5fd;
}

.station-card__comments {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% + 32px);
  margin: 14px -16px -16px;
  padding: 12px 16px;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  color: var(--tg-link);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.station-card__comments:active {
  background: var(--bg-card-hover);
}

.station-card__comments-text {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.station-card__comments-badge {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: badge-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.station-card__comments-badge.hidden {
  display: none;
}

.station-card__comments-chevron {
  flex-shrink: 0;
  opacity: 0.9;
}

.fuel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.canister-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.canister-bar__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
  flex-shrink: 0;
}

.canister-bar__opts {
  display: flex;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-strong);
}

.canister-bar__opt {
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}

.canister-bar__opt + .canister-bar__opt {
  border-left: 1px solid var(--border);
}

.canister-bar__opt:active {
  opacity: 0.85;
}

.canister-bar__opt--active.canister-bar__opt--yes {
  background: var(--green-dim);
  color: var(--green);
}

.canister-bar__opt--active.canister-bar__opt--no {
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
}

.station-card:has(.canister-bar__opt:active) {
  transform: none;
}

.queue-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

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

.queue-bar__track {
  flex: 1;
  min-width: 0;
}

.queue-bar__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.queue-bar__empty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 9px;
}

.queue-bar__meter-wrap {
  width: 100%;
  min-width: 0;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
}

.queue-bar__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
  line-height: 1.2;
}

.queue-bar__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  align-self: center;
  gap: 6px;
  flex-shrink: 0;
}

.queue-bar--picker-open {
  gap: 8px;
}

.queue-bar__picker {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.queue-bar__picker-label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
}

.queue-bar__picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.queue-bar__chip {
  padding: 7px 11px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.queue-bar__chip:active {
  transform: scale(0.97);
}

.queue-bar__chip--cancel {
  color: var(--text-muted);
  font-weight: 500;
}

.queue-bar__dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.queue-bar__dot--empty {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

.queue-bar__meter {
  height: 100%;
  min-width: 28px;
  max-width: 100%;
  border-radius: 999px;
  overflow: hidden;
}

.queue-bar__meter-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e 0%, #eab308 52%, #ef4444 100%);
  transition: width 0.25s ease;
}

.queue-bar__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
}

.queue-bar__label--sub {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.queue-bar__label--empty {
  color: var(--green);
}

.queue-bar__btn {
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.queue-bar__btn:active:not(:disabled) {
  transform: scale(0.94);
}

.queue-bar__btn--leave {
  background: var(--surface-muted);
  border-color: var(--border);
  color: var(--text-secondary);
}

.queue-bar__btn--loading {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 380px) {
  .queue-bar__row {
    flex-wrap: wrap;
  }

  .queue-bar__actions {
    margin-left: auto;
  }

  .queue-bar__btn {
    padding: 5px 8px;
    font-size: 0.625rem;
  }
}

.station-card:has(.queue-bar__btn:active) {
  transform: none;
}

.coffee-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.coffee-bar__label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.coffee-bar__cup {
  flex-shrink: 0;
  color: var(--coffee-cup);
}

.coffee-bar__text {
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.25;
}

.coffee-bar__hint {
  flex-shrink: 1;
  min-width: 0;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--coffee-hint-bg);
  color: var(--coffee-hint-text);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-transform: lowercase;
  white-space: nowrap;
}

.coffee-bar__votes {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.coffee-bar__btn:first-of-type {
  margin-left: auto;
}

.coffee-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 44px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.coffee-bar__btn:active {
  transform: scale(0.94);
}

.coffee-bar__btn--active.coffee-bar__btn--yum {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.35);
  color: var(--green);
}

.coffee-bar__btn--active.coffee-bar__btn--yuck {
  background: var(--red-dim);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--red);
}

.coffee-bar__count {
  min-width: 1ch;
  text-align: center;
}

@media (max-width: 380px) {
  .coffee-bar__hint {
    white-space: normal;
    text-align: center;
  }

  .coffee-bar__btn {
    min-width: 40px;
    padding: 6px 8px;
  }
}

.station-card:has(.coffee-bar__btn:active) {
  transform: none;
}

.fuel-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.fuel-badge:hover {
  border-color: var(--text-muted);
}

.fuel-badge:active {
  transform: scale(0.98);
  background: var(--bg-card-hover);
}

.fuel-badge__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.fuel-badge__label {
  flex: 1;
  min-width: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fuel-label--stacked {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.fuel-label__main {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.fuel-label__sub {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.fuel-report-card__title .fuel-label--stacked {
  text-transform: none;
}

.fuel-report-card__title .fuel-label__sub {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
}

.review-fuel-chip .fuel-label--stacked {
  align-items: center;
  text-transform: none;
}
/* Review fuel chip – base style on dark branded background */
.messages-sheet--brand-reviews .review-fuel-chip {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.65);
}

/* Review fuel chip – SELECTED state: bright amber, high contrast */
.messages-sheet--brand-reviews .review-fuel-chip.active,
.messages-sheet--brand-reviews .review-fuel-chip[aria-pressed="true"] {
  background: rgba(245, 166, 35, 0.28);
  border-color: #f5a623;
  color: #f5c76b;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.5);
}

.fuel-label__sub--gdrive {
  color: #e30613;
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 1;
}

.fuel-report-card__title .fuel-label__sub--gdrive {
  color: #e30613;
}

.fuel-label__sub--pulsar {
  color: #c9a000;
  text-transform: none;
  letter-spacing: 0.04em;
  opacity: 1;
}

.fuel-report-card__title .fuel-label__sub--pulsar {
  color: #c9a000;
}

.fuel-badge__status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.fuel-badge__status {
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.fuel-badge__price {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.fuel-badge__chg {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fuel-badge__chg--up {
  color: var(--red);
}

.fuel-badge__chg--down {
  color: var(--green);
}

.fuel-badge__time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.fuel-badge__limit {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.fuel-badge--yes {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.2);
}
.fuel-badge--yes .fuel-badge__label { color: var(--text); }
.fuel-badge--yes .fuel-badge__status { color: var(--green); }

.fuel-badge--no {
  background: var(--red-dim);
  border-color: rgba(239, 68, 68, 0.2);
}
.fuel-badge--no .fuel-badge__status { color: var(--red); }
.fuel-badge--no .fuel-badge__price { color: var(--text-secondary); }

[data-theme="light"] .fuel-badge--yes {
  background: rgb(255 255 255 / 0%);
  border-color: rgb(232 236 241);
}

[data-theme="light"] .fuel-badge--no {
  background: rgb(232 236 241);
  border-color: rgb(232 236 241);
  opacity: 0.7;
}

[data-theme="light"] .filter-chip.active {
  background: rgb(232 236 241);
  border-color: rgb(232 236 241);
  color: #3f3f3f;
}

.fuel-badge--unknown {
  background: var(--surface);
}
.fuel-badge--unknown .fuel-badge__status { color: var(--text-muted); }

.fuel-badge--stale,
[data-theme="light"] .fuel-badge--stale {
  background: var(--surface);
  border-color: var(--border);
}
.fuel-badge--stale .fuel-badge__status,
.fuel-badge--stale .fuel-badge__price,
[data-theme="light"] .fuel-badge--stale .fuel-badge__status,
[data-theme="light"] .fuel-badge--stale .fuel-badge__price { color: var(--text-muted); }

/* Empty & Loading */
.empty-state, .loading {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state__hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.loading__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

.hidden {
  display: none !important;
}

/* Footer */
.footer {
  padding: 16px;
  padding-bottom: max(16px, var(--safe-bottom));
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.info-sheet__body {
  padding: 8px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.info-sheet__body p {
  margin: 0;
}

.info-sheet__body strong {
  color: var(--text);
  font-weight: 600;
}

.sheet--info {
  max-height: 70dvh;
}

/* Bottom sheet */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
}

.sheet-overlay.visible {
  opacity: 1;
}

/* Чат водителей / новости: всегда непрозрачный фон — иначе на мобильных мигает «насквозь» */

#stationSheetOverlay {
  z-index: 200;
}

#stationSheet {
  z-index: 201;
}

#sheetOverlay {
  z-index: 220;
}

#reportSheet {
  z-index: 221;
}

body.sheet-stack-report #stationSheetOverlay,
body.sheet-stack-report #stationSheet {
  z-index: 198;
  pointer-events: none;
}

body.sheet-stack-report #sheetOverlay {
  z-index: 230;
}

body.sheet-stack-report #reportSheet {
  z-index: 231;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: var(--shadow);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

.sheet.visible {
  transform: translateY(0);
}

.sheet--station {
  max-height: 92dvh;
  height: auto;
}

.sheet--station .sheet__header {
  justify-content: flex-end;
  padding: 8px 12px 0;
  flex-shrink: 0;
}

.sheet__body--station {
  flex: 0 1 auto;
  max-height: calc(92dvh - 56px);
  padding: 4px 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  overflow-y: auto;
}

.sheet__body--station .station-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}

.sheet__body--station .station-card__comments {
  width: 100%;
  margin: 14px 0 0;
  padding: 12px 0 2px;
  border-radius: 0;
  line-height: 1.35;
}

.sheet__body--station .station-card__comments-text {
  line-height: 1.35;
}

.sheet--messages {
  top: 0;
  bottom: 0;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  padding-top: env(safe-area-inset-top, 0px);
}

.sheet--messages .sheet__handle {
  display: none;
}

.sheet--messages .sheet__header {
  padding-top: 8px;
}

.sheet--messages:has(.messages-compose--chat) {
  --messages-chat-header-pad: 78px;
  --messages-chat-compose-pad: 72px;
  overflow: hidden;
  padding-bottom: 0;
}

.sheet--messages:has(.messages-compose--chat) .sheet__header {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

.sheet--messages:has(.messages-compose--chat) .messages-list-wrap {
  flex: 1;
  min-height: 0;
  margin-top: calc(-1 * var(--messages-chat-header-pad));
  margin-bottom: calc(-1 * var(--messages-chat-compose-pad));
  z-index: 0;
}

.sheet--messages:has(.messages-compose--chat) .messages-list {
  padding-top: calc(var(--messages-chat-header-pad) + 8px);
  padding-bottom: calc(var(--messages-chat-compose-pad) + 8px);
}

.sheet--messages:has(.messages-compose--chat) .messages-compose--chat {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

html.ios .sheet--messages:has(.messages-compose--chat) {
  padding-bottom: 0;
  --messages-chat-compose-pad: calc(50px + env(safe-area-inset-bottom, 0px));
}

html.ios .sheet--messages:not(:has(.messages-compose--chat)) {
  padding-bottom: max(8px, var(--safe-bottom));
}

.messages-list-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.messages-list-wrap--branded {
  background-color: var(--chat-bg-deep);
}

.messages-list-wrap--branded::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    url('../img/chat-pattern.svg?v=249'),
    linear-gradient(165deg, var(--chat-bg-top) 0%, var(--chat-bg-mid) 48%, var(--chat-bg-deep) 100%);
  background-repeat: repeat, no-repeat;
  background-size: 240px 240px, cover;
}

.messages-list {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  position: relative;
  z-index: 1;
  background: transparent;
}

.messages-list-wrap--brand-lukoil,
.messages-sheet--brand-lukoil {
  --chat-bg-top: #e41b24;
  --chat-bg-mid: #a50f16;
  --chat-bg-deep: #5c080d;
}

.messages-list-wrap--brand-gazpromneft,
.messages-sheet--brand-gazpromneft {
  --chat-bg-top: #8b5cf6;
  --chat-bg-mid: #5b21b6;
  --chat-bg-deep: #312e81;
}

.messages-list-wrap--brand-rosneft,
.messages-sheet--brand-rosneft {
  --chat-bg-top: #ffd54f;
  --chat-bg-mid: #f59e0b;
  --chat-bg-deep: #c2410c;
}

.messages-list-wrap--brand-tatneft,
.messages-sheet--brand-tatneft {
  --chat-bg-top: #22c55e;
  --chat-bg-mid: #059669;
  --chat-bg-deep: #064e3b;
}

.messages-list-wrap--brand-teboil,
.messages-sheet--brand-teboil {
  --chat-bg-top: #2563eb;
  --chat-bg-mid: #1d4ed8;
  --chat-bg-deep: #0f274f;
}

.messages-list-wrap--brand-ptk,
.messages-sheet--brand-ptk {
  --chat-bg-top: #fb923c;
  --chat-bg-mid: #ea580c;
  --chat-bg-deep: #7c2d12;
}

.messages-list-wrap--brand-gazprom,
.messages-sheet--brand-gazprom {
  --chat-bg-top: #0ea5e9;
  --chat-bg-mid: #0369a1;
  --chat-bg-deep: #0c4a6e;
}

.messages-list-wrap--brand-default,
.messages-sheet--brand-default {
  --chat-bg-top: #475569;
  --chat-bg-mid: #334155;
  --chat-bg-deep: #1e293b;
}
.messages-list-wrap--brand-reviews {
  --chat-bg-top: #3d2810;
  --chat-bg-mid: #1e1205;
  --chat-bg-deep: #0a0602;
}

.messages-list-wrap--branded .messages-empty {
  margin: auto;
  align-self: center;
  box-sizing: border-box;
  width: fit-content;
  max-width: min(88%, 300px);
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.92);
}

.messages-list-wrap--branded .message-item {
  background: rgba(255, 255, 255, 0.94);
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  border-radius: 16px 16px 16px 6px;
}

.messages-list-wrap--branded .message-item--reply {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px 16px 16px 6px;
  margin-left: 0;
}

.messages-list-wrap--branded .message-item--fresh {
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.45), 0 1px 2px rgba(0, 0, 0, 0.12);
}

.messages-list-wrap--branded .message-item__text,
.messages-list-wrap--branded .message-item__time {
  color: #1a2233;
}

.messages-list-wrap--branded .message-reply-btn,
.messages-list-wrap--branded .message-like {
  color: #6b7280;
}

.messages-list-wrap--branded .message-reaction-chip {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.messages-list-wrap--branded .message-reaction-chip--active {
  border-color: rgba(245, 166, 35, 0.45);
  background: rgba(255, 247, 237, 0.95);
}

.messages-list-wrap--branded .message-reaction-picker {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.messages-list-wrap--branded .message-like--active {
  color: #c2410c;
}

.messages-list-wrap--branded .message-replies-toggle {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.16);
  border-color: rgba(255, 255, 255, 0.14);
}

.messages-list-wrap--branded .message-quote__label {
  color: #c2410c;
}

.messages-list-wrap--branded .message-quote__text {
  color: #4b5563;
}

.messages-list-wrap--branded .message-item--reply .message-item__text,
.messages-list-wrap--branded .message-item--reply .message-item__time {
  color: #1a2233;
}

.messages-list-wrap--branded .message-quote {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 6px 8px 6px 0;
}

.messages-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.message-item {
  position: relative;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.messages-list .message-item {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: fit-content;
  max-width: min(88%, 360px);
}

.messages-list .message-item--reply {
  max-width: min(88%, 360px);
}

.messages-list .message-item--picker-open {
  z-index: 2;
}

.message-thread {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.messages-list--chat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 4px;
}

.messages-list--chat > .message-item {
  width: fit-content;
  max-width: min(92%, 420px);
  align-self: flex-start;
  scroll-margin: 72px 12px 48px;
}

.messages-list--chat > .message-item--reply {
  max-width: min(92%, 420px);
  align-self: flex-start;
}

.message-quote {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 8px 6px 0;
  border: 0;
  border-radius: 8px;
  background: rgba(127, 127, 127, 0.08);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}

.message-quote:active {
  background: rgba(127, 127, 127, 0.16);
}

.message-quote__accent {
  flex-shrink: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.message-quote__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.message-quote__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2;
}

.message-quote__text {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.message-item--highlight {
  position: relative;
  z-index: 4;
}

.message-item--highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: message-highlight-flash 2.8s ease-out forwards;
  will-change: background, box-shadow;
}

@keyframes message-highlight-flash {
  0% {
    background: rgba(255, 204, 64, 0.78);
    box-shadow: inset 0 0 0 2px rgba(245, 166, 35, 0.62);
  }

  18% {
    background: rgba(255, 204, 64, 0.68);
    box-shadow: inset 0 0 0 2px rgba(245, 166, 35, 0.55);
  }

  45% {
    background: rgba(255, 204, 64, 0.46);
    box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.38);
  }

  100% {
    background: transparent;
    box-shadow: none;
  }
}

.message-item--enter {
  animation: message-enter 0.35s ease-out;
}

.message-item--reply {
  padding: 12px 14px;
  background: var(--surface-strong);
}

.message-item--fresh {
  border-color: rgba(245, 166, 35, 0.2);
}

@keyframes message-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.message-item__text {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.message-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.message-item__meta--root {
  align-items: flex-start;
}

.message-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.message-reply-btn {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s;
}

.message-reply-btn:active {
  opacity: 0.7;
}

.message-replies-toggle {
  display: inline-block;
  width: auto;
  max-width: 100%;
  padding: 6px 12px;
  margin-top: -2px;
  border: 0;
  border-radius: 100px;
  background: var(--surface-muted);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.message-replies-toggle:active {
  opacity: 0.85;
}

.message-replies {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
  max-width: 100%;
}

.message-replies--nested {
  margin-top: 8px;
}

.message-replies.hidden {
  display: none;
}

.message-reply-node {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.message-reply-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 2px;
}

.message-reply-form__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
  resize: vertical;
  min-height: 56px;
}

.message-reply-form__input:focus {
  outline: none;
  border-color: rgba(245, 166, 35, 0.45);
}

.message-reply-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.message-reply-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-reply-form__counter {
  flex-shrink: 0;
}

.message-reply-form__cancel,
.message-reply-form__send {
  padding: 8px 12px;
  border-radius: 8px;
  border: 0;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.message-reply-form__cancel {
  background: transparent;
  color: var(--text-muted);
}

.message-reply-form__send {
  background: var(--accent);
  color: #111;
}

.message-item__time {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.message-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, opacity 0.2s;
}

.message-like:active {
  opacity: 0.7;
}

.message-like--active {
  background: none;
  border: 0;
  color: var(--accent);
}

.message-like__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  line-height: 1;
}

.message-like__heart {
  display: block;
}

.message-like__heart path {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.message-like--active .message-like__heart path {
  fill: currentColor;
  stroke: currentColor;
}

.message-reactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  max-width: 100%;
}

.message-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.message-reaction-chip:active,
.message-reaction-picker__btn:active {
  opacity: 0.75;
}

.message-reaction-chip--active {
  border-color: rgba(245, 166, 35, 0.45);
  background: var(--accent-dim);
}

.message-reaction-chip__emoji {
  font-size: 0.9375rem;
  line-height: 1;
}

.message-reaction-chip__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.message-reaction-picker {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 5;
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  max-width: calc(100vw - 48px);
  overflow-x: auto;
  scrollbar-width: none;
}

.message-reaction-picker::-webkit-scrollbar {
  display: none;
}

.message-reaction-picker__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
}

.message-reaction-picker__btn:active {
  transform: scale(1.08);
}

.message-reaction-picker__btn--active {
  background: var(--accent-dim);
}

.station-card__rating-btn {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  max-width: 100%;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.station-card__rating-btn:active {
  opacity: 0.75;
}

.station-card__rating-stars {
  font-size: 0.9375rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1;
}

.station-card__rating-empty {
  color: var(--accent);
  font-size: 0.8125rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.messages-sheet__summary {
  display: none;
}

.messages-sheet__summary .rating-stars {
  color: var(--accent);
}

.rating-stars {
  display: inline-flex;
  gap: 1px;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.rating-stars--md {
  font-size: 0.875rem;
}

.rating-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.review-fuel-picker {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.review-fuel-picker__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.review-fuel-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-fuel-picker__empty {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.message-item__review-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.message-item__fuel {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.message-item__review-head .rating-stars {
  color: var(--accent);
}

.rating-picker__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.rating-picker__stars {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.rating-picker__star {
  width: 52px;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.1s;
}

.rating-picker__star:hover,
.rating-picker__star--active {
  color: var(--accent);
  border-color: rgba(245, 166, 35, 0.45);
}

.rating-picker__star--active {
  background: rgba(245, 166, 35, 0.1);
}

.messages-compose--chat {
  padding: 8px 12px max(6px, env(safe-area-inset-bottom, 0px));
  gap: 4px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

html.ios .sheet--messages:has(.messages-compose--chat) .messages-compose--chat {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 3px 12px env(safe-area-inset-bottom, 0px);
}

html.ios .messages-compose--chat .messages-reply-preview {
  width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}

html.ios .messages-compose--chat .messages-compose-bar {
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 3px 3px 3px 14px;
}

html.ios .messages-compose--chat .messages-compose-bar__input {
  height: 36px;
  min-height: 36px;
  padding: 0;
  line-height: 36px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

html.ios .messages-compose--chat .messages-compose-bar--grow .messages-compose-bar__input {
  height: auto;
  line-height: 1.375;
  padding: 2px 0;
}

.messages-sheet--branded .messages-compose--chat {
  background: color-mix(in srgb, var(--chat-bg-deep) 68%, transparent);
  border-top-color: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
}

.messages-sheet--branded .messages-compose-bar {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.messages-sheet--branded .messages-compose-bar:focus-within {
  border-color: rgba(255, 255, 255, 0.38);
}

.messages-sheet--branded .messages-reply-preview {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.28);
}

.messages-sheet--branded .messages-compose--replying .messages-reply-preview {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.messages-sheet--branded .messages-compose--replying .messages-compose-bar {
  border-top: none;
}

.messages-sheet--branded .messages-reply-preview__label {
  color: #c2410c;
}

.messages-sheet--branded .messages-reply-preview__text {
  color: #4b5563;
}

.messages-sheet--branded .messages-reply-preview__close {
  color: #6b7280;
}

.messages-sheet--branded .messages-compose-bar__send:not(:disabled) {
  background: var(--chat-bg-mid);
  color: #fff;
}

.messages-sheet--brand-rosneft .messages-compose-bar__send:not(:disabled) {
  background: var(--chat-bg-deep);
  color: #fff;
}

.messages-sheet--branded .sheet__header {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--chat-bg-mid) 66%, transparent) 0%,
    color-mix(in srgb, var(--chat-bg-deep) 72%, transparent) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
}

.messages-sheet--branded .sheet__title {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.messages-sheet--branded .sheet__address {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.messages-sheet--branded .sheet__header .btn-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.messages-sheet--branded .sheet__header .btn-icon:active {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.messages-sheet--brand-rosneft .sheet__header {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, #d97706 68%, transparent) 0%,
    color-mix(in srgb, var(--chat-bg-deep) 74%, transparent) 100%
  );
}

.messages-compose-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px 4px 4px 16px;
  border-radius: 24px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.messages-compose-bar--grow {
  align-items: flex-end;
}

.messages-compose-bar:focus-within {
  border-color: rgba(245, 166, 35, 0.35);
}

.messages-compose-bar__input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 120px;
  height: 40px;
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.375;
  resize: none;
  overflow-y: auto;
  outline: none;
  box-sizing: border-box;
  scrollbar-width: none;
}

.messages-compose--chat .messages-compose-bar__input {
  color: #1a2233;
  caret-color: #1a2233;
}

.messages-compose--chat .messages-compose-bar__input::placeholder {
  color: #8b95a8;
}

.messages-compose-bar__input::-webkit-scrollbar {
  display: none;
}

.messages-compose-bar__input::placeholder {
  color: var(--text-muted);
}

.messages-compose-bar__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s, transform 0.15s, background 0.2s;
}

.messages-compose-bar__send svg {
  margin-left: 2px;
}

.messages-compose-bar__send:not(:disabled):active {
  transform: scale(0.94);
}

.messages-compose-bar__send:disabled {
  background: rgba(107, 114, 128, 0.28);
  color: rgba(255, 255, 255, 0.75);
  opacity: 1;
  cursor: default;
}

.messages-compose-bar__attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: -8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, background 0.15s, transform 0.15s;
}

.messages-compose-bar__attach:active {
  transform: scale(0.94);
  background: rgba(0, 0, 0, 0.06);
}

.messages-compose--chat .messages-compose-bar__attach {
  color: #5b6578;
}

.messages-media-preview {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.messages-media-preview.hidden {
  display: none;
}

.messages-media-preview__thumb {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #1a2233;
}

.messages-media-preview__chip {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.messages-media-preview__chip img,
.messages-media-preview__chip video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.messages-media-preview__chip-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.messages-media-preview__meta {
  flex: 1;
  min-width: 72px;
  font-size: 0.8rem;
  color: #5b6578;
}

.messages-media-preview__thumb img,
.messages-media-preview__thumb video {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.messages-media-preview__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5b6578;
  flex-shrink: 0;
  cursor: pointer;
}

.media-grid {
  display: grid;
  gap: 2px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
}

.media-grid__item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  margin: 0;
  background: #0b1220;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.media-grid__item img.media-grid__media,
.media-grid__item video.media-grid__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.media-grid__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.media-grid__play::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 13px;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent #fff;
}

.media-grid--1 {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 180px;
  aspect-ratio: 16 / 9;
  background: #0b1220;
}

.media-grid--1.media-grid--1-natural,
.media-grid--1.media-grid--1-tall {
  min-height: 0;
  aspect-ratio: auto;
}

.media-grid--1 .media-grid__item {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: inherit;
  background: transparent;
}

.media-grid--1 .media-grid__blur {
  display: none;
}

.media-grid--1 .media-grid__media {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  background: #0b1220;
}

.media-grid--1-natural {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  background: transparent;
}

.media-grid--1-natural .media-grid__item {
  height: auto;
  min-height: 0;
}

.media-grid--1-natural .media-grid__media {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.media-grid--1-tall {
  width: 100%;
  height: min(70vw, 420px);
  aspect-ratio: auto;
  background: #0b1220;
}

.media-grid--1-tall .media-grid__item {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1220;
}

.media-grid--1-tall .media-grid__blur {
  display: block;
  position: absolute;
  inset: -12%;
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(28px) saturate(1.05);
  transform: scale(1.08);
  pointer-events: none;
}

.media-grid--1-tall .media-grid__blur--solid {
  background: #1a2233;
  filter: none;
  transform: none;
  inset: 0;
}

.media-grid--1-tall .media-grid__media {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.media-grid--2 {
  grid-template-columns: 1fr 1fr;
  height: min(48vw, 300px);
}

.media-grid--3 {
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: min(58vw, 360px);
}

.media-grid--3 .media-grid__item:first-child {
  grid-row: 1 / span 2;
}

.media-grid--4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: min(72vw, 380px);
}

.media-grid--5 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 1fr 1fr;
  height: min(62vw, 380px);
}

.media-grid--5 .media-grid__item:nth-child(1),
.media-grid--5 .media-grid__item:nth-child(2) {
  grid-column: span 3;
}

.media-grid--5 .media-grid__item:nth-child(3),
.media-grid--5 .media-grid__item:nth-child(4),
.media-grid--5 .media-grid__item:nth-child(5) {
  grid-column: span 2;
}

.message-item__media-grid {
  margin: 0 -14px 8px;
  width: calc(100% + 28px);
  max-width: none;
  border-radius: 0;
  overflow: hidden;
}

.message-item > .message-item__media-grid:first-child,
.message-item > .message-reaction-picker + .message-item__media-grid {
  margin-top: -12px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.messages-list-wrap--branded .message-item > .message-item__media-grid:first-child,
.messages-list-wrap--branded .message-item > .message-reaction-picker + .message-item__media-grid {
  border-radius: 16px 16px 0 0;
}

.message-item__media-grid.media-grid--1:not(.media-grid--1-tall) {
  width: calc(100% + 28px);
  max-width: none;
  height: auto;
  background: #0b1220;
}

.message-item__media-grid.media-grid--1-natural:not(.media-grid--1-tall) {
  background: transparent;
}

.message-item__media-grid.media-grid--1:not(.media-grid--1-tall) .media-grid__item {
  width: 100%;
  height: auto;
  min-height: inherit;
  background: transparent;
}

.message-item__media-grid.media-grid--1-natural:not(.media-grid--1-tall) .media-grid__media {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
}

.message-item__media-grid.media-grid--1-tall {
  width: calc(100% + 28px);
  max-width: none;
}

.messages-list--chat > .message-item:has(.message-item__media-grid) {
  min-width: min(72%, 280px);
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: #000;
  color: #fff;
  touch-action: none;
  overflow: hidden;
}

.media-viewer.hidden,
.media-viewer[hidden] {
  display: none !important;
}

.media-viewer__stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.media-viewer__track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  height: 100%;
  width: 100%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.media-viewer__track.is-dragging {
  transition: none;
}

.media-viewer__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.media-viewer__slide img,
.media-viewer__slide video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #000;
  border-radius: 0;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  touch-action: none;
}

.media-viewer__slide video {
  pointer-events: auto;
}

.media-viewer__close {
  position: absolute;
  z-index: 3;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.media-viewer__counter {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 12px;
  border-radius: 999px;
  pointer-events: none;
}

.media-viewer__counter:empty,
.media-viewer--single .media-viewer__counter {
  display: none;
}

.message-reaction-picker--anchored {
  position: fixed !important;
  left: var(--rp-x, 50%);
  top: var(--rp-y, 50%);
  bottom: auto !important;
  transform: translate(-50%, -50%);
  z-index: 90;
  max-width: calc(100vw - 24px);
}

.message-item__media {
  display: block;
  margin: 0 0 8px;
  max-width: min(100%, 280px);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
}

.message-item__media img,
.message-item__media video {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  vertical-align: middle;
}

.message-item__text:empty {
  display: none;
}

.news-feed {
  flex: 1;
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
  padding: calc(var(--messages-chat-header-pad, 64px) + 8px) 12px calc(var(--messages-chat-compose-pad, 72px) + 8px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.news-post {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 12px 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: #1a2233;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.news-post .message-reactions {
  margin-top: 0;
}

.news-post .message-reaction-chip {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(245, 247, 250, 0.95);
  color: #1a2233;
}

.news-post .message-reaction-chip--active {
  border-color: rgba(245, 166, 35, 0.45);
  background: rgba(255, 247, 237, 0.95);
}

.news-post .message-reaction-picker--anchored {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.news-post .station-card__comments {
  width: calc(100% + 24px);
  margin: 2px -12px 0;
  padding: 12px 12px;
  border-radius: 0 0 16px 16px;
}

.messages-sheet--branded .messages-compose-bar__send:disabled {
  background: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.28);
}

.messages-compose__counter--chat {
  display: none;
  padding: 0 12px;
  font-size: 0.6875rem;
  text-align: right;
}

.messages-compose__counter--chat.messages-compose__counter--warn,
.messages-compose__counter--chat.messages-compose__counter--limit {
  display: block;
}

.messages-compose {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
}

.messages-compose--chat {
  gap: 0;
}

.messages-compose--replying .messages-reply-preview {
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.messages-compose--replying .messages-compose-bar {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
}

.messages-reply-preview {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  background: var(--surface-strong);
}

.messages-reply-preview.hidden {
  display: none;
}

.messages-reply-preview__accent {
  flex-shrink: 0;
  width: 3px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--accent);
}

.messages-reply-preview__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.messages-reply-preview__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.messages-reply-preview__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.messages-reply-preview__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -4px -4px -4px 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.messages-reply-preview__close:active {
  opacity: 0.7;
}

.messages-compose--reviews {
  position: relative;
  z-index: 2;
  padding: 12px 14px max(12px, env(safe-area-inset-bottom, 0px));
  gap: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.review-compose-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.review-compose-toggle__label {
  pointer-events: none;
}

.review-compose-toggle::before {
  display: none;
}

.review-compose-toggle:active {
  opacity: 0.85;
}

.review-compose-toggle.hidden {
  display: none;
}

.review-compose-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 4px;
}

.review-compose-panel.hidden,
.review-compose-panel[hidden] {
  display: none !important;
  pointer-events: none !important;
}
/* Review compose – star scale on active */
.rating-picker__star:active {
  transform: scale(0.9);
}
/* Reviews sheet – header in brand tone (same as comments) */
.messages-sheet--brand-reviews.messages-sheet--branded .sheet__header {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, #6b3a14 66%, transparent) 0%,
    color-mix(in srgb, #0a0602 72%, transparent) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
}

/* Reviews compose (bottom) – transparent dark like branded compose */
.messages-sheet--brand-reviews .messages-compose--reviews {
  background: color-mix(in srgb, #0a0602 72%, transparent);
  border-top-color: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
}

/* Reviews compose toggle button on dark background */
.messages-sheet--brand-reviews .review-compose-toggle {
  background: rgba(245, 166, 35, 0.18);
  border-color: rgba(245, 166, 35, 0.38);
  color: #f5c76b;
}

/* Reviews compose panel inputs on dark bg */
.messages-sheet--brand-reviews .messages-compose__input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f0f2f5;
}
.messages-sheet--brand-reviews .messages-compose__input:focus {
  border-color: rgba(245, 166, 35, 0.5);
}
.messages-sheet--brand-reviews .messages-compose__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}
.messages-sheet--brand-reviews .rating-picker__star {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.45);
}
.messages-sheet--brand-reviews .rating-picker__star:hover,
.messages-sheet--brand-reviews .rating-picker__star--active {
  background: rgba(245, 166, 35, 0.18);
  border-color: rgba(245, 166, 35, 0.5);
  color: #f5a623;
}
.messages-sheet--brand-reviews .review-compose-collapse {
  color: rgba(255, 255, 255, 0.5);
}
.messages-sheet--brand-reviews .messages-compose__counter {
  color: rgba(255, 255, 255, 0.38);
}
.messages-sheet--brand-reviews .rating-picker__label,
.messages-sheet--brand-reviews .review-fuel-picker__label {
  color: rgba(255, 255, 255, 0.5);
}

/* Review compose – footer */
.messages-compose--reviews .messages-compose__footer {
  align-items: center;
}

/* Review compose send button */
.messages-compose--reviews .messages-compose__btn {
  padding: 10px 22px;
  font-size: 0.875rem;
}

/* Review compose counter */
.messages-compose--reviews .messages-compose__counter {
  margin-right: auto;
  order: -1;
}

/* Review list – same indent/width as comment cards */
#reviewsList .message-thread {
  width: 100%;
}
#reviewsList .message-item {
  width: 100%;
  max-width: 100%;
  cursor: default;
}
#reviewsList .message-item--picker-open {
  cursor: pointer;
}

.review-compose-collapse {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.review-compose-collapse:active {
  opacity: 0.8;
}

.messages-compose__input {
  width: 100%;
  min-height: 44px;
  max-height: 100px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  resize: none;
  outline: none;
}

.messages-compose__input:focus {
  border-color: rgba(245, 166, 35, 0.35);
}

.messages-compose__input::placeholder {
  color: var(--text-muted);
}

.messages-compose__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.messages-compose__counter {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.messages-compose__counter--warn {
  color: var(--accent);
}

.messages-compose__counter--limit {
  color: var(--red);
}

.messages-compose__btn {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.messages-compose__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sheet--feedback {
  max-height: 85dvh;
}

.sheet--station-feedback {
  max-height: 88dvh;
}

.station-feedback__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.station-feedback__body {
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.station-feedback__body p {
  margin: 0;
}

.station-feedback__body strong {
  color: var(--text);
  font-weight: 600;
}

.station-feedback__hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.feedback-compose--station {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex: none;
  min-height: auto;
}

.feedback-compose--station .feedback-compose__input {
  min-height: 96px;
  max-height: 160px;
}

.feedback-compose {
  flex: 1;
  min-height: 0;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-compose__input {
  width: 100%;
  min-height: 120px;
  max-height: 220px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.45;
  resize: vertical;
  outline: none;
}

.feedback-compose__input:focus {
  border-color: rgba(245, 166, 35, 0.35);
}

.feedback-compose__input::placeholder {
  color: var(--text-muted);
}

.feedback-compose__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-compose__counter {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.feedback-compose__counter--warn {
  color: var(--accent);
}

.feedback-compose__counter--limit {
  color: var(--red);
}

.feedback-compose__btn {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.feedback-compose__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  flex-shrink: 0;
}

.sheet__head-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.sheet__brand {
  flex-shrink: 0;
}

.sheet__brand .brand-logo,
.sheet__brand .brand-logo--fallback {
  width: 36px;
  height: 36px;
  min-width: 36px;
  max-width: 36px;
  align-self: auto;
  aspect-ratio: auto;
}

.sheet__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.sheet__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
}

.sheet__address {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.25;
}

.sheet__status {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 2px;
}

.sheet__status--yes {
  color: var(--green);
}

.sheet__status--no {
  color: var(--red);
}

.sheet__status--unknown {
  color: var(--text-muted);
}

.sheet__status--stale {
  color: var(--yellow);
}

.sheet--fuel-single .sheet__title .fuel-label--stacked {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
}

.sheet--fuel-single .sheet__title .fuel-label__main {
  font-size: 1.0625rem;
  font-weight: 600;
}

.sheet--fuel-single .sheet__title .fuel-label__sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.sheet--fuel-single .sheet__body {
  padding-top: 8px;
}

.sheet__body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.report-row:last-child {
  margin-bottom: 0;
}

.report-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.report-section__title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.report-section__title--fuels {
  margin-bottom: 12px;
}

.fuel-report-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fuel-report-list--single {
  gap: 0;
}

.fuel-report-card--compact {
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.fuel-report-card--compact .fuel-report-card__body {
  padding: 0;
  background: transparent;
  gap: 12px;
}

.fuel-report-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}

.fuel-report-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.fuel-report-card__current {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  text-align: right;
}

.fuel-report-card__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-strong);
}

.fuel-report-card--yes {
  border-color: rgba(34, 197, 94, 0.28);
}

.fuel-report-card--yes .fuel-report-card__head {
  background: var(--green-dim);
}

.fuel-report-card--yes .fuel-report-card__title {
  color: var(--status-yes-title);
}

.fuel-report-card--no {
  border-color: rgba(239, 68, 68, 0.28);
}

.fuel-report-card--no .fuel-report-card__head {
  background: var(--red-dim);
}

.fuel-report-card--no .fuel-report-card__title {
  color: var(--status-no-title);
}

.fuel-report-card--unknown .fuel-report-card__head {
  background: rgba(245, 166, 35, 0.1);
}

.fuel-report-card--unknown .fuel-report-card__title {
  color: var(--accent);
}

.fuel-report-card--stale {
  border-color: rgba(234, 179, 8, 0.28);
}

.fuel-report-card--stale .fuel-report-card__head {
  background: var(--yellow-dim);
}

.fuel-report-card--stale .fuel-report-card__title {
  color: var(--status-stale-title);
}

.fuel-report-card .limit-picker,
.fuel-report-card .price-picker {
  margin-top: 0;
  padding: 10px;
  border-top: none;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.report-row {
  margin-bottom: 16px;
}

.report-row:last-child {
  margin-bottom: 0;
}

.report-row__label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-row__current {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.limit-picker {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.limit-picker.hidden {
  display: none;
}

.limit-picker__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.limit-picker__optional {
  color: var(--text-muted);
  font-weight: 400;
}

.limit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.limit-chip {
  padding: 8px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.limit-chip:active {
  transform: scale(0.97);
}

.limit-chip--active {
  background: var(--accent-dim);
  border-color: rgba(245, 166, 35, 0.45);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.15);
}

.limit-custom {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.limit-custom.hidden {
  display: none;
}

.limit-custom__input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
}

.limit-custom__input:focus {
  outline: none;
  border-color: rgba(245, 166, 35, 0.4);
}

.limit-custom__btn {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.price-picker {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.price-picker__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.price-picker__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.price-picker__optional {
  color: var(--text-muted);
  font-weight: 400;
}

.price-picker__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.price-picker__field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}

.price-picker__input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
}

.price-picker__input:focus {
  outline: none;
  border-color: rgba(245, 166, 35, 0.45);
}

.price-picker__btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.report-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.report-btn {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}

.report-btn:active {
  transform: scale(0.97);
}

.report-btn--yes:hover,
.report-btn--yes:focus-visible {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--green);
}

.report-btn--no:hover,
.report-btn--no:focus-visible {
  background: var(--red-dim);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red);
}

.report-btn--closed:hover,
.report-btn--closed:focus-visible {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.3);
  color: #c4b5fd;
}

.report-btn--active.report-btn--yes {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.55);
  color: var(--green);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.report-btn--active.report-btn--no {
  background: var(--red-dim);
  border-color: rgba(239, 68, 68, 0.55);
  color: var(--red);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.report-btn--active.report-btn--closed {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.55);
  color: #c4b5fd;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.2);
}

.report-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--toast-bg);
  border: var(--toast-border);
  box-shadow: var(--shadow);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  max-width: calc(100% - 32px);
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--error {
  color: var(--toast-error-color);
  background: var(--toast-error-bg);
  border: 1px solid rgba(239, 68, 68, 0.55);
  padding: 12px 18px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(239, 68, 68, 0.2);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.toast--success {
  color: var(--toast-success-color);
  background: var(--toast-success-bg);
  border-color: rgba(34, 197, 94, 0.28);
}

.toast--info {
  color: var(--toast-info-color);
  max-width: min(360px, calc(100% - 32px));
  line-height: 1.45;
  text-align: left;
}

/* Ad banners between station cards */
.ad-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.ad-banner__link {
  display: block;
  line-height: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.ad-banner__img {
  display: block;
  width: 100%;
  height: auto;
}

.ad-banner__badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  border: 0;
  border-radius: 6px;
  padding: 4px 8px;
  background: rgba(12, 15, 20, 0.82);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ad-banner__badge:active {
  background: rgba(12, 15, 20, 0.95);
}

.poll-banner {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.poll-banner__question {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
}

.poll-banner__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-banner__option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.poll-banner__option:active {
  background: var(--bg-card-hover);
}

.poll-banner__option--voted {
  border-color: rgba(245, 166, 35, 0.45);
  background: var(--accent-dim);
}

.poll-banner__option-text {
  line-height: 1.25;
}

.poll-banner__bar {
  display: block;
  height: 6px;
  border-radius: 100px;
  background: var(--surface-muted);
  overflow: hidden;
}

.poll-banner__bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.poll-banner__meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.poll-banner__total {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

#adInfoBody {
  white-space: pre-wrap;
  word-break: break-word;
}

/* ——— Legal / privacy ——— */
.legal-page {
  min-height: 100dvh;
  background: var(--bg);
}

.legal-page__app {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.legal-page__header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  margin: 0 -16px 16px;
  padding: 12px 16px;
}

.legal-page__header .legal-page__back.btn-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  text-decoration: none;
}

.legal-page__header .header__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 32px;
  margin-top: 0;
  font-size: 28px;
  line-height: 1;
}

.legal-page__header .header__main {
  flex: 1;
  min-width: 0;
}

.legal-page__title {
  font-size: 1.125rem;
}

.legal-page__main {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.legal-page__content {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
}

.legal-page__content section {
  margin-bottom: 1.75rem;
}

.legal-page__content h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.legal-page__content p {
  margin: 0 0 0.75rem;
}

.legal-page__content ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.legal-page__content li {
  margin-bottom: 0.35rem;
}

.legal-page__content code {
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface-2);
}

.legal-page__content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page__meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.legal-page__back {
  margin-top: 2rem;
  font-size: 0.9375rem;
}

.legal-page__back a {
  color: var(--accent);
  text-decoration: none;
}

.contact-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 12px;
}

.contact-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  border-color: var(--accent);
  background: var(--surface-2);
  outline: none;
}

.contact-card__icon {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card__icon img {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  border-radius: 12px;
}

.contact-card--max .contact-card__icon img {
  object-fit: cover;
}

.contact-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-card__name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

.contact-card__action {
  grid-column: 2;
  margin-top: 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

.contact-list--sheet {
  margin: 0;
  padding: 4px 16px calc(16px + env(safe-area-inset-bottom, 0));
}

.sheet--feedback .contact-list--sheet {
  margin-bottom: 0;
}

/* Reviews list wrap scrolling */
#reviewsListWrap {
  flex: 1;
  min-height: 0;
}
/* Меню: правовые ссылки и счётчики. Раньше стояли в подвале страницы —
   теперь внизу меню, за чертой, чтобы не спорить с основными пунктами. */
.header-menu__divider {
  height: 1px;
  margin: 6px 10px;
  background: var(--border);
}

.header-menu__item--link {
  color: var(--text-secondary);
  text-decoration: none;
}

.header-menu__stats {
  padding: 2px 12px 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.header-menu__stats p {
  margin: 0;
}

.header-menu__stats-meta {
  margin-top: 4px !important;
  color: var(--text-secondary);
}

/* Отступ снизу страницы: эту роль раньше играл подвал. */
.page-bottom {
  height: max(24px, var(--safe-bottom));
}
