:root {
  --paper: #f5f1e8;
  --paper-deep: #ebe4d5;
  --surface: #fffdf8;
  --ink: #1e2923;
  --muted: #6c746e;
  --line: #d8d3c6;
  --green: #425b45;
  --green-soft: #dfe7d9;
  --brick: #b8563f;
  --brick-soft: #f0ded5;
  --blue: #477886;
  --blue-soft: #dce9ec;
  --yellow: #c49532;
  --yellow-soft: #f0e6c8;
  --shadow: 0 10px 30px rgba(38, 48, 41, 0.08);
  --nav-height: 76px;
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #dfe5e1;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button,
input[type="range"],
input[type="checkbox"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(71, 120, 134, 0.28);
  outline-offset: 2px;
}

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

h1,
h2,
h3,
.brand-button strong {
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-weight: 700;
}

svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.app-shell {
  position: relative;
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 50px rgba(26, 39, 31, 0.12);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(216, 211, 198, 0.82);
  background: rgba(245, 241, 232, 0.94);
  backdrop-filter: blur(18px);
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-button > span:last-child {
  display: grid;
  gap: 1px;
}

.brand-button strong {
  font-size: 20px;
  line-height: 1.05;
}

.brand-button small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--green);
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: "Songti SC", serif;
  font-size: 17px;
}

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

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.icon-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.page {
  display: none;
  min-height: calc(100vh - 72px);
  padding: 0 28px calc(var(--nav-height) + 64px);
}

.page.is-active {
  display: block;
  animation: page-in 260ms ease-out;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-art {
  position: relative;
  display: grid;
  min-height: 500px;
  grid-template-rows: minmax(310px, 1fr) auto;
  margin: 0 -28px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #dce9e7;
}

.hero-art::after {
  display: none;
}

.hero-art img {
  position: relative;
  grid-row: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  grid-row: 2;
  padding: 25px clamp(28px, 7vw, 82px) 28px;
  border-top: 1px solid rgba(66, 91, 69, 0.25);
  background: #eef1e8;
}

.hero-copy > p {
  margin-bottom: 6px;
  color: var(--brick);
  font-size: 13px;
  font-weight: 800;
}

.hero-copy h1 {
  max-width: 880px;
  color: #17231c;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.16;
  text-wrap: balance;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 17px;
  color: #314238;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta svg {
  width: 16px;
  height: 16px;
}

.planner-section,
.local-picks,
.member-band,
.ledger-section {
  padding: 44px 0;
}

.section-heading,
.ledger-topline,
.subsection-title,
.day-heading,
.route-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading {
  margin-bottom: 23px;
}

.section-heading h2,
.ledger-topline h2,
.day-heading h2,
.route-toolbar h2,
.budget-band h2,
.checklist-section h2,
.tool-section h2 {
  font-size: 25px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--brick);
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 800;
}

.section-note,
.section-heading > span {
  color: var(--muted);
  font-size: 13px;
}

.planner-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  align-content: start;
  gap: 9px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label,
.dialog-form label {
  color: #3e4942;
  font-size: 13px;
  font-weight: 750;
}

.field label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.input-with-icon,
.currency-input {
  display: flex;
  align-items: center;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.input-with-icon:focus-within,
.currency-input:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(66, 91, 69, 0.1);
}

.input-with-icon > svg {
  flex: 0 0 auto;
  margin-left: 15px;
  color: var(--green);
}

.input-with-icon input,
.currency-input input,
.dialog-form input,
.dialog-form select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.input-with-icon input {
  height: 100%;
  padding: 0 12px;
}

.destination-lock {
  flex: 0 0 auto;
  margin-right: 7px;
  padding: 8px 12px;
  border-left: 1px solid var(--line);
  color: var(--brick);
  font-weight: 800;
}

