@font-face {
  font-family: "Instrument Sans";
  src: url("./assets/instrumentsans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./assets/bricolagegrotesque.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Instrument Sans", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Instrument Sans", sans-serif;
  --paper: #f6f5ee;
  --white: #fffefa;
  --ink: #152820;
  --muted: #526359;
  --green: #125345;
  --green-dark: #093c32;
  --mint: #e3eee3;
  --line: #e2e5d9;
  --orange: #ffc479;
  --danger: #9c3527;
  --rounded: 26px;
  --focus: #1b7763;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body, input, select, button, textarea { font-family: "Instrument Sans", system-ui, sans-serif; }
button, input, select, textarea { font-size: 1rem; }
input, select, textarea { color: var(--ink); }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--green-dark); text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 2.85vw, 2.2rem); }
h3 { font-size: 1.27rem; }
p { line-height: 1.5; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1250px;
  min-height: 76px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: none;
  border: 0;
  font: 750 1.37rem/1 var(--display);
  letter-spacing: -.045em;
  white-space: nowrap;
}

.brand img { border-radius: 12px; }
.settings { justify-self: end; font-size: 1.3rem; }

.navigation {
  display: flex;
  height: 51px;
  gap: 3px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.navigation button {
  border: 0;
  background: transparent;
  padding: 0 15px;
  border-radius: 12px;
  min-height: 41px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .94rem;
  font-weight: 650;
  color: var(--muted);
}

.navigation button[aria-current] { color: var(--green-dark); background: var(--mint); }

main {
  max-width: 1250px;
  min-height: calc(100vh - 77px);
  padding: 36px 28px 48px;
  margin: 0 auto;
  outline: 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.panel {
  border-radius: var(--rounded);
  border: 1px solid var(--line);
  background: var(--white);
  padding: clamp(20px, 3.3vw, 40px);
}

.hero {
  position: relative;
  display: flex;
  min-height: 630px;
  padding: 42px;
  border-radius: var(--rounded);
  color: white;
  overflow: hidden;
  align-items: flex-end;
  isolation: isolate;
  background: #1e574b;
}

.hero img, .profile-picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 51% 50%;
  z-index: -2;
}

.hero::after, .profile-picture::after {
  position: absolute;
  content: "";
  inset: 0;
  background: linear-gradient(180deg, #0d25290f 24%, #0c2e2a46 57%, #081d18e8 100%);
  z-index: -1;
}

.hero-heading { max-width: 440px; }
.hero-heading h1 { overflow-wrap: anywhere; font-size: clamp(3.6rem, 7vw, 6.4rem); font-weight: 750; }
.hero-heading p { max-width: 340px; color: #f5ffef; font-size: 1.08rem; margin-top: 10px; }
.hero-heading .location { margin: 0 0 7px; }
.location {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 690;
  font-size: .82rem;
  letter-spacing: .045em;
}
.hero .location { color: #ffe5bc; }

.form-heading { margin-bottom: 25px; }
.form-heading p { color: var(--muted); margin-top: 6px; }
.form-fields { display: grid; gap: 19px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .input-label, .field-label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  font-size: .94rem;
  padding: 0;
}

.date-row, .input-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.input-label { min-width: 0; }
.input-label span { display: block; color: var(--muted); font-size: .8rem; font-weight: 550; margin-bottom: 6px; }

input[type="text"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  border: 1px solid #d9e1d5;
  border-radius: 12px;
  background: #fbfcf7;
  min-height: 47px;
  padding: 9px 12px;
  display: block;
  min-width: 0;
  width: 100%;
}

input[type="date"] { appearance: none; }
input::placeholder, textarea::placeholder { color: var(--muted); }

.amount-field {
  display: flex;
  align-items: center;
  padding-left: 13px;
  border: 1px solid #d9e1d5;
  border-radius: 12px;
  background: #fbfcf7;
  color: var(--muted);
}
.amount-field input { border: 0; border-radius: 11px; background: transparent; }
.amount-field > span { font-weight: 680; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
}
.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.chip span {
  pointer-events: none;
  border: 1px solid #dce3d7;
  border-radius: 12px;
  background: #fbfcf7;
  padding: 10px 13px;
  font-size: .92rem;
  font-weight: 600;
}
.chip input:checked + span { border-color: #9ab8a1; background: var(--mint); color: var(--green-dark); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-error { color: var(--danger); font-size: .9rem; }

.button, .icon-button, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 45px;
  border: 1px solid transparent;
  border-radius: 13px;
  text-decoration: none;
  font-weight: 680;
  text-align: center;
}

.button { padding: 10px 16px; }
.button.primary { background: var(--green); color: white; }
.button.primary:not(:disabled):hover { background: var(--green-dark); }
.button.secondary, .icon-button { background: var(--white); color: var(--green-dark); border-color: #dce3d7; }
.button.secondary:not(:disabled):hover, .icon-button:not(:disabled):hover { background: var(--mint); }
.button.wide { width: 100%; }
.button.accent { background: var(--orange); color: #3c2a14; }
.button small, .button span { font-weight: inherit; }
.button.warning { color: var(--danger); background: #fff3ee; border-color: #f4d5ca; }
.icon-button { flex: 0 0 45px; width: 45px; padding: 0; font-weight: 600; }
.text-button { padding: 5px 8px; background: none; color: var(--green-dark); }
.text-button:hover { background: var(--mint); }

.note { font-size: .86rem; color: var(--muted); line-height: 1.45; }
.caption { margin-top: 9px; }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { justify-content: space-between; }

.icon { flex: 0 0 auto; position: relative; display: inline-block; width: 17px; height: 17px; color: currentColor; }
.i-calendar { width: 15px; height: 15px; border: 1.6px solid; border-radius: 4px; }
.i-calendar::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 1.5px solid; }
.i-compass { border: 1.6px solid; border-radius: 50%; }
.i-compass::after {
  content: ""; position: absolute; inset: 3px 5px;
  transform: rotate(30deg); background: currentColor;
  clip-path: polygon(50% 0, 100% 57%, 50% 100%, 0 57%);
}
.i-path::before { content: ""; position: absolute; inset: 3px 3px 3px 4px; border: 1.5px solid; border-right-style: dashed; transform: skew(-15deg); border-radius: 3px; }
.i-path::after { content: ""; position: absolute; bottom: 1px; left: 1px; width: 4px; height: 4px; border: 1.5px solid; border-radius: 50%; background: var(--white); }
.i-pin { width: 12px; height: 12px; border: 1.6px solid; transform: rotate(-45deg); border-radius: 50% 50% 50% 0; }
.i-pin::after { content: ""; position: absolute; left: 3px; top: 3px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.explore-layout { grid-template-columns: minmax(0, .72fr) minmax(0, 1.35fr); align-items: start; }
.explore-summary { display: flex; flex-direction: column; gap: 19px; align-self: start; }
.explore-summary h1 { max-width: 390px; }
.explore-summary > .topline { color: var(--green-dark); margin-bottom: -10px; }
.explore-summary .lead { color: var(--muted); max-width: 34ch; }
.saved-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.saved-list li { display: flex; gap: 9px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: .94rem; }
.saved-list li img { flex: 0 0 36px; width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.saved-list .saved-remove { margin-left: auto; }

.map-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--mint); }
.map-frame iframe { display: block; width: 100%; height: clamp(240px, 34vw, 350px); border: 0; }
.city-frame { margin-top: 10px; }
.city-frame iframe { height: 222px; }
.tag { position: absolute; left: 20px; top: 20px; color: var(--ink); background: #fffef4; }
  position: absolute;
  top: 26px;
  right: 20px;
  background: #dff5d1;
  color: #154832;
  border-radius: 10px;
  font-weight: 700;
  padding: 6px 10px;
  opacity: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 29px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--green-dark);
  padding: 4px 9px;
  font-size: .79rem;
  font-weight: 700;
}
.empty {
  padding: clamp(24px, 5vw, 54px);
  display: grid;
  gap: 14px;
  align-content: center;
  justify-items: start;
  min-height: 235px;
  background: #eff4e9;
  border: 1px dashed #c3d6c5;
  border-radius: 20px;
}
.empty p { color: var(--muted); max-width: 48ch; }

.trip-layout { grid-template-columns: minmax(0, .68fr) minmax(0, 1fr); }
.trip-overview { align-self: start; padding: 0; overflow: hidden; }
.profile-picture {
  min-height: 245px;
  color: white;
  position: relative;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  padding: 24px 25px;
  background: var(--green-dark);
}
.profile-picture h1 { font-size: clamp(2.5rem, 5vw, 4.1rem); }
.profile-picture p { color: #fff3db; margin-top: 3px; }
.trip-stats { display: grid; gap: 14px; padding: 23px; }
.trip-stats .trip-money { background: var(--mint); padding: 17px; border-radius: 17px; }
.day-panel { padding: 24px; align-self: start; min-width: 0; }
.day-panel .day-headline { margin-bottom: 13px; }
.day-tabs {
  display: flex;
  gap: 7px;
  margin: 14px 0 20px;
  overflow-x: auto;
  padding: 4px 4px 9px;
  scrollbar-width: thin;
}
.day-tabs button {
  flex: 0 0 auto;
  border-radius: 12px;
  min-height: 50px;
  padding: 6px 11px;
  border: 1px solid #dce5d8;
  background: var(--white);
  text-align: left;
  font-size: .92rem;
  font-weight: 700;
}
.day-tabs button[aria-pressed="true"] { background: var(--mint); border-color: #aac5ad; color: var(--green-dark); }
.day-tabs button small { display: block; font-size: .75rem; color: var(--muted); font-weight: 500; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 45px 56px minmax(0, 1fr) 45px;
  gap: 11px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time { font-size: .88rem; color: var(--green-dark); font-weight: 700; }
.timeline .place-label { display: grid; gap: 3px; overflow-wrap: anywhere; }
.timeline .place-label strong { line-height: 1.15; }
.timeline .place-label small { font-size: .78rem; color: var(--muted); }
.edit-stop { font-size: 1.37rem; line-height: 1; }
.summary-money { display: grid; gap: 5px; padding: 14px 0 5px; }
.summary-money .money-row { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.route-links { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 15px; }
.route-links select { width: auto; }
.route-pending { display: grid; gap: 9px; border: 1px solid #f2dcb3; border-radius: 13px; background: #fff6e5; padding: 13px; align-items: start; }

dialog {
  width: min(calc(100% - 24px), 550px);
  max-height: min(88vh, 720px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 23px;
  color: var(--ink);
  background: var(--white);
  padding: 22px;
  margin: auto;
  box-shadow: 0 24px 75px #112b2660;
}
dialog::backdrop { background: #142820a8; }
.dialog-heading { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 9px; margin-bottom: 14px; }
.dialog-body { display: grid; gap: 13px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.dialog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dialog-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.dialog-list li strong { display: block; }
.dialog-list .note { margin-top: 3px; display: block; }
.dialog-body textarea { min-height: 150px; resize: vertical; }

.toast {
  position: fixed;
  z-index: 10;
  bottom: 24px;
  left: 50%;
  max-width: calc(100vw - 34px);
  transform: translateX(-50%);
  padding: 12px 17px;
  border-radius: 13px;
  color: white;
  background: var(--green-dark);
  box-shadow: 0 5px 20px #132c2450;
  font-size: .91rem;
  font-weight: 650;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
}
.toast.show { opacity: 1; }

@media (max-width: 820px) {
  .topbar-inner { min-height: 63px; grid-template-columns: 1fr auto; padding: 0 16px; }
  .brand { font-size: 1.28rem; }
  .brand img { width: 38px; height: 38px; }
  .navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: space-evenly;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--line);
    height: auto;
    padding: 6px 9px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .navigation button { min-height: 49px; flex: 1 1 33%; flex-direction: column; gap: 4px; font-size: .78rem; }
  main { padding: 15px 14px 89px; min-height: calc(100vh - 64px); }
  .layout, .explore-layout, .trip-layout { grid-template-columns: 1fr; gap: 13px; }
  .plan-panel { grid-row: 1; }
  .hero { min-height: 227px; padding: 22px; }
  .hero img { object-position: 52% 55%; }
  .hero-heading h1 { font-size: clamp(3.25rem, 10vw, 4.7rem); }
  .hero-heading p { font-size: .91rem; margin-top: 5px; }
  .hero-heading .location { margin-bottom: 2px; }
  .form-heading { margin-bottom: 18px; }
  .form-fields { gap: 14px; }
  .panel { border-radius: 21px; }
  .explore-summary { padding: 15px; gap: 8px; }
  .explore-summary .topline { display: none; }
  .explore-summary h1 { font-size: 2.08rem; }
  .explore-summary .lead { max-width: none; font-size: .91rem; }
  .saved-preview { display: none; }
  .map-frame iframe { height: 240px; }
  .city-frame iframe { height: 209px; }
  .profile-picture { min-height: 175px; padding: 16px 18px; }
  .trip-stats, .day-panel { padding: 16px; }
  .trip-stats .trip-money { padding: 12px; }
  .trip-stats { gap: 9px; }
  .timeline li { grid-template-columns: 36px 44px minmax(0, 1fr) 45px; gap: 8px; padding: 10px 0; }
  .timeline time { font-size: .78rem; }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 360px) {
  .panel { padding-left: 13px; padding-right: 13px; }
  .trip-overview { padding: 0; }
  .chip span { padding: 8px 9px; font-size: .85rem; }
  input[type="date"] { padding-inline: 7px; font-size: .89rem; }
  .timeline li { grid-template-columns: 35px minmax(0, 1fr) 45px; }
}

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

.destination-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.city-status:not(:empty), .city-map { display: block; margin-top: 7px; }
.city-status:empty, .city-choices:empty { display: none; }
.city-choices { display: grid; justify-items: start; gap: 6px; margin-top: 8px; }
.city-choice {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  background: #f1f7ed;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: left;
  font-weight: 650;
}
.city-choice:hover { border-color: var(--green-dark); }
.city-map { width: fit-content; }

.category-panel { align-self: start; display: grid; gap: 16px; }
.category-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.category-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 51px;
  padding: 10px 13px;
  text-align: left;
  font-weight: 690;
  color: var(--green-dark);
  background: #f3f8f0;
  border: 1px solid #d8e3d6;
  border-radius: 13px;
}
.category-choice:hover { background: var(--mint); border-color: #b1c6b3; }
.category-choice span:last-child { color: var(--focus); }
.reset-trip { color: var(--danger); justify-self: start; width: fit-content; }
.place-avatar {
  display: grid;
  position: relative;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green-dark);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 760;
}
.place-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.saved-list .place-avatar { width: 36px; height: 36px; flex-basis: 36px; }
.saved-list .place-avatar img { width: 100%; height: 100%; }
.photo-credit { font-size: .7rem !important; }
.place-label small.timing-warning, .timing-warning { color: var(--danger); }

.deck-content { display: grid; gap: 12px; }
.deck-message { padding: 14px 0; color: var(--muted); }
.deck-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; }
.deck-photo {
  display: grid;
  place-items: center;
  position: relative;
  height: clamp(134px, 33vw, 218px);
  background: #ebf2e9;
  color: var(--muted);
  font-size: .85rem;
}
.deck-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.deck-place { padding: 15px 16px 5px; display: grid; gap: 6px; }
.deck-place h3 { font-size: clamp(1.35rem, 5vw, 1.9rem); overflow-wrap: anywhere; }
.place-rating { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: .82rem; }
.place-rating strong { color: #754a19; padding: 4px 7px; border-radius: 7px; background: #ffedcf; }
.place-rating span, .place-credits { color: var(--muted); }
.place-credits { font-size: .72rem; }
.deck-select { padding: 8px 16px 15px; }
.deck-controls { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: center; }
.deck-controls .button { padding-inline: 8px; min-width: 0; font-size: .88rem; }
.deck-footer, .deck-list { padding-top: 8px; border-top: 1px solid var(--line); }
.deck-list summary, .business-hours summary { cursor: pointer; color: var(--green-dark); font-weight: 670; font-size: .88rem; }
.deck-list ol { display: grid; gap: 2px; margin: 8px 0; padding-left: 23px; }
.deck-list li { font-size: .86rem; }
.deck-list button {
  width: 100%; min-height: 38px; padding: 5px 7px;
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left;
}
.deck-list button[aria-current], .deck-list button:hover { background: var(--mint); }
.business-hours ul { margin-block: 5px; padding-left: 18px; font-size: .84rem; color: var(--muted); }

@media (max-width: 500px) {
  .category-panel { padding: 16px; }
  .category-choice { font-size: .9rem; padding-inline: 9px; }
  .deck-select .button { width: 100%; }
  .deck-place { padding-inline: 12px; }
  .deck-select { padding-inline: 12px; }
}
@media (max-width: 360px) {
  .timeline li { grid-template-columns: 35px 34px minmax(0, 1fr) 32px; gap: 5px; }
  .timeline .place-avatar { width: 34px; height: 34px; }
  .timeline .place-avatar img { display: block; width: 100%; height: 100%; }
  .timeline .edit-stop { width: 32px; }
}
