:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --ink: #14231d;
  --muted: #52635a;
  --line: #dce1d8;
  --accent: #f2a770;
  --forest: #24372f;
  --surface: #fffefa;
  --display: Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.5 system-ui, sans-serif;
}

a { color: inherit; }
a:hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #977039; outline-offset: 4px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 3;
  transform: translateY(-130%);
  padding: 8px 16px;
  background: var(--surface);
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }
.top-nav, .site-main, .site-footer {
  width: min(100% - var(--gutter) * 2, 1344px);
  margin-inline: auto;
}
.top-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}
.top-nav a, .brand { text-decoration: none; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .04em;
  font: 700 2rem/.95 var(--display);
  letter-spacing: -.065em;
}
.brand-mascot {
  flex: none;
  width: 1.35em;
  height: 1.35em;
}
.nav-links, .nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 34px);
}
.nav-links a {
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 600;
  padding: 12px 0;
}
.nav-links a:hover, .nav-links [aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 8px;
}
.nav-actions { margin-left: auto; gap: 14px; }
.language-switch { padding: 9px 5px; font-size: .875rem; font-weight: 750; }
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  padding: 9px 14px;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 650;
}
.profile-link:hover, .profile-link[aria-current="page"] { background: #e9eee5; }

.site-main { padding-top: 24px; min-height: calc(100vh - 180px); }
.site-footer { border-top: 1px solid var(--line); margin-top: 52px; padding: 26px 0 36px; }
.site-footer .brand { font-size: 1.52rem; }

.timing-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.timing-control { position: relative; max-width: 100%; }
.timing-control summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  list-style: none;
}
.timing-control summary::-webkit-details-marker { display: none; }
.timing-control summary:hover, .timing-control[open] summary { border-color: #687e69; }
.timing-control summary svg { flex: 0 0 auto; }
.timing-control[open] .timing-chevron { transform: rotate(180deg); }
.timing-label { display: grid; min-width: 0; gap: 2px; line-height: 1.25; }
.timing-label strong { font-size: .9375rem; }
.timing-label span, .timing-reset { color: var(--muted); font-size: .875rem; }
.timing-reset { text-underline-offset: 3px; }
.timing-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 4;
  width: min(390px, calc(100vw - var(--gutter) * 2));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 40px #14231d26;
}
.timing-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.timing-modes label { position: relative; text-align: center; cursor: pointer; }
.timing-modes input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.timing-modes span { display: block; padding: 7px 5px; border-radius: 7px; font-size: .875rem; font-weight: 650; }
.timing-modes input:checked + span { background: var(--forest); color: white; }
.timing-modes input:focus-visible + span { outline: 3px solid #977039; outline-offset: 2px; }
.timing-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.timing-panel:has(#timing-flexible-mode:checked) .timing-exact,
.timing-panel:has(#timing-exact-mode:checked) .timing-flexible { display: none; }
.timing-form label { display: grid; align-content: start; gap: 5px; min-width: 0; font-size: .875rem; font-weight: 650; }
.timing-form input, .timing-form select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #aebbb0;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.timing-form button { grid-column: 1 / -1; margin-top: 3px; }
.timing-error { margin: 0 0 12px; color: #762f1d; font-size: .9375rem; }
.timing-results {
  scroll-margin-top: 16px;
  padding: clamp(22px, 5vw, 54px);
  border-radius: 16px;
  background: #e8eee5;
}
.timing-results p, .timing-detail p { color: var(--muted); margin: 8px 0 0; }
.timing-empty, .timing-detail { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }

.discover-hero, .detail-hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: clamp(360px, 40vw, 505px);
  border-radius: 22px;
  background: var(--forest);
  color: white;
}
.discover-hero::after, .detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(13, 26, 22, .88), rgba(13, 26, 22, .6) 40%, rgba(13, 26, 22, .06) 80%),
    linear-gradient(0deg, rgba(13, 26, 22, .48), transparent 28%);
}
.hero-photo, .detail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-copy, .detail-copy { max-width: 840px; padding: clamp(28px, 6vw, 88px); }
.kicker { margin: 0; font-size: .8125rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.045em; }
h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); }
.hero-copy h1, .detail-copy h1 { font-size: clamp(3.45rem, 7.5vw, 7.2rem); margin: 12px 0 10px; line-height: .96; }
.hero-copy > p:not(.kicker), .detail-copy > p:not(.kicker) {
  font-size: clamp(1rem, 1.65vw, 1.25rem);
  max-width: 29rem;
  margin: 20px 0 24px;
  color: #f4f4eb;
}
.hero-location {
  position: absolute;
  right: 24px;
  bottom: 20px;
  padding: 6px 12px;
  border-radius: 100px;
  color: #fff;
  background: #17241dd9;
  font-size: .875rem;
  font-weight: 600;
}