.stepper {
  display: grid;
  height: 52px;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.stepper button {
  display: grid;
  height: 100%;
  padding: 0;
  place-items: center;
  border: 0;
  background: #f2eee4;
}

.stepper button:hover {
  background: var(--green-soft);
}

.stepper output {
  text-align: center;
  font-weight: 800;
}

.currency-input > span {
  padding-left: 16px;
  color: var(--brick);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 800;
}

.currency-input input {
  height: 100%;
  padding: 0 15px 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.segment-control {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.segment-control button {
  min-width: 0;
  height: 48px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font-weight: 750;
}

.segment-control button:last-child {
  border-right: 0;
}

.segment-control button.is-selected {
  background: var(--green);
  color: #fff;
}

.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice-chips button,
.quick-prompts button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.choice-chips button.is-selected {
  border-color: var(--green);
  background: var(--green-soft);
  color: #263d2b;
}

.choice-chips svg {
  width: 16px;
  height: 16px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.label-row output {
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.pace-field input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  font-weight: 800;
}

.primary-button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.primary-button:hover {
  background: #324b37;
}

.secondary-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.secondary-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.text-button {
  min-height: 36px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: var(--green);
}

.generate-button {
  position: relative;
  grid-column: 1 / -1;
  min-height: 58px;
  font-size: 16px;
}

.generate-button span {
  position: absolute;
  right: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.local-picks {
  border-top: 1px solid var(--line);
}

.compact-heading {
  margin-bottom: 18px;
}

.tip-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.tip-strip article {
  position: relative;
  min-height: 160px;
  padding: 23px 23px 23px 47px;
  border-right: 1px solid var(--line);
}

.tip-strip article:last-child {
  border-right: 0;
}

.tip-number {
  position: absolute;
  top: 24px;
  left: 15px;
  color: var(--brick);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 800;
}

.tip-strip h3 {
  margin-bottom: 10px;
  font-size: 17px;
}

.tip-strip p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 42px 0 25px;
}

.page-header h1 {
  margin-bottom: 7px;
  font-size: 34px;
}

.page-header > div > p:last-child,
.profile-heading > div > span {
  color: var(--muted);
  font-size: 13px;
}

.trip-status-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--green-soft);
}

.trip-status-band > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 8px;
}

.trip-status-band small {
  grid-column: 2;
  color: var(--muted);
}

.status-dot {
  width: 9px;
  height: 9px;
  grid-row: 1 / 3;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(66, 91, 69, 0.12);
}

.trip-status-band button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(var(--day-count, 3), minmax(76px, 1fr));
  margin: 25px 0 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.day-tabs button {
  min-width: 76px;
  min-height: 62px;
  padding: 7px 13px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
}

.day-tabs button:last-child {
  border-right: 0;
}

.day-tabs button strong,
.day-tabs button span {
  display: block;
}

.day-tabs button strong {
  font-family: Georgia, serif;
  font-size: 16px;
}

.day-tabs button span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.day-tabs button.is-selected {
  background: var(--brick);
  color: #fff;
}

.day-tabs button.is-selected span {
  color: rgba(255, 255, 255, 0.78);
}

.day-overview {
  padding: 30px 0 23px;
}

.day-heading {
  align-items: center;
}

.day-heading > div > span {
  display: block;
  margin-bottom: 5px;
  color: var(--brick);
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
}

.day-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.day-facts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 33px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted);
  font-size: 12px;
}

.day-facts svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.route-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr);
  gap: 26px;
  align-items: start;
}

.route-panel,
.map-panel,
.settlement-panel,
.checklist-section,
.tool-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.route-panel {
  padding: 23px;
}

.route-toolbar {
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.route-toolbar h2 {
  font-size: 20px;
}

.timeline {
  position: relative;
  padding-top: 8px;
}

.timeline::before {
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: 18px;
  width: 1px;
  background: #aab6aa;
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 98px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.route-index {
  z-index: 1;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 0 1px var(--green);
}

.route-info {
  min-width: 0;
}

.route-time {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--brick);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 800;
}

.route-info h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.route-info p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.route-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.route-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.route-meta svg {
  width: 14px;
  height: 14px;
}

.route-meta button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
}

