: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);
  --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;
}

*, *::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);
}

/* iPhone / iPad: крупнее шрифты, emoji; SVG — только размер, не толщина линий */
html.ios {
  --ios-zoom: 1.32;
  zoom: var(--ios-zoom);
  /* safe-area не должен раздуваться вместе с zoom */
  --safe-bottom: calc(env(safe-area-inset-bottom, 0px) / var(--ios-zoom));
}

html.ios svg {
  stroke-width: calc(2 / var(--ios-zoom));
}

html.ios svg.coffee-bar__cup,
html.ios svg[stroke-width="1.75"] {
  stroke-width: calc(1.75 / var(--ios-zoom));
}

html.ios .message-like__heart path {
  stroke-width: calc(2 / var(--ios-zoom));
}

/* Шторки: компактный зазор снизу на iPhone/iPad */
html.ios .sheet {
  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__notify-btn {
  position: relative;
}

.header__notify-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #0c0f14;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.header__notify-badge.hidden {
  display: none;
}

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

.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: 2px;
  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: 18px;
  height: 18px;
}

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

.header__actions .btn-icon.spinning svg {
  animation: spin 0.8s linear infinite;
}

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

.header-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  min-width: 210px;
  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);
}

.btn-icon.spinning svg {
  animation: spin 0.8s linear infinite;
}

#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 {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 10px;
}

.filters::-webkit-scrollbar {
  display: none;
}

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

.install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  border: 1px solid rgba(245, 166, 35, 0.28);
}

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

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

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

.install-banner__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.install-banner__btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--accent);
  color: #111;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

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

.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-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.station-card:active {
  transform: scale(0.985);
  background: var(--bg-card-hover);
}

.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__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.station-card__info {
  display: flex;
  align-items: stretch;
  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;
}

.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 {
  align-self: stretch;
  width: auto;
  height: auto;
  min-width: 36px;
  max-width: 56px;
  aspect-ratio: 1;
}

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

.station-card__info .brand-logo--fallback {
  align-self: stretch;
  width: auto;
  min-width: 36px;
  max-width: 56px;
  aspect-ratio: 1;
}

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

.station-card__chevron {
  color: var(--text-muted);
  flex-shrink: 0;
}

.station-card__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.station-card__msg-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, color 0.2s;
}

.station-card__msg-btn:active {
  background: var(--surface-strong);
}

.station-card__msg-btn svg {
  display: block;
}

.station-card__msg-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--accent);
  color: #0c0f14;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

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

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

.queue-bar--extend-due {
  padding: 10px;
  margin-top: 12px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(249, 115, 22, 0.06);
}

.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__timer {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.queue-bar__extend-hint {
  flex-basis: 100%;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #ea580c;
  line-height: 1.2;
}

.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--active {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.35);
  color: #ea580c;
  cursor: default;
}

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

.queue-bar__btn--extend {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.35);
  color: #ea580c;
}

.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;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

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

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

.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"] .header__notify-badge,
[data-theme="light"] .station-card__msg-count {
  background: #ff5454;
  color: #ffffff;
}

[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 {
  background: var(--yellow-dim);
  border-color: rgba(234, 179, 8, 0.2);
}
.fuel-badge--stale .fuel-badge__status { color: var(--yellow); }

/* 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;
}

.footer__views,
.footer__contributors {
  margin: 0;
  color: var(--text-muted);
  font-weight: 400;
}

.footer__views + .footer__views {
  margin-top: 2px;
}

.footer__meta {
  margin-top: 4px;
  color: var(--text-secondary);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.footer__legal a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__legal a:hover {
  color: var(--accent);
}

.footer__legal-sep {
  color: var(--text-muted);
  opacity: 0.5;
  user-select: none;
}

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

.sheet--notify {
  max-height: 75dvh;
}

.notify-list {
  padding: 4px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.notify-list__empty {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

.notify-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.notify-item__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.notify-item__time {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notify-item--read {
  opacity: 0.72;
}

.notify-item--read .notify-item__text {
  color: var(--text-secondary);
}

/* 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;
}

.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--messages {
  max-height: 88dvh;
}

.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

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

.messages-empty--inline {
  padding: 16px 8px 8px;
}

.messages-notes {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.messages-notes__summary {
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  padding: 8px 0;
}

.messages-notes__summary::-webkit-details-marker {
  display: none;
}

.messages-notes__summary::before {
  content: '▸ ';
}

.messages-notes[open] .messages-notes__summary::before {
  content: '▾ ';
}

.messages-notes__hint {
  margin: 0 0 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.messages-notes__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.message-thread:last-child {
  margin-bottom: 0;
}

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

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

.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;
  gap: 10px;
  margin-top: 10px;
}

.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: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}

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

.message-replies-toggle {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-top: -2px;
  border: 0;
  border-radius: var(--radius-sm);
  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;
  gap: 8px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

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

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

.message-reply-node {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.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: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}

.message-like:active {
  transform: scale(0.97);
}

.message-like--active {
  background: var(--accent-dim);
  border-color: rgba(245, 166, 35, 0.35);
  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;
}

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

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

.station-card__rating-stars {
  color: var(--accent);
  letter-spacing: 0.02em;
}

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

.messages-sheet__summary {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

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

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

.rating-stars--sm {
  font-size: 0.75rem;
}

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

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

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

.review-fuel-picker__label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.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.8125rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.rating-picker__stars {
  display: flex;
  gap: 4px;
}

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

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

.message-item__rating {
  margin-bottom: 6px;
}

.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--reply-mode {
  display: none;
}

.messages-compose--reviews {
  position: relative;
  z-index: 2;
  padding: 0;
  gap: 0;
}

.review-compose-toggle {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: var(--surface);
  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;
}

.review-compose-toggle__label {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.review-compose-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

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

.review-compose-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
}

.review-compose-panel.hidden,
.review-compose-panel[hidden] {
  display: none !important;
  pointer-events: none !important;
}

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

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

.messages-compose--reviews .messages-compose__footer {
  flex-wrap: wrap;
  gap: 8px 12px;
}

.messages-compose--reviews .messages-compose__counter {
  margin-right: auto;
}

.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__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-card {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.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-section__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.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__info {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--text-muted);
}

.price-picker__info:active {
  color: var(--accent);
}

.price-picker__info svg {
  display: block;
}

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

.price-picker__current {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.price-picker__current strong {
  color: var(--accent);
  font-weight: 600;
}

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

.price-picker__input {
  flex: 1;
  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-buttons--single {
  grid-template-columns: 1fr;
}

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

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