:root {
  --paper: #f6f3ec;
  --ink: #202124;
  --muted: #6b6760;
  --line: #ded8ce;
  --leaf: #2f6f5e;
  --leaf-dark: #1f5245;
  --clay: #b85f42;
  --sky: #3f6f9f;
  --gold: #c99632;
  --white: #fffdf8;
  --shadow: 0 16px 40px rgba(49, 43, 35, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(246, 243, 236, 0.98)),
    linear-gradient(135deg, rgba(47, 111, 94, 0.14) 0 22%, transparent 22% 100%),
    linear-gradient(45deg, transparent 0 65%, rgba(63, 111, 159, 0.12) 65% 100%);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px 92px;
  background: rgba(246, 243, 236, 0.9);
  backdrop-filter: blur(14px);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--clay);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: 26px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: 0;
}

.hero-copy p,
.location-box p,
.city-card p,
.timeline-item p,
.guide-card p {
  color: var(--muted);
  line-height: 1.65;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--leaf-dark);
  background: var(--white);
  font-weight: 800;
}

.input-box,
.selector-group,
.city-card,
.timeline-item,
.guide-card,
.location-box,
.preference-list {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.input-box {
  padding: 14px;
}

.input-box label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fffaf0;
  line-height: 1.55;
}

.input-actions,
.location-actions,
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin-top: 12px;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--leaf);
}

.secondary-button {
  color: var(--leaf-dark);
  border-color: var(--line);
  background: var(--white);
}

.text-button {
  min-height: 36px;
  color: var(--leaf-dark);
  background: transparent;
}

.selector-group {
  padding: 14px;
}

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

.section-heading h2,
.section-heading h3 {
  margin-bottom: 0;
}

.section-heading span {
  flex: 0 0 auto;
  color: var(--sky);
  font-size: 12px;
  font-weight: 800;
}

.sticky-heading {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 -16px 12px;
  padding: 12px 16px;
  background: rgba(246, 243, 236, 0.96);
  backdrop-filter: blur(12px);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--white);
  line-height: 1.35;
  text-align: left;
}

.chip.selected {
  color: #fff;
  border-color: var(--leaf);
  background: var(--leaf);
}

.city-card {
  padding: 16px;
}

.city-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  color: #fff;
  background: var(--clay);
  font-size: 12px;
  font-weight: 800;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.metric {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fffaf0;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 4px;
  color: var(--leaf-dark);
  font-size: 14px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  padding: 14px;
}

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

.map-panel {
  position: relative;
  height: 250px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(63, 111, 159, 0.12), transparent 36%),
    linear-gradient(45deg, rgba(47, 111, 94, 0.16), transparent 45%),
    #fffaf0;
  box-shadow: var(--shadow);
}

.route-line {
  position: absolute;
  left: 20%;
  top: 72%;
  width: 62%;
  height: 5px;
  transform: rotate(-34deg);
  transform-origin: left center;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, var(--leaf), var(--leaf) 16px, transparent 16px, transparent 24px);
}

.map-point {
  position: absolute;
  min-width: 54px;
  min-height: 34px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--white);
  border-radius: 999px;
  padding: 6px 9px;
  color: #fff;
  background: var(--sky);
  box-shadow: 0 8px 18px rgba(32, 33, 36, 0.18);
  font-size: 12px;
  font-weight: 900;
}

.map-point.active {
  background: var(--clay);
}

.location-box {
  padding: 14px;
}

.guide-card {
  padding: 16px;
}

.guide-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.preference-list {
  overflow: hidden;
}

.preference-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.preference-row:last-child {
  border-bottom: 0;
}

.preference-row span {
  color: var(--muted);
}

.preference-row strong {
  text-align: right;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 8px 10px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(14px);
}

.nav-item {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.nav-item.active {
  color: #fff;
  background: var(--leaf);
}

@media (min-width: 760px) {
  .app-shell {
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }
}