.map-panel {
  position: sticky;
  top: 93px;
  overflow: hidden;
}

.map-paper {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background: #e5e7d9;
}

.map-paper::before,
.map-paper::after {
  position: absolute;
  content: "";
  opacity: 0.72;
}

.map-paper::before {
  top: -60px;
  left: -50px;
  width: 230px;
  height: 250px;
  border: 32px solid #b9c7b4;
  border-radius: 48% 52% 42% 58%;
  transform: rotate(18deg);
}

.map-paper::after {
  right: -55px;
  bottom: -85px;
  width: 250px;
  height: 230px;
  border: 38px solid #d5c6a9;
  border-radius: 54% 46% 52% 48%;
  transform: rotate(-12deg);
}

.river-shape {
  position: absolute;
  top: -40px;
  left: 44%;
  width: 72px;
  height: 440px;
  border: 21px solid #a8c6cc;
  border-top: 0;
  border-bottom: 0;
  border-radius: 45%;
  transform: rotate(11deg);
}

.map-label {
  position: absolute;
  z-index: 1;
  color: rgba(30, 41, 35, 0.55);
  font-family: "Songti SC", serif;
  font-size: 11px;
  font-weight: 700;
}

.map-label.yuelu {
  top: 68px;
  left: 14%;
}

.map-label.river {
  top: 120px;
  left: 49%;
  writing-mode: vertical-lr;
}

.map-label.downtown {
  right: 12%;
  bottom: 70px;
}

#routeMap {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-path {
  fill: none;
  stroke: var(--green);
  stroke-dasharray: 7 6;
  stroke-linecap: round;
  stroke-width: 3;
}

.route-map-node {
  fill: var(--green);
  stroke: #fff;
  stroke-width: 4;
}

.route-map-text {
  fill: #fff;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
}

.map-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 17px;
}

.map-caption > div {
  display: grid;
}

.map-caption strong {
  font-family: Georgia, serif;
  font-size: 20px;
}

.map-caption span {
  color: var(--muted);
  font-size: 10px;
}

.budget-band {
  display: grid;
  grid-template-columns: 1fr auto minmax(280px, 1.3fr);
  gap: 28px;
  align-items: center;
  margin-top: 30px;
  padding: 24px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.budget-total {
  display: grid;
  padding: 0 25px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  text-align: center;
}

.budget-total strong {
  color: var(--brick);
  font-family: Georgia, serif;
  font-size: 28px;
}

.budget-total span {
  color: var(--muted);
  font-size: 10px;
}

.budget-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.budget-breakdown div {
  text-align: center;
}

.budget-breakdown span,
.budget-breakdown strong {
  display: block;
}

.budget-breakdown span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.budget-breakdown strong {
  font-family: Georgia, serif;
  font-size: 15px;
}

.trip-actions {
  display: flex;
  justify-content: flex-end;
  gap: 11px;
  padding: 25px 0 45px;
}

.member-band {
  border-top: 1px solid var(--line);
}

.member-list {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 3px 0;
}

.member {
  display: grid;
  min-width: 70px;
  justify-items: center;
  gap: 4px;
}

.member strong {
  font-size: 13px;
}

.member small {
  color: var(--muted);
  font-size: 10px;
}

.avatar,
.add-member > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  font-family: "Songti SC", serif;
  font-weight: 800;
}

.avatar-green {
  background: var(--green);
  color: #fff;
}

.avatar-red {
  background: var(--brick-soft);
  color: var(--brick);
}

.avatar-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.add-member {
  padding: 0;
  border: 0;
  background: transparent;
}

.add-member > span {
  border: 1px dashed var(--muted);
  color: var(--muted);
}

.ledger-section {
  border-top: 1px solid var(--line);
}

.ledger-topline {
  align-items: center;
}