.hero-location { padding-right: 45px; text-decoration: none; }
.hero-location:hover { background: #17241d; }
.hero-location img { position: absolute; width: 48px; height: 48px; right: -2px; bottom: 2px; pointer-events: none; }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--forest);
  color: white;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, button:hover { background: #365044; }
.button-accent { background: var(--accent); color: #21180f; }
.button-accent:hover { background: #ffc098; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button-on-image { border-color: #e7ece3; background: #17241d85; }
.button-on-image:hover { background: #17241d; }

.category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 20px 4px 15px;
  margin: 0 -4px;
  scrollbar-width: thin;
}
.category-nav a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}
.category-nav a:first-child, .category-nav a:hover { background: #e8eee5; color: var(--ink); }
.trip-shelf { scroll-margin-top: 20px; margin: 30px 0 0; }
.trip-shelf + .trip-shelf { margin-top: 39px; }
.shelf-heading { margin-bottom: 14px; }
.shelf-heading p { margin: 5px 0 0; color: var(--muted); }
.trip-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 4);
  gap: 16px;
  list-style: none;
  margin: 0 -4px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.trip-row li { min-width: 0; scroll-snap-align: start; scroll-margin-left: 4px; }
.trip-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .2s ease;
}
.trip-card:hover { border-color: #687e69; }
.trip-card:focus-visible { outline-offset: -4px; }
.trip-image { aspect-ratio: 16 / 10; overflow: hidden; background: #6a402b; }
.trip-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.trip-card:hover img { transform: scale(1.045); }
.tone1 { background-color: #30584c; }
.tone2 { background-color: #493858; }
.tone3 { background-color: #4a5e60; }
.tone4 { background-color: #675846; }
.tone5 { background-color: #30596c; }
.trip-info { display: grid; align-content: start; padding: 11px 15px 15px; }
.trip-info > strong { font: 400 clamp(1.4rem, 2.5vw, 2.05rem)/1.12 var(--display); letter-spacing: -.035em; margin: 4px 0; }
.trip-info > span { font-size: .875rem; color: var(--muted); }
.trip-info > .trip-reason { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.trip-reason strong { color: var(--forest); }

.back-link { display: inline-block; font-weight: 650; color: var(--muted); margin: 1px 0 15px; text-underline-offset: 3px; }
.detail-hero { min-height: clamp(355px, 36vw, 455px); }
.detail-hero img { object-position: center 52%; }

.workspace-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  max-width: 960px;
  padding: clamp(20px, 5vw, 48px);
  margin: 8px auto 0;
}
.workspace-panel h1 + p, .workspace-panel section > p { color: var(--muted); margin-top: 10px; }
.workspace-panel h2 { margin-top: 24px; }
.workspace-panel label { display: block; margin: 17px 0; font-weight: 650; }
.workspace-panel input:not([type="hidden"]), .workspace-panel textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  margin-top: 5px;
  border: 1px solid #aebbb0;
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: white;
}
.workspace-panel textarea { min-height: 78px; resize: vertical; }
.workspace-panel textarea[name="name"] { min-height: 44px; }
.workspace-panel form + form { margin-top: 12px; }
.workspace-panel pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.workspace-panel details { margin: 18px 0; }
.group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.group-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.group-card h2 { margin-top: 0; }
.room-list { padding: 0; margin: 14px 0 0; list-style: none; }
.room-list li + li { border-top: 1px solid var(--line); }
.room-list a { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 0; text-decoration: none; }
.room-list a:hover strong { text-decoration: underline; }
.room-list span { color: var(--muted); font-size: .875rem; }
.form-error { border: 1px solid #d6aa9d; border-radius: 10px; background: #f9eae5; color: #762f1d; padding: 12px 16px; max-width: 960px; margin: 8px auto; }

@media (max-width: 900px) {
  .trip-row { grid-auto-columns: calc((100% - 32px) / 3); }
}

@media (max-width: 640px) {
  .top-nav { min-height: 0; padding: 13px 0 8px; gap: 4px 12px; display: grid; grid-template-columns: auto 1fr; }
  .nav-actions { grid-column: 2; grid-row: 1; }
  .nav-links { grid-column: 1 / -1; gap: 22px; }
  .nav-links a { padding-block: 8px; }
  .site-main { padding-top: 14px; }
  .discover-hero, .detail-hero { border-radius: 15px; }
  .hero-copy { padding-bottom: 62px; }
  .hero-location { right: 12px; bottom: 12px; }
  .discover-hero::after, .detail-hero::after { background: linear-gradient(90deg, #0d1a16d9, #0d1a1666 77%), linear-gradient(0deg, #0d1a1655, transparent 40%); }
  .trip-row { grid-auto-columns: min(78%, 265px); gap: 10px; }
  .group-grid { grid-template-columns: 1fr; }
  .trip-shelf + .trip-shelf { margin-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .trip-card, .trip-card img { transition: none; }
  .trip-card:hover img { transform: none; }
}

.itinerary-plan { margin: 40px 0; scroll-margin-top: 20px; }
.itinerary-plan [hidden] { display: none; }
.plan-heading, .plan-day-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
}
.plan-heading .kicker, .plan-day-heading .kicker { color: var(--muted); margin-bottom: 5px; }
.plan-intro { color: var(--muted); margin: 9px 0; }
.plan-progress {
  margin: 0;
  padding: 5px 13px;
  border-radius: 999px;
  background: #e8eee5;
  color: var(--forest);
  font-size: .875rem;
  font-weight: 650;
}
.plan-days { margin: 22px 0 16px; padding: 0; list-style: none; display: grid; gap: 15px; }
.plan-day {
  padding: clamp(14px, 3vw, 22px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.plan-day-heading { justify-content: flex-start; margin-bottom: 14px; }
.plan-day-heading h3 { font-family: var(--display); font-size: 1.65rem; font-weight: 400; }
.plan-blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.plan-slot { display: flex; flex-direction: column; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.plan-slot.plan-accepted { background: #edf2e8; border-color: #b6c8b7; }
.plan-slot-label { font-size: .875rem; color: var(--muted); font-weight: 650; }
.plan-slot h4 { margin: 3px 0; font-size: 1rem; overflow-wrap: anywhere; }
.plan-slot p { margin: 4px 0 0; color: var(--muted); font-size: .9375rem; }
.plan-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; }
.plan-controls button { min-height: 36px; padding: 5px 10px; font-size: .875rem; }
.plan-controls .plan-alternative { border-color: var(--line); color: var(--ink); background: transparent; }
.plan-controls .plan-alternative:hover { background: #e8eee5; }
.plan-custom { flex: 1 0 100%; color: var(--muted); font-size: .875rem; }
.plan-custom summary { width: fit-content; cursor: pointer; }
.plan-custom form { display: flex; gap: 5px; margin-top: 5px; }
.plan-custom input { width: 100%; min-width: 0; padding: 5px 8px; border: 1px solid #aebbb0; border-radius: 7px; color: var(--ink); font: inherit; }
@media (max-width: 780px) {
  .plan-blocks { grid-template-columns: 1fr; }
}
.plan-logistics { margin: 14px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.plan-logistics summary { cursor: pointer; font-weight: 650; color: var(--forest); }
.plan-logistics p { margin: 8px 0 0; color: var(--muted); }

.ai-find-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 30px;
  padding: clamp(18px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #e8eee5;
}
.ai-find-panel > div { max-width: 39rem; }
.ai-find-panel h3 { font-family: var(--display); font-size: 1.5rem; font-weight: 400; }
.ai-find-panel p { margin: 8px 0 0; color: var(--muted); }
.ai-generate-status { margin: 0; font-size: .875rem; }
.ai-generate-status:not(:empty) { margin-top: 8px; }
.ai-generate button:disabled { opacity: .7; cursor: wait; }
.ai-trip-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 238px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ai-trip-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 4px solid #6f8876;
  border-radius: 13px;
  background: var(--surface);
  text-decoration: none;
}
.ai-trip-row li:nth-child(3n + 2) .ai-trip-card { border-top-color: #b37862; }
.ai-trip-row li:nth-child(3n + 3) .ai-trip-card { border-top-color: #8d8150; }
.ai-trip-card:hover { border-color: #687e69; }
.ai-trip-card strong { display: block; margin-top: 4px; font: 400 clamp(1.6rem, 3vw, 2rem)/1.1 var(--display); }
.ai-trip-meta, .ai-trip-style { color: var(--muted); font-size: .875rem; }
.ai-trip-style { margin-top: 5px; font-weight: 650; }
.ai-trip-card p { margin: 12px 0; color: var(--muted); }
.ai-trip-action { margin-top: auto; font-size: .9375rem; font-weight: 650; }
.ai-trip-card:hover .ai-trip-action { text-decoration: underline; }
.ai-destination {
  padding: clamp(24px, 5vw, 58px);
  border-radius: 16px;
  background: var(--forest);
  color: var(--surface);
}
.ai-destination h1 { margin-top: 10px; }
.ai-destination .kicker { color: #e1ece0; }
.ai-destination-summary { max-width: 46rem; margin: 12px 0; font-size: clamp(1.1rem, 2vw, 1.3rem); }
.ai-destination-context {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px 26px;
  max-width: 56rem;
  margin: 24px 0;
}
.ai-destination-context dt { margin-bottom: 5px; font-weight: 700; }
.ai-destination-context dd { margin: 0; color: #e1ece0; }

[data-density="compact"] .trip-row {
  grid-auto-columns: calc((100% - 40px) / 5);
  gap: 10px;
}
[data-density="compact"] .trip-image { aspect-ratio: 16 / 9; }
[data-density="compact"] .trip-info { padding: 9px 11px 11px; }
[data-density="compact"] .trip-info > strong { font-size: clamp(1.25rem, 2vw, 1.7rem); }
[data-density="compact"] .ai-trip-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 206px), 1fr)); gap: 10px; }
[data-density="compact"] .ai-trip-card { padding: 14px; }

@media (max-width: 900px) {
  [data-density="compact"] .trip-row { grid-auto-columns: calc((100% - 30px) / 4); }
}

@media (max-width: 640px) {
  [data-density="compact"] .trip-row { grid-auto-columns: min(60%, 215px); }
}

[data-motion="reduced"] .trip-card,
[data-motion="reduced"] .trip-card img { transition: none; }
[data-motion="reduced"] .trip-card:hover img { transform: none; }
