:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-strong: #eef2f7;
  --text: #111827;
  --muted: #64748b;
  --line: #d9e1ec;
  --accent: #18a058;
  --accent-strong: #0f7a43;
  --danger: #d92d20;
  --warning: #d97706;
  --nav: #0f172a;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

body.dark {
  color-scheme: dark;
  --bg: #101114;
  --surface: #181b20;
  --surface-strong: #232832;
  --text: #f5f7fb;
  --muted: #a7b1c2;
  --line: #343b48;
  --accent: #3ddc84;
  --accent-strong: #74eba7;
  --danger: #ff6b5f;
  --warning: #f7b955;
  --nav: #05070a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(24, 160, 88, 0.14), transparent 250px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

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

.app-shell {
  min-height: 100vh;
  padding: 18px 16px 96px;
}

.legal-page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.legal-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.legal-hero h1 {
  font-size: clamp(2rem, 8vw, 4rem);
}

.legal-hero p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.55;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.legal-card {
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-card h2 {
  margin-bottom: 10px;
}

.legal-card p,
.legal-list {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.legal-card a,
.legal-footer a {
  color: var(--accent-strong);
  font-weight: 800;
}

.legal-list {
  padding-left: 20px;
}

.legal-list li + li {
  margin-top: 7px;
}

.legal-list.danger li::marker {
  color: var(--danger);
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-footer.standalone {
  justify-content: flex-start;
  max-width: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto 16px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 6vw, 2.35rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.icon-button svg,
.search-box svg,
.nav-item svg,
.mini-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

main {
  max-width: 1120px;
  margin: 0 auto;
}

.toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.advanced-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.range-control,
.price-control,
.toggle-control,
.alert-form label,
.route-controls label,
.wish-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.range-control span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.range-control input {
  width: 100%;
  accent-color: var(--accent);
}

.price-control input,
.alert-form input,
.alert-form select,
.route-controls input,
.route-controls select,
.wish-form input {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0 10px;
  outline: 0;
}

.toggle-control {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
  min-height: 40px;
}

.toggle-control input {
  width: 19px;
  height: 19px;
  accent-color: var(--accent);
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.chip.is-active {
  border-color: transparent;
  background: var(--nav);
  color: #fff;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.segment {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
}

.segment.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.count-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-band {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.status-band strong {
  font-size: 0.9rem;
}

.status-band span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-pill {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 800;
}

.source-pill.is-ok {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  color: var(--accent-strong);
}

.source-pill.is-blocked,
.source-pill.is-error {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
  color: var(--danger);
}

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

.stat-card {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stat-card strong {
  font-size: 1.22rem;
  line-height: 1;
}

.prospect-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.prospect-strip::-webkit-scrollbar {
  display: none;
}

.prospect-card {
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.retailer-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
}

.prospect-card strong {
  display: block;
  margin-bottom: 6px;
}

.prospect-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.deal-grid {
  display: grid;
  gap: 12px;
}

.deal-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 168px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.deal-image {
  position: relative;
  min-height: 168px;
  padding: 0;
  border: 0;
  background: var(--surface-strong);
  color: inherit;
  cursor: pointer;
}

.deal-image img {
  width: 100%;
  height: 100%;
  min-height: 168px;
  object-fit: contain;
  display: block;
  padding: 10px;
  background: #fff;
}

.deal-image img.is-fallback,
.modal-image.is-fallback {
  object-fit: contain;
  padding: 18px;
}

.discount {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--danger);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.deal-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.deal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.badge {
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.badge.retailer {
  color: #fff;
}

.badge.live {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-strong));
  color: var(--accent-strong);
}

.deal-title {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.price {
  font-size: 1.35rem;
  font-weight: 950;
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
}

.valid {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.mini-action.primary {
  border-color: transparent;
  background: var(--accent);
  color: #062511;
  font-weight: 900;
}

.mini-action.is-on {
  border-color: transparent;
  background: var(--danger);
  color: #fff;
}

.primary-button,
.ghost-button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: #062511;
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.ghost-button.full {
  width: 100%;
  margin-bottom: 10px;
}

.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.store-list,
.shopping-list,
.alert-list,
.wish-list,
.route-assignments {
  display: grid;
  gap: 10px;
}

.store-card,
.list-row,
.alert-row,
.wish-row,
.route-row,
.route-panel {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.store-top,
.list-top,
.row-actions,
.wish-row,
.route-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.store-card h3,
.list-row h3,
.list-group h3,
.route-panel h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.store-card p,
.list-row p,
.alert-row p,
.wish-row p,
.route-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.alert-form,
.wish-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.alert-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.route-panel {
  margin-bottom: 12px;
}

.compact-head {
  margin-bottom: 8px;
}

.route-controls {
  display: grid;
  gap: 10px;
}

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

.route-summary div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.route-summary span,
.route-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.route-summary strong,
.route-row strong,
.wish-row strong {
  color: var(--text);
}

.route-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.route-stop {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.route-stop.is-home {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-strong));
  color: var(--accent-strong);
}

.route-row,
.wish-row {
  align-items: center;
  box-shadow: none;
}

.route-warning {
  margin: 8px 0 0;
  color: var(--warning);
  font-size: 0.84rem;
  font-weight: 800;
}

.empty-state.slim {
  margin-top: 8px;
  padding: 12px;
}

.subhead {
  margin: 18px 0 10px;
  font-size: 0.96rem;
}

.list-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.list-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.list-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.list-row.compact {
  box-shadow: none;
}

.list-group {
  display: grid;
  gap: 8px;
  padding: 8px 0;
}

.distance {
  color: var(--accent-strong);
  font-weight: 900;
  white-space: nowrap;
}

.empty-state {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  max-width: 620px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--nav);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
}

.nav-item {
  display: grid;
  min-height: 54px;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b7c1d1;
  cursor: pointer;
}

.nav-item span {
  font-size: 0.68rem;
  font-weight: 800;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 86px;
  left: 16px;
  z-index: 30;
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--nav);
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: end;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 7, 10, 0.52);
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.modal-image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  padding: 14px;
  background: #fff;
}

.modal-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

.history-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 7px;
  height: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.history-bar {
  position: relative;
  min-height: 34px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.history-bar span {
  position: absolute;
  right: 50%;
  bottom: 100%;
  transform: translateX(50%);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.related-list {
  display: grid;
  gap: 8px;
}

.related-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

@media (min-width: 700px) {
  .app-shell {
    padding: 26px 24px 110px;
  }

  .toolbar {
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: start;
  }

  .filter-row,
  .segmented,
  .advanced-panel {
    grid-column: 1 / -1;
  }

  .advanced-panel {
    grid-template-columns: minmax(220px, 1fr) 150px 118px 132px auto;
    align-items: end;
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .alert-form {
    grid-template-columns: minmax(220px, 1fr) 130px 160px auto;
    align-items: end;
  }

  .route-controls {
    grid-template-columns: minmax(180px, 1fr) 150px 120px auto;
    align-items: end;
  }

  .wish-form {
    grid-template-columns: minmax(220px, 1fr) 110px auto;
    align-items: end;
  }

  .route-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .deal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal {
    align-items: center;
  }
}

@media (min-width: 1040px) {
  .deal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .deal-image,
  .deal-image img {
    min-height: 190px;
  }
}

/* dealsradar.de skin from design prototype */
:root {
  --bg: #fafbf7;
  --surface: #ffffff;
  --surface-strong: #f2f6f3;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --line-soft: #eff1ee;
  --accent: #14b8a6;
  --accent-strong: #0f766e;
  --accent-wash: #e8f7f4;
  --danger: #e11d48;
  --coral: #fb7185;
  --coral-wash: #ffeef1;
  --nav: #0f172a;
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.12);
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

body.dark {
  --bg: #111816;
  --surface: #17211f;
  --surface-strong: #21302d;
  --text: #f5f7fb;
  --muted: #a7b1c2;
  --line: #2d3a37;
  --line-soft: #25322f;
  --accent: #5eead4;
  --accent-strong: #99f6e4;
  --accent-wash: #123a35;
  --danger: #fb7185;
  --coral: #fb7185;
  --coral-wash: #3a1720;
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(20, 184, 166, 0.16), transparent 260px),
    linear-gradient(180deg, rgba(232, 247, 244, 0.9), transparent 310px),
    var(--bg);
  font-family: var(--font-body);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.brand-lockup:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: 5px;
  border-radius: 16px;
}

.radar-logo {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.radar-logo.small {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.radar-logo svg {
  width: 34px;
  height: 34px;
}

.radar-logo.small svg {
  width: 27px;
  height: 27px;
}

.radar-logo circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.radar-logo circle:nth-child(1) {
  opacity: 0.18;
}

.radar-logo circle:nth-child(2) {
  opacity: 0.32;
}

.radar-logo circle:nth-child(3) {
  opacity: 0.55;
}

.radar-logo path {
  fill: rgba(255, 255, 255, 0.26);
  transform-origin: 32px 32px;
  animation: radarSweep 3.4s linear infinite;
}

.radar-logo .pin {
  fill: var(--coral);
  stroke: none;
}

.radar-logo .pin-hole,
.radar-logo .center {
  fill: #fff;
  stroke: none;
}

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

.eyebrow,
.mono-label,
.stat-card span,
.route-summary span,
.route-row span,
.list-summary span {
  font-family: var(--font-mono);
}

h1,
h2,
h3,
.deal-title,
.price,
.hero-copy strong {
  font-family: var(--font-display);
}

h1 {
  font-weight: 800;
  letter-spacing: -0.04em;
}

h1 span {
  color: var(--accent);
}

h2,
h3 {
  letter-spacing: -0.02em;
}

.icon-button,
.search-box,
.chip {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.icon-button,
.search-box,
.advanced-panel,
.segmented,
.status-band,
.stat-card,
.prospect-card,
.deal-card,
.store-card,
.list-row,
.alert-row,
.wish-row,
.route-row,
.route-panel,
.alert-form,
.wish-form,
.list-summary div,
.route-summary div,
.modal-panel {
  border-color: var(--line-soft);
  border-radius: 16px;
}

.chip {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.segment,
.mini-action,
.primary-button,
.ghost-button,
.price-control input,
.alert-form input,
.alert-form select,
.route-controls input,
.route-controls select,
.wish-form input {
  border-radius: 12px;
}

.badge.live,
.route-stop.is-home,
.source-pill.is-ok {
  background: var(--accent-wash);
  color: var(--accent-strong);
}

.discount,
.mini-action.is-on {
  background: var(--danger);
}

.radar-hero {
  position: relative;
  min-height: 220px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: #eaf1ec;
  box-shadow: var(--shadow-lg);
}

.map-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 118, 110, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 18% 78%, #cfe3cc 0 16%, transparent 17%),
    radial-gradient(circle at 78% 16%, #cfe3cc 0 18%, transparent 19%),
    #eaf1ec;
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
}

.road {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.main-road {
  left: -20px;
  right: -20px;
  top: 118px;
  height: 16px;
  transform: rotate(-5deg);
}

.cross-road {
  top: -30px;
  bottom: -30px;
  left: 58%;
  width: 14px;
  transform: rotate(-2deg);
}

.deal-pin {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.22), 0 0 0 2px #fff;
}

.deal-pin::after {
  content: "";
  width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.pin-a {
  left: 48px;
  top: 48px;
}

.pin-b {
  right: 42px;
  top: 72px;
}

.pin-c {
  left: 45%;
  bottom: 34px;
}

.user-dot {
  position: absolute;
  left: 48%;
  top: 52%;
  z-index: 3;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1e40af;
  box-shadow: 0 0 0 10px rgba(30, 64, 175, 0.16), 0 4px 10px rgba(15, 23, 42, 0.2);
}

.radar-range {
  position: absolute;
  left: calc(48% - 92px);
  top: calc(52% - 92px);
  width: 200px;
  height: 200px;
  border: 1.5px dashed rgba(15, 118, 110, 0.35);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 5px;
  width: min(360px, calc(100% - 32px));
  margin: 16px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.mono-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy strong {
  font-size: 1.2rem;
  line-height: 1.05;
}

.hero-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.bottom-nav {
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(14px);
}

.nav-item {
  border-radius: 14px;
  color: var(--muted);
}

.nav-item.is-active {
  background: var(--accent-wash);
  color: var(--accent-strong);
}

body.dark .bottom-nav,
body.dark .icon-button,
body.dark .search-box,
body.dark .chip,
body.dark .hero-copy,
body.dark .home-address-panel {
  background: rgba(23, 33, 31, 0.92);
}

.hero-action {
  justify-self: start;
  min-height: 34px;
  margin-top: 3px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #062511;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.home-address-panel {
  display: grid;
  gap: 12px;
  margin: -4px 0 18px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.home-address-panel h2 {
  margin-bottom: 4px;
}

.home-address-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.home-address-field input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0 12px;
  outline: 0;
}

.home-address-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto);
  gap: 8px;
}

.address-control {
  grid-column: 1 / -1;
}

.profile-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
  gap: 8px;
  align-self: end;
}

.profile-actions .primary-button,
.profile-actions .ghost-button {
  width: 100%;
}

.profile-status,
.image-source-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.quick-wish-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 12px;
}

.quick-wish-bar button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.image-source {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.deal-image img.is-fallback,
.modal-image.is-fallback {
  padding: 0;
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

@media (min-width: 720px) {
  .home-address-panel {
    grid-template-columns: 1fr minmax(280px, 1.15fr) 260px;
    align-items: end;
  }

  .route-controls {
    grid-template-columns: 0.8fr 1.45fr 0.72fr 0.72fr;
    align-items: end;
  }

  .address-control {
    grid-column: auto;
  }

  .profile-actions {
    grid-column: 1 / -1;
    grid-template-columns: 180px 140px;
  }
}

@media (max-width: 420px) {
  .legal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-address-actions {
    grid-template-columns: 1fr;
  }

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

  .image-source {
    left: 8px;
    right: auto;
  }
}