.small-button {
  min-height: 40px;
  font-size: 13px;
}

.ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 23px 0 27px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.ledger-summary div {
  display: grid;
  gap: 5px;
  padding: 19px 20px;
  border-right: 1px solid var(--line);
}

.ledger-summary div:last-child {
  border-right: 0;
}

.ledger-summary span {
  color: var(--muted);
  font-size: 11px;
}

.ledger-summary strong {
  font-family: Georgia, serif;
  font-size: 24px;
}

.ledger-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 25px;
}

.subsection-title {
  align-items: center;
  margin-bottom: 14px;
}

.subsection-title h3 {
  font-family: "Songti SC", serif;
  font-size: 19px;
}

.subsection-title > span,
.subsection-title > div + span {
  color: var(--muted);
  font-size: 11px;
}

.expense-list {
  border-top: 1px solid var(--line);
}

.expense-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
}

.expense-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow-soft);
  color: #765d21;
}

.expense-icon svg {
  width: 17px;
  height: 17px;
}

.expense-main {
  min-width: 0;
}

.expense-main strong,
.expense-main small {
  display: block;
}

.expense-main strong {
  margin-bottom: 4px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-main small {
  color: var(--muted);
  font-size: 10px;
}

.expense-amount {
  text-align: right;
}

.expense-amount strong,
.expense-amount small {
  display: block;
}

.expense-amount strong {
  font-family: Georgia, serif;
}

.expense-amount small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.settlement-panel {
  padding: 20px;
  background: #edf1e9;
}

.settlement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(66, 91, 69, 0.18);
}

.settlement-row > div {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.mini-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
}

.settlement-row strong {
  color: var(--brick);
  font-family: Georgia, serif;
}

.full-button {
  width: 100%;
}

.settlement-panel .full-button {
  margin-top: 17px;
}

.collab-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  margin: 0 0 40px;
  padding: 21px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--blue-soft);
}

.collab-note > svg {
  width: 27px;
  height: 27px;
  color: var(--blue);
}

.collab-note p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.collab-note button {
  padding: 8px 13px;
  border: 1px solid var(--blue);
  border-radius: 5px;
  background: transparent;
  color: #285e6c;
  font-weight: 800;
}

.profile-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 17px;
  align-items: center;
  padding: 42px 0 28px;
}

.profile-heading h1 {
  margin-bottom: 5px;
  font-size: 30px;
}

.profile-avatar {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: "Songti SC", serif;
  font-size: 24px;
  font-weight: 800;
}

.saved-trip-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--brick-soft);
}

.saved-trip-strip > div > span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--brick);
  font-size: 10px;
  font-weight: 800;
}

.saved-trip-strip h2 {
  margin-bottom: 5px;
  font-size: 22px;
}

.saved-trip-strip p {
  color: var(--muted);
  font-size: 11px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  padding: 30px 0 45px;
}

.checklist-section,
.tool-section {
  padding: 22px;
}

.checklist {
  border-top: 1px solid var(--line);
}

.check-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.check-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.check-item:has(input:checked) span {
  color: var(--muted);
  text-decoration: line-through;
}

.checklist-section > .text-button {
  margin-top: 13px;
  font-size: 12px;
}

.tool-list {
  border-top: 1px solid var(--line);
}

.tool-list > button {
  display: grid;
  width: 100%;
  min-height: 72px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.tool-list > button:hover strong {
  color: var(--green);
}

.tool-list > button > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.tool-list small {
  color: var(--muted);
  font-size: 10px;
}

.tool-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
}

.tool-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.tool-icon.red {
  background: var(--brick-soft);
  color: var(--brick);
}

.tool-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.tool-icon.yellow {
  background: var(--yellow-soft);
  color: #765d21;
}

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  width: min(680px, calc(100% - 32px));
  height: var(--nav-height);
  grid-template-columns: repeat(4, 1fr);
  padding: 7px;
  border: 1px solid rgba(216, 211, 198, 0.9);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 12px 35px rgba(36, 47, 40, 0.16);
  backdrop-filter: blur(20px);
  transform: translateX(50%);
}

