:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #637076;
  --line: #dce3df;
  --paper: #fbfaf5;
  --surface: #ffffff;
  --teal: #0f3d3e;
  --teal-soft: #d8efea;
  --coral: #e05d45;
  --amber: #f0b84f;
  --sage: #6b8f71;
  --shadow: 0 18px 50px rgba(23, 33, 38, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(216, 239, 234, 0.7), rgba(240, 184, 79, 0.2) 42%, rgba(224, 93, 69, 0.12)),
    var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
}

.app-shell {
  width: calc(100% - 28px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  min-height: 230px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(15, 61, 62, 0.95), rgba(15, 61, 62, 0.68)),
    url("https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Cervia_-_canale.jpg/1200px-Cervia_-_canale.jpg");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topbar > *,
.grid > *,
.card,
.day-card,
.activity-card {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.subtitle {
  max-width: 620px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: var(--amber);
}

.install-link,
.link-button,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.install-link {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  margin: 16px 0 18px;
  padding: 8px;
  overflow-x: auto;
  background: rgba(251, 250, 245, 0.86);
  border: 1px solid rgba(220, 227, 223, 0.9);
  border-radius: 8px;
  backdrop-filter: blur(14px);
}

.tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.tab.is-active {
  background: var(--teal);
  color: #fff;
}

.view {
  display: none;
}

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

.section-head {
  margin: 28px 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: 0;
}

.grid {
  display: grid;
  gap: 14px;
}

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

.card,
.day-card,
.activity-card,
.charging-hero {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 33, 38, 0.07);
}

.card,
.day-card,
.activity-card {
  padding: 18px;
}

.card h3,
.day-card h3,
.activity-card h3,
.charging-hero h3 {
  margin: 0 0 10px;
  font-size: 1.22rem;
  letter-spacing: 0;
}

.card p,
.day-card p,
.activity-card p,
.charging-hero p {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.highlight {
  background: linear-gradient(135deg, #ffffff, var(--teal-soft));
}

.span {
  grid-column: 1 / -1;
}

.soft {
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.primary-action {
  background: var(--coral);
  color: #fff;
}

.secondary-action,
.link-button {
  background: #f4f7f4;
  border-color: var(--line);
  color: var(--teal);
}

.day-list,
.activity-list {
  display: grid;
  gap: 16px;
}

.day-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.day-heading span {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: #f7f8f3;
  border: 1px solid #e7ebe4;
  border-radius: 8px;
}

.timeline time {
  color: var(--teal);
  font-weight: 900;
}

.timeline strong {
  display: block;
  margin-bottom: 4px;
}

.timeline p {
  margin: 0;
}

.inline-link {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.activity-card {
  display: grid;
  gap: 12px;
}

.activity-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.cost-box {
  padding: 14px;
  background: #f7fbf8;
  border: 1px solid #d5e7d8;
  border-radius: 8px;
}

.cost-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 1.24rem;
}

.cost-box p {
  margin: 0 0 6px;
}

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

.meta div {
  padding: 12px;
  background: #f8f6ee;
  border-radius: 8px;
}

.meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.source {
  margin: 0;
  font-size: 0.86rem;
}

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

.map-panel {
  padding: 18px;
  background: #f8f6ee;
  border-right: 1px solid var(--line);
}

.map-panel label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.map-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.route-summary {
  margin-top: 16px;
}

.route-summary h3 {
  margin: 0 0 8px;
}

.route-summary p {
  color: var(--muted);
  line-height: 1.5;
}

.map {
  min-height: 620px;
}

.charging-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 20px;
  background: linear-gradient(135deg, var(--teal), #225f5a);
  color: #fff;
}

.charging-hero p,
.charging-hero .eyebrow {
  color: rgba(255, 255, 255, 0.84);
}

.charging-hero strong {
  align-self: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--ink);
  white-space: nowrap;
}

.support-section {
  margin-top: 34px;
}

.notice-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.notice {
  padding: 16px;
  background: #eef7f2;
  border: 1px solid #c9e3d4;
  border-left: 5px solid var(--sage);
  border-radius: 8px;
}

.notice.is-warning {
  background: #fff7e3;
  border-color: #edd79d;
  border-left-color: var(--amber);
}

.notice p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.5;
}

.notice strong {
  display: block;
  line-height: 1.4;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checklist input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
}

.checklist label {
  line-height: 1.35;
}

@media (max-width: 760px) {
  .app-shell {
    width: calc(100% - 18px);
    padding-top: 9px;
  }

  .topbar {
    min-height: 210px;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .grid.two,
  .meta,
  .checklist {
    grid-template-columns: 1fr;
  }

  .day-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline li {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 10px;
  }

  .map-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .map-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .map {
    min-height: 480px;
  }

  .charging-hero {
    flex-direction: column;
  }

  .charging-hero strong {
    align-self: flex-start;
  }
}
