:root {
  color-scheme: light;
  --bg: #f4f2eb;
  --panel: #ffffff;
  --panel-soft: #f9faf7;
  --ink: #14171f;
  --muted: #626a76;
  --line: #dfe3dc;
  --city-theme: #2563eb;
  --green: #0f8f68;
  --red: #d45138;
  --slate: #5a6072;
  --amber: #b7791f;
  --shadow: rgba(32, 38, 48, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(244, 242, 235, 0.95)),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.04) 0 1px, transparent 1px 72px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  gap: 18px;
  padding: 92px 0 32px;
}

.app-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(14px, 4vw, 32px);
  border-bottom: 1px solid rgba(223, 227, 220, 0.86);
  background: rgba(250, 250, 247, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 2vw, 22px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.top-nav a:hover {
  color: var(--ink);
}

.icon-button,
.primary-action,
.secondary-action,
.city-tab,
.mark-row button,
.time-tabs button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.icon-button {
  padding: 0 14px;
  color: var(--ink);
  background: #ecefe8;
}

.hero-panel,
.workbench,
.signals-panel,
.cards-section,
.checklist-section,
.flex-section,
.money-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 44px var(--shadow);
}

.hero-panel {
  min-height: 480px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: stretch;
  padding: clamp(22px, 5vw, 54px);
  background:
    linear-gradient(135deg, rgba(20, 23, 31, 0.92), rgba(37, 99, 235, 0.7)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='520' viewBox='0 0 900 520'%3E%3Crect width='900' height='520' fill='%2322232b'/%3E%3Cpath d='M60 400 C160 240 245 410 360 220 C480 20 620 390 820 120' fill='none' stroke='%23f4f2eb' stroke-opacity='.22' stroke-width='10'/%3E%3Cpath d='M80 120 H780 M120 190 H720 M160 260 H820 M100 330 H700 M190 420 H780' stroke='%23ffffff' stroke-opacity='.1' stroke-width='2'/%3E%3Ccircle cx='650' cy='150' r='64' fill='%23dc2626' fill-opacity='.55'/%3E%3Ccircle cx='240' cy='320' r='42' fill='%230f8f68' fill-opacity='.55'/%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  max-width: 760px;
}

.eyebrow {
  margin: 0;
  color: var(--city-theme);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel .eyebrow {
  color: #b7d1ff;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(42px, 9vw, 92px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 670px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2.3vw, 22px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
}

.primary-action {
  color: #fff;
  background: var(--city-theme);
}

.secondary-action {
  color: var(--ink);
  background: #fff;
}

.hero-status {
  display: grid;
  align-content: end;
  gap: 12px;
}

.hero-status div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.status-label {
  color: #cfe0ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-heading {
  max-width: 780px;
  padding: clamp(20px, 4vw, 34px) clamp(18px, 4vw, 34px) 0;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.city-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px clamp(18px, 4vw, 34px);
}

.city-tab {
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.city-tab span {
  color: var(--muted);
  font-size: 12px;
}

.city-tab.is-active {
  border-color: var(--city-theme);
  color: #fff;
  background: var(--city-theme);
}

.city-tab.is-active span {
  color: rgba(255, 255, 255, 0.82);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
  padding: 0 clamp(18px, 4vw, 34px) clamp(20px, 4vw, 34px);
}

.map-board {
  position: sticky;
  top: 86px;
  align-self: start;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(20, 23, 31, 0.92)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 46px),
    #1f2937;
  color: #fff;
}

.map-rail {
  position: absolute;
  inset: 0;
}

.map-rail::before {
  content: "";
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.map-pin {
  position: absolute;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--city-theme);
  font-weight: 900;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.map-pin.is-want {
  background: #2f6fed;
}

.map-pin.is-been {
  background: var(--green);
}

.map-pin.is-loved {
  background: var(--red);
}

.map-pin.is-skip {
  background: var(--slate);
}

.map-summary {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.72);
}

.map-summary span {
  color: #cfe0ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-summary strong {
  font-size: 34px;
}

.map-summary p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.poi-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.mark-summary,
.poi-card,
.trend-card,
.route-card,
.check-card,
.money-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.mark-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--muted);
}