.bottom-nav button {
  position: relative;
  display: grid;
  grid-template-rows: 25px auto;
  place-items: center;
  padding: 7px 5px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.bottom-nav button.is-active {
  background: var(--ink);
  color: #fff;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
}

.nav-dot {
  position: absolute;
  top: 9px;
  right: calc(50% - 18px);
  width: 6px;
  height: 6px;
  border: 1px solid var(--surface);
  border-radius: 50%;
  background: var(--brick);
}

.floating-ai {
  position: fixed;
  z-index: 49;
  right: max(calc((100vw - 1120px) / 2), 30px);
  bottom: 104px;
  display: flex;
  height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--green);
  border-radius: 22px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 24px rgba(39, 63, 46, 0.26);
  font-size: 12px;
  font-weight: 800;
}

.floating-ai:hover {
  background: #324b37;
}

.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(22, 29, 25, 0.48);
}

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

.bottom-sheet,
.dialog-card {
  width: min(100%, 620px);
  max-height: min(780px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 20px 70px rgba(14, 22, 17, 0.25);
  animation: sheet-up 260ms ease-out;
}

.bottom-sheet {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.sheet-header > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sheet-header h2 {
  margin-bottom: 3px;
  font-size: 20px;
}

.sheet-header p {
  color: var(--muted);
  font-size: 11px;
}

.sheet-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.sheet-icon.brick {
  background: var(--brick-soft);
  color: var(--brick);
}

.sheet-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.quick-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 18px 0;
}

.quick-prompts button {
  flex: 0 0 auto;
  min-height: 34px;
  background: var(--surface);
  font-size: 11px;
}

.chat-log {
  min-height: 240px;
  max-height: 390px;
  overflow-y: auto;
  padding: 18px;
}

.message {
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
}

.message-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}

.message-avatar svg {
  width: 15px;
  height: 15px;
}

.message p {
  max-width: 82%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-line;
}

.message.is-pending p {
  color: var(--muted);
  font-style: italic;
}

.user-message {
  justify-content: flex-end;
}

.user-message p {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding: 14px 18px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.chat-input input {
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  outline: 0;
}

.chat-input button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}

.chat-input button:disabled,
.quick-prompts button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.dialog-card {
  align-self: center;
}

.dialog-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.dialog-form label {
  display: grid;
  gap: 8px;
}

.dialog-form > label > input,
.dialog-form select {
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.currency-input.large {
  height: 60px;
}

.currency-input.large input {
  font-family: Georgia, serif;
  font-size: 27px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
}

.export-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 20px;
}

.export-options label {
  position: relative;
}

.export-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.export-options span {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 750;
}

.export-options input:checked + span {
  border-color: var(--green);
  background: var(--green-soft);
}

.export-dialog > .full-button,
.route-dialog > .full-button {
  width: calc(100% - 40px);
  margin: 0 20px 20px;
}

.route-edit-list {
  padding: 10px 20px 18px;
}

.route-edit-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.route-edit-item > span:first-child {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 11px;
}

.route-edit-actions {
  display: flex;
  gap: 4px;
}

.route-edit-actions button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.toast-region {
  position: fixed;
  z-index: 200;
  top: 82px;
  left: 50%;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100% - 30px));
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
  animation: toast-in 230ms ease-out;
}

