:root {
  color-scheme: light;
  --ink: #1d2528;
  --muted: #657274;
  --line: #d7ded8;
  --paper: #fffdf8;
  --panel: rgba(255, 255, 255, 0.88);
  --olive: #546c4c;
  --coral: #d7664d;
  --lake: #2f7f91;
  --amber: #c99332;
  --shadow: 0 18px 50px rgba(39, 52, 49, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f5f1e8;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(245, 241, 232, 0.2), #f5f1e8 54%),
    url("https://images.unsplash.com/photo-1516483638261-f4dbaf036963?auto=format&fit=crop&w=2200&q=80") center top / cover fixed;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

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

.hero {
  min-height: 390px;
  display: grid;
  align-content: end;
  gap: 26px;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: #fff;
  background:
    linear-gradient(100deg, rgba(20, 29, 28, 0.78), rgba(20, 29, 28, 0.2)),
    url("https://images.unsplash.com/photo-1515542622106-78bda8ba0e5b?auto=format&fit=crop&w=1800&q=80") center / cover;
}

.hero-copy {
  max-width: 680px;
}

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

.hero .eyebrow {
  color: #ffd28c;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(3.4rem, 8vw, 6.9rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 520px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
}

.hero-strip div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-strip span,
.hero-strip strong {
  display: block;
}

.hero-strip span {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.hero-strip strong {
  overflow-wrap: anywhere;
  font-size: 1.1rem;
}

.folder-bar {
  display: flex;
  gap: 8px;
  margin: 22px 0 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.folder-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  white-space: nowrap;
}

.folder-tab svg,
.panel-title svg,
.primary-btn svg,
.ghost-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.folder-tab.active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 -10px 22px rgba(54, 61, 55, 0.08);
}

.folder {
  display: none;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 0 8px 8px 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.folder.active {
  display: block;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  line-height: 1;
  letter-spacing: 0;
}

.info-grid,
.route-layout,
.links-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.span-2 {
  grid-column: span 2;
}

.panel,
.link-card,
.day-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(42, 49, 44, 0.08);
}

.panel {
  padding: 18px;
}

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

.panel-title h3,
.recommendation h3,
.link-content h3,
.day-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

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

.timeline li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.timeline.compact li {
  grid-template-columns: 64px minmax(0, 1fr);
}

.timeline time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--olive);
  font-weight: 800;
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline span,
.soft,
.link-content p,
.day-card span {
  color: var(--muted);
  line-height: 1.45;
}

.stay-card {
  min-height: 260px;
  display: grid;
  align-content: end;
  color: #fff;
  background-position: center;
  background-size: cover;
  overflow: hidden;
  position: relative;
}

.stay-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 24, 23, 0.05), rgba(18, 24, 23, 0.76));
}

.stay-card > * {
  position: relative;
}

.stay-card.milan {
  background-image: url("https://images.unsplash.com/photo-1520175480921-4edfa2983e0f?auto=format&fit=crop&w=1200&q=80");
}

.stay-card.como {
  background-image: url("https://images.unsplash.com/photo-1590681497063-1eb273c3a0d3?auto=format&fit=crop&w=1200&q=80");
}

.stay-name {
  margin-bottom: 14px;
  font-size: 1.45rem;
  font-weight: 800;
}

.mini-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.mini-list div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
}

.mini-list dt {
  color: rgba(255, 255, 255, 0.64);
}

.mini-list dd {
  margin: 0;
}

.text-link {
  font-weight: 800;
  color: #ffe1a6;
  text-decoration: none;
}

.recommendation {
  display: grid;
  gap: 12px;
  align-content: start;
  background: #172725;
  color: #fff;
}

.recommendation p {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.5;
}

.badge {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: #1d2528;
  font-size: 0.78rem;
  font-weight: 900;
}

.route-summary,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-summary span,
.link-row a,
.link-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: 0.84rem;
}

.route-summary svg {
  width: 16px;
  height: 16px;
}

.source-card .link-row a {
  color: var(--lake);
  background: #e8f3ef;
  text-decoration: none;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.day-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.day-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e4eee8;
  color: var(--olive);
  font-weight: 900;
}

.day-card p {
  margin-bottom: 5px;
  color: var(--coral);
  font-weight: 800;
}

.links-layout {
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
}

.link-form {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 12px;
}

.link-form label {
  display: grid;
  gap: 6px;
}

.link-form label span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.link-form input,
.link-form select,
.link-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
}

.link-form textarea {
  resize: vertical;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.primary-btn,
.ghost-btn,
.icon-btn {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  font-weight: 900;
}

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

.ghost-btn {
  color: var(--ink);
  background: #edf1eb;
}

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

.link-card {
  overflow: hidden;
  background: #fff;
}

.link-image {
  display: grid;
  place-items: center;
  min-height: 158px;
  background: linear-gradient(135deg, #e6eee7, #f7d9ca);
  background-position: center;
  background-size: cover;
  color: var(--olive);
  font-weight: 900;
  text-decoration: none;
}

.link-content {
  position: relative;
  padding: 14px;
}

.link-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.link-meta span {
  min-height: 26px;
  color: var(--lake);
  background: #e8f3ef;
  font-size: 0.74rem;
}

.link-content h3 {
  padding-right: 36px;
}

.link-content h3 a {
  text-decoration: none;
}

.link-content p {
  min-height: 42px;
  margin: 8px 0 0;
}

.icon-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: #f2f4ef;
}

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

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-state svg {
  width: 40px;
  height: 40px;
  color: var(--olive);
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }

  .hero {
    min-height: 340px;
  }

  .info-grid,
  .route-layout,
  .links-layout,
  .days-grid,
  .link-board {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .link-form {
    position: static;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 10px;
  }

  .hero {
    padding: 22px;
  }

  .hero-strip {
    grid-template-columns: 1fr;
  }

  .folder {
    padding: 14px;
  }

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

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

  .mini-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