.mark-summary strong {
  color: var(--ink);
}

.poi-list,
.route-cards,
.checklist-grid,
.money-grid {
  display: grid;
  gap: 12px;
}

.poi-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.poi-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.poi-card h3,
.poi-card p {
  margin-bottom: 0;
}

.poi-card p {
  color: var(--muted);
  line-height: 1.55;
}

.poi-tag,
.pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--city-theme);
  font-size: 12px;
  font-weight: 900;
}

.mark-badge {
  align-self: start;
  min-width: 80px;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f0f2ec;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.mark-badge.is-want {
  color: #fff;
  background: #2f6fed;
}

.mark-badge.is-been {
  color: #fff;
  background: var(--green);
}

.mark-badge.is-loved {
  color: #fff;
  background: var(--red);
}

.mark-badge.is-skip {
  color: #fff;
  background: var(--slate);
}

.risk-line strong {
  color: var(--ink);
}

.mark-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mark-row button {
  padding: 0 8px;
  color: var(--ink);
  background: #eef1ed;
}

.mark-row button.is-selected {
  color: #fff;
  background: var(--city-theme);
}

.tracked-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.signals-panel,
.cards-section,
.checklist-section,
.money-section {
  padding-bottom: clamp(20px, 4vw, 34px);
}

.time-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px clamp(18px, 4vw, 34px);
}

.time-tabs button {
  min-width: 72px;
  padding: 0 12px;
  color: var(--ink);
  background: #eef1ed;
}

.time-tabs button[aria-selected="true"] {
  color: #fff;
  background: var(--city-theme);
}

.data-note {
  margin: -6px clamp(18px, 4vw, 34px) 16px;
  padding: 12px 14px;
  border: 1px solid #ead49d;
  border-radius: 8px;
  color: #76530f;
  background: #fff8e8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 clamp(18px, 4vw, 34px);
}

.trend-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.trend-card span {
  color: var(--city-theme);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.trend-card p,
.trend-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.trend-card.is-empty {
  grid-column: 1 / -1;
  background: #fff8e8;
}

.route-cards,
.checklist-grid,
.money-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px clamp(18px, 4vw, 34px) 0;
}

.route-card,
.check-card,
.money-grid article {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
}

.route-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.verified {
  margin: 0;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.check-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.45;
}

.check-item input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--city-theme);
}

.flex-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: center;
  padding: clamp(20px, 4vw, 34px);
}

.flex-copy {
  display: grid;
  gap: 12px;
}

.flex-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.share-canvas {
  width: 100%;
  max-height: 640px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f4ee;
  object-fit: contain;
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.money-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.ad-placeholder {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 1px dashed #bcc3bd;
  border-radius: 8px;
  color: var(--muted);
  background: #f7f8f5;
  font-weight: 800;
}

.footer-note {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.lite-mode {
  background: #fff;
}

.lite-mode .hero-panel {
  min-height: auto;
  background: #111827;
}

.lite-mode .map-board {
  min-height: 360px;
  background: #1f2937;
}

.lite-mode .top-nav,
.lite-mode .hero-status,
.lite-mode .ad-placeholder {
  display: none;
}

@media (max-width: 920px) {
  .app-bar {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  .hero-panel,
  .map-layout,
  .flex-section {
    grid-template-columns: 1fr;
  }

  .map-board {
    position: relative;
    top: auto;
    min-height: 460px;
  }

  .trend-grid,
  .route-cards,
  .checklist-grid,
  .money-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 20px, 1180px);
    padding-top: 78px;
  }

  .app-bar {
    padding: 10px;
  }

  .brand small {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .hero-panel {
    padding: 22px;
  }

  .hero-actions {
    display: grid;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .city-switcher,
  .mark-row {
    grid-template-columns: 1fr;
  }

  .map-board {
    min-height: 390px;
  }

  .mark-summary,
  .poi-card-header,
  .footer-note {
    display: grid;
  }
}