.toast svg {
  width: 17px;
  height: 17px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  .app-shell {
    width: 100%;
    box-shadow: none;
  }

  .topbar {
    height: 64px;
    padding: 0 17px;
  }

  .brand-button strong {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .page {
    min-height: calc(100vh - 64px);
    padding: 0 17px calc(var(--nav-height) + 56px);
  }

  .hero-art {
    min-height: 0;
    grid-template-rows: 250px auto;
    margin: 0 -17px;
  }

  .hero-copy {
    padding: 21px 20px 23px;
  }

  .hero-copy h1 {
    font-size: 29px;
  }

  .planner-section,
  .local-picks,
  .member-band,
  .ledger-section {
    padding: 31px 0;
  }

  .section-heading h2,
  .ledger-topline h2,
  .day-heading h2,
  .budget-band h2,
  .checklist-section h2,
  .tool-section h2 {
    font-size: 22px;
  }

  .planner-form {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 18px;
  }

  .field-wide,
  .generate-button {
    grid-column: 1;
  }

  .generate-button span {
    display: none;
  }

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

  .tip-strip article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tip-strip article:last-child {
    border-bottom: 0;
  }

  .page-header {
    padding: 31px 0 21px;
  }

  .page-header h1 {
    font-size: 29px;
  }

  .trip-status-band {
    margin: 0 -17px;
    padding: 15px 17px;
  }

  .trip-status-band button {
    flex: 0 0 auto;
  }

  .day-tabs {
    margin-right: -17px;
    margin-left: -17px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .route-layout,
  .ledger-columns,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .map-panel {
    position: static;
  }

  .map-paper {
    min-height: 290px;
  }

  .budget-band {
    grid-template-columns: 1fr auto;
    gap: 17px;
    padding: 20px 0;
  }

  .budget-total {
    padding: 0 0 0 17px;
    border-right: 0;
  }

  .budget-breakdown {
    grid-column: 1 / -1;
    padding-top: 17px;
    border-top: 1px solid var(--line);
  }

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

  .ledger-summary div {
    padding: 16px 10px;
  }

  .ledger-summary strong {
    font-size: 20px;
  }

  .collab-note {
    grid-template-columns: auto 1fr;
  }

  .collab-note button {
    grid-column: 2;
    justify-self: start;
  }

  .saved-trip-strip {
    align-items: flex-start;
  }

  .saved-trip-strip .secondary-button {
    flex: 0 0 auto;
    font-size: 11px;
  }

  .floating-ai {
    right: 18px;
    bottom: 101px;
  }

  .bottom-nav {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 18px);
  }
}

@media (max-width: 480px) {
  .topbar-actions #weatherButton {
    display: none;
  }

  .hero-art {
    grid-template-rows: 226px auto;
  }

  .hero-art img {
    object-position: 52% 48%;
  }

  .hero-copy h1 {
    font-size: 26px;
  }

  .hero-meta {
    gap: 11px;
    font-size: 11px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .segment-control button {
    height: 44px;
    font-size: 12px;
  }

  .choice-chips button {
    padding: 0 10px;
    font-size: 12px;
  }

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

  .day-heading .text-button {
    flex: 0 0 auto;
  }

  .route-panel {
    padding: 18px 14px;
  }

  .timeline-item {
    grid-template-columns: 35px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .route-index {
    width: 34px;
    height: 34px;
  }

  .route-info h3 {
    font-size: 16px;
  }

  .route-meta > span {
    display: none;
  }

  .budget-breakdown {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 15px;
  }

  .member-list {
    gap: 16px;
  }

  .ledger-summary {
    margin-right: -17px;
    margin-left: -17px;
  }

  .ledger-summary div {
    padding: 15px 8px;
  }

  .ledger-summary strong {
    font-size: 17px;
  }

  .expense-item {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .profile-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-heading .icon-button {
    display: none;
  }

  .profile-avatar {
    width: 51px;
    height: 51px;
  }

  .profile-heading h1 {
    font-size: 23px;
  }

  .saved-trip-strip {
    display: grid;
  }

  .saved-trip-strip .secondary-button {
    justify-self: start;
  }

  .export-options {
    grid-template-columns: 1fr;
  }

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

  .modal-layer {
    padding: 9px;
  }

  .floating-ai span {
    display: none;
  }

  .floating-ai {
    width: 44px;
    justify-content: center;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
