:root {
  color-scheme: light;
  --paper: var(--gibbon-cream);
  --ink: var(--gibbon-espresso);
  --muted: var(--gibbon-muted);
  --line: var(--gibbon-line);
  --accent: var(--gibbon-honey);
  --forest: var(--gibbon-olive);
  --surface: var(--gibbon-surface);
  --display: var(--gibbon-display);
  --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: #edf0e3; }

.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: #705846; }
.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 #51321d26;
}
.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 #d9d4bf;
  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: #edf0e3;
}
.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: -.025em; }
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: #f5f0e7;
}
.hero-location {
  position: absolute;
  right: 24px;
  bottom: 20px;
  padding: 6px 12px;
  border-radius: 100px;
  color: #fff;
  background: #51321dd9;
  font-size: .875rem;
  font-weight: 600;
}

.hero-location { padding-right: 45px; text-decoration: none; }
.hero-location:hover { background: #51321d; }
.hero-location .hero-location-mascot { position: absolute; width: 32px; height: 32px; right: 6px; top: 50%; transform: translateY(-50%); 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: #47601c; }
.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: #f5f0e7; background: #51321d85; }
.button-on-image:hover { background: #51321d; }

.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: #edf0e3; 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: #705846; }
.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 .trip-image img { transform: scale(1.045); }
.tone1 { background-color: #47601c; }
.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 #d9d4bf;
  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, #51321dd9, #51321d66 77%), linear-gradient(0deg, #51321d55, 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 .trip-image img { transition: none; }
  .trip-card:hover .trip-image 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: #edf0e3;
  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: #f5f0e7; border-color: #d9d4bf; }
.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: #edf0e3; }
.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 #d9d4bf; 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: #edf0e3;
}
.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 #705846;
  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: #705846; }
.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: #f5f0e7; }
.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: #f5f0e7; }

[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 .trip-image img { transition: none; }
[data-motion="reduced"] .trip-card:hover .trip-image img { transform: none; }

/* Keep the lockup and heading treatment consistent through Studio and Settings. */
.site-header { background:var(--gibbon-surface); }
.site-footer .gibbon-lockup { width:114px; }
.brand { flex-shrink:0; }
nav [aria-current="page"] { text-decoration-color:var(--gibbon-clay); }
.site-main :is(h1,h2,h3) { font-family:var(--gibbon-display); font-weight:400; }

/* Extend the identity to the text in Studio's navigation and header hierarchy. */
.top-nav :is(.nav-links a,.language-switch,.profile-link),
.category-nav a,
.settings-nav-label,
.site-main :is(.kicker,.trip-info > strong,.ai-trip-card strong) {
  font-family:var(--gibbon-display);
  font-weight:400;
}
.top-nav :is(.nav-links a,.profile-link) { font-size:1.04rem; letter-spacing:.015em; }
.category-nav a,.settings-nav-label { font-size:1rem; letter-spacing:.02em; }
.top-nav .nav-links a { color:var(--gibbon-espresso); }
.top-nav .nav-links [aria-current="page"] {
  color:var(--gibbon-olive);
  text-decoration-color:var(--gibbon-clay);
  text-decoration-thickness:2px;
}
.top-nav .profile-link { border-color:var(--gibbon-line); color:var(--gibbon-espresso); }
.top-nav .profile-link:hover { background:var(--gibbon-soft-olive); }
.top-nav .language-switch { color:var(--gibbon-olive); }
.site-main :is(.hero-copy,.detail-copy,.ai-destination) .kicker { color:var(--gibbon-soft-honey); }
.site-main :where(h4,h5,h6) { color:var(--gibbon-espresso); letter-spacing:.005em; }
@media(max-width:600px) {
  .top-nav :is(.nav-links a,.profile-link) { font-size:1rem; }
}

/* Only the unfiltered Explore landing uses an edge-to-edge first screen. */
body:has(> .site-main > .discover-hero) {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto auto;
}
body:has(> .site-main > .discover-hero) > .site-header {
  grid-area:1 / 1;
  align-self:start;
  z-index:2;
  background:rgb(255 253 248 / 94%);
  border-bottom-color:rgb(255 253 248 / 42%);
  backdrop-filter:blur(8px);
}
.site-main:has(> .discover-hero) {
  grid-area:1 / 1;
  width:100%;
  min-width:0;
  padding-top:0;
}
body:has(> .site-main > .discover-hero) > .site-footer { grid-area:2 / 1; }
.landing-content,.landing-hero-tools {
  width:min(100% - var(--gutter) * 2, 1344px);
  margin-inline:auto;
}
.landing-content { min-width:0; }
.discover-hero {
  min-height:100vh;
  min-height:100svh;
  display:grid;
  grid-template-rows:1fr auto;
  align-items:center;
  border-radius:0;
  overflow:visible;
  padding-top:80px;
  background:var(--gibbon-espresso);
}
.discover-hero .hero-photo { object-position:50% 53%; }
.discover-hero::after {
  background:
    radial-gradient(ellipse at 50% 51%,rgb(26 19 14 / 58%) 0%,rgb(26 19 14 / 32%) 39%,transparent 73%),
    linear-gradient(0deg,rgb(26 19 14 / 60%),transparent 35%);
}
.discover-hero .hero-copy {
  justify-self:center;
  text-align:center;
  max-width:min(100% - var(--gutter) * 2, 840px);
  padding:clamp(28px,6vh,70px) 0;
  text-shadow:0 2px 24px rgb(26 19 14 / 45%);
}
.discover-hero .hero-copy h1 { font-size:clamp(4rem,9vw,8.35rem); }
.discover-hero .hero-copy > p:not(.kicker) { margin-inline:auto; }
.discover-hero .hero-actions { justify-content:center; text-shadow:none; }
.discover-hero .button-accent:hover { background:#e9b46b; }
.landing-hero-tools {
  display:flex;
  align-items:end;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  padding-bottom:clamp(20px,4vh,42px);
}
.landing-hero-tools .timing-bar { margin:0; color:var(--ink); }
.landing-hero-tools .timing-panel { top:auto; bottom:calc(100% + 8px); }
.landing-hero-tools .hero-location { position:relative; inset:auto; margin-left:auto; }
@media(max-width:640px) {
  .discover-hero .hero-photo { object-position:56% 50%; }
  .discover-hero::after {
    background:linear-gradient(180deg,transparent 11%,rgb(26 19 14 / 57%) 38%,rgb(26 19 14 / 40%) 70%,rgb(26 19 14 / 59%));
  }
}

.hero-step[hidden],.hero-rotation[hidden] { display:none; }
.hero-step {
  position:absolute;
  z-index:1;
  top:50%;
  transform:translateY(-50%);
  width:48px;
  height:48px;
  padding:0;
  border:1px solid rgb(255 253 248 / 60%);
  border-radius:50%;
  color:#fff;
  background:rgb(29 21 14 / 62%);
  backdrop-filter:blur(4px);
}
.hero-step-prev { left:max(14px, var(--gutter)); }
.hero-step-next { right:max(14px, var(--gutter)); }
.hero-step:hover { background:var(--gibbon-espresso); }
.hero-step:focus-visible,.hero-rotation button:focus-visible { outline-color:var(--gibbon-honey); }
/* Keep the playback affordance centered and let the photograph show through it. */
.hero-rotation {
  position:absolute;
  z-index:1;
  left:50%;
  bottom:clamp(20px,4vh,42px);
  transform:translateX(-50%);
}
.hero-rotation button {
  width:44px;
  min-height:44px;
  padding:0;
  border:0;
  border-radius:50%;
  color:rgb(255 253 248 / 74%);
  background:rgb(19 15 11 / 15%);
  backdrop-filter:blur(4px);
}
.hero-rotation button:hover,.hero-rotation button:focus-visible {
  color:var(--gibbon-surface);
  background:rgb(19 15 11 / 38%);
}
.hero-rotation button[data-playing="true"] [data-hero-play-icon],
.hero-rotation button[data-playing="false"] [data-hero-pause-icon] { display:none; }
.discover-hero[data-hero-current="bled"] .hero-photo { object-position:50% 49%; }
.discover-hero[data-hero-current="kyoto"] .hero-photo { object-position:50% 54%; }
.discover-hero[data-hero-current="porto"] .hero-photo { object-position:50% 58%; }
/* Context, fit, and save controls are shared across Explore and destination detail. */
.travel-context { margin:18px 0; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--surface); display:flex; flex-wrap:wrap; align-items:start; gap:5px 16px; }
.travel-context-details { flex:1 1 270px; min-width:0; }
.travel-context-details summary { padding:4px 0; color:var(--ink); cursor:pointer; }
.travel-context-details summary span { color:var(--muted); margin-left:.4em; overflow-wrap:anywhere; }
.travel-context-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:12px; margin-top:12px; }
.travel-context-form label { display:grid; align-content:start; gap:5px; font-size:.875rem; font-weight:650; }
.travel-context-form :is(input,select) { width:100%; min-width:0; padding:8px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:var(--surface); font:inherit; }
.travel-context-form p { margin:0; font-size:.8rem; color:var(--muted); grid-column:1/-1; }
.travel-context-form button { justify-self:start; }
.travel-context-meta { margin:4px 0 0; font-size:.9rem; color:var(--muted); }
.travel-fit { border:1px solid var(--line); border-left:5px solid var(--gibbon-olive); border-radius:14px; background:var(--surface); padding:16px 18px; margin:18px 0; }
.travel-fit[data-travel-fit="longer"],.travel-fit[data-travel-fit="unknown"] { border-left-color:var(--gibbon-clay); }
.travel-fit h2 { font-size:clamp(1.42rem,3vw,2rem); }
.travel-fit p { margin:8px 0 0; }
.travel-fit-actions { display:flex; flex-wrap:wrap; gap:8px 18px; margin-top:12px; }
.shortlist-form { margin-top:14px; }
.shortlist-form button { background:var(--gibbon-olive); }
.trip-photo-placeholder { display:grid; justify-items:center; align-content:center; gap:8px; min-height:100%; padding:16px; text-align:center; font-size:.82rem; font-weight:650; background:var(--gibbon-cream); color:var(--gibbon-muted); }
.trip-photo-placeholder span { font-size:2rem; color:var(--gibbon-clay); }
@media print {
  .site-header,.site-footer,.studio-swing-loader,.timing-bar,.travel-context,.shortlist-form,.hero-actions,.plan-controls,.back-link { display:none !important; }
  .site-main { width:100%; }
  .plan-day { break-inside:avoid; }
}
.editorial-preview summary { font-family:var(--gibbon-display); cursor:pointer; font-size:1.28rem; }
.editorial-preview li + li { margin-top:8px; }

.site-footer .photo-credit-link { display:inline-block; margin-block-start:.8rem; color:var(--muted); font-size:.86rem; text-decoration-thickness:1px; text-underline-offset:.18em; }
.destination-photo-credit { margin:.6rem 0 1rem; color:var(--muted); font-size:.81rem; overflow-wrap:anywhere; }
.destination-photo-credit a { text-underline-offset:.18em; }
.photo-credits-page { max-width:790px; margin-inline:auto; padding:2rem 1rem; }
.photo-credits-page ul { margin-block:1.55rem; padding:0; list-style:none; }
.photo-credits-page li { border-top:1px solid var(--line); padding:.75rem 0; overflow-wrap:anywhere; }
.photo-credits-page li span { display:block; color:var(--muted); margin-block-start:.15rem; }

/* A short catalogue search rather than forcing riders through every shelf. */
.destination-search {
  display:flex; align-items:end; flex-wrap:wrap; gap:9px; max-width:680px; margin:18px 0;
}
.destination-search label { flex:1 1 240px; min-width:0; display:grid; gap:4px; font-weight:750; }
.destination-search input { box-sizing:border-box; width:100%; min-width:0; min-height:44px; }
.destination-search button { min-height:44px; }
.destination-search a { align-self:center; padding:.25rem; }

.plan-export { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; }
.plan-export button { min-height:42px; }
.plan-print-title { display:none; }
@media print {
  .plan-export, [data-plan-storage], [data-plan-transfer] { display:none!important; }
  body[data-print-itinerary] .site-main > :not(#trip-plan), body[data-print-itinerary] .skip-link { display:none!important; }
  body[data-print-itinerary] .plan-print-title { display:block; font-size:1.2rem; font-weight:750;}
  body[data-print-itinerary] #trip-plan { margin:0; }
}

/* Phone layout. Keep the desktop hero positions, but let mobile controls
   participate in document flow: no guessed offsets for wrapped labels. */
.hero-playback { display:contents; }
@media screen and (max-width:680px) {
  :root { --gutter:clamp(13px,3.7vw,22px); }
  .top-nav {
    min-height:0; padding:6px 0 3px; display:grid;
    grid-template-columns:minmax(0,1fr) auto; column-gap:9px; row-gap:2px;
  }
  .top-nav .brand { min-height:44px; min-width:0; margin:0; }
  .top-nav .brand .gibbon-lockup { width:clamp(93px,29vw,126px); }
  .top-nav .nav-actions { grid-row:1; grid-column:2; gap:4px; }
  .top-nav .language-switch { min-width:44px; min-height:44px; display:grid; place-items:center; padding:0 4px; }
  .top-nav .profile-link { min-height:44px; padding:4px .64rem; line-height:1.12; }
  .top-nav .nav-links { grid-row:2; grid-column:1/-1; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px; }
  .top-nav .nav-links a {
    min-width:0; min-height:44px; padding:5px 2px; display:grid; align-content:center;
    text-align:center; font-size:clamp(.83rem,3.75vw,.98rem); line-height:1.1; text-wrap:balance;
  }
  .top-nav .nav-links [aria-current="page"] { text-underline-offset:4px; }
  body:has(> .site-main > .discover-hero) { display:block; }
  body:has(> .site-main > .discover-hero) > .site-header { background:var(--gibbon-surface); }
  .discover-hero {
    width:100%; min-height:max(465px,calc(100vh - 100px)); min-height:max(465px,calc(100svh - 100px)); padding-top:0;
    grid-template-rows:minmax(min-content,1fr) auto; align-items:center;
  }
  .discover-hero .hero-copy,
  .discover-hero:has(.hero-step:not([hidden])) .hero-copy {
    width:min(100% - 2 * var(--gutter),450px); max-width:none;
    padding:clamp(32px,7svh,58px) 0 20px;
  }
  .discover-hero .hero-copy h1 {
    font-size:clamp(2.4rem,10.65vw,4.3rem); line-height:1;
    margin:9px 0; text-wrap:balance; overflow-wrap:anywhere;
  }
  .discover-hero .hero-copy > p:not(.kicker) {
    max-width:31ch; font-size:clamp(.92rem,3.7vw,1.06rem); line-height:1.48; margin:11px auto 16px;
  }
  .discover-hero .hero-actions,.detail-hero .hero-actions,.ai-destination .hero-actions {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:8px;
  }
  .hero-actions > .button {
    min-width:0; min-height:48px; padding:8px 9px; justify-content:center;
    text-align:center; font-size:clamp(.86rem,3.7vw,1rem); line-height:1.14; white-space:normal;
  }
  .hero-actions .destination-flag { flex:none; }
  .discover-hero .landing-hero-tools,
  .discover-hero .landing-hero-tools:has(.hero-rotation:not([hidden])) {
    width:min(100% - 2 * var(--gutter),450px); display:grid; gap:8px;
    grid-template-columns:minmax(0,1fr); align-items:center;
    padding-bottom:max(12px,env(safe-area-inset-bottom));
  }
  .landing-hero-tools .timing-bar {
    display:block; width:100%; max-width:360px; justify-self:center;
  }
  .timing-bar,.timing-control { width:100%; }
  .timing-control summary { display:grid; grid-template-columns:auto minmax(0,1fr) auto; min-height:49px; }
  .timing-control .timing-label span { overflow-wrap:anywhere; }
  .timing-control .timing-panel,
  .landing-hero-tools .timing-panel { position:static; width:100%; margin-top:6px; padding:13px; }
  .landing-hero-tools .timing-reset { display:inline-block; margin-top:7px; padding:7px 9px; color:var(--ink); border-radius:8px; background:var(--surface); }
  .timing-modes span { display:grid; place-items:center; min-height:40px; }
  .landing-hero-tools .hero-location {
    margin:0; min-height:44px; justify-self:center; display:inline-flex; align-items:center; justify-content:center; gap:7px; max-width:100%;
    white-space:normal; text-align:center; font-size:.86rem; line-height:1.15; padding:4px 8px;
  }
  .landing-hero-tools .hero-location > span { min-width:0; overflow-wrap:anywhere; }
  .landing-hero-tools .hero-location .hero-location-mascot { position:static; transform:none; width:23px; height:23px; flex:none; }
  .hero-playback {
    width:100%; display:grid; align-items:center;
    grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr); grid-template-areas:"previous toggle next";
  }
  .hero-playback:not(:has(> :not([hidden]))) { display:none; }
  .hero-playback .hero-step,.hero-playback .hero-rotation {
    position:static; inset:auto; transform:none; width:44px; height:44px; margin:0; padding:0;
  }
  .hero-playback .hero-step-prev { grid-area:previous; justify-self:start; }
  .hero-playback .hero-step-next { grid-area:next; justify-self:end; }
  .hero-playback .hero-rotation { grid-area:toggle; }
  .detail-hero { min-height:270px; }
  .detail-copy { width:100%; min-width:0; padding:20px 16px; }
  .detail-copy h1,.ai-destination h1 { font-size:clamp(2rem,9vw,3.4rem); line-height:1.03; overflow-wrap:anywhere; text-wrap:balance; }
  .detail-copy > p:not(.kicker) { font-size:.94rem; margin:13px 0 16px; }
  .destination-search { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; }
  .destination-search a { grid-column:1/-1; width:fit-content; min-height:44px; display:flex; align-items:center; padding:4px 0; }
  .travel-context-form :is(input,select),.timing-form :is(input,select),.destination-search input,.plan-custom input {
    display:block; width:100%; min-width:0; max-width:100%; min-height:44px; font-size:16px;
  }
  .travel-context-form button { width:100%; min-height:44px; }
  .plan-export,.travel-fit-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; }
  .plan-export[hidden] { display:none; }
  .plan-export > *, .travel-fit-actions > * { min-width:0; min-height:44px; white-space:normal; overflow-wrap:anywhere; }
  .travel-fit-actions > a { display:flex; align-items:center; }
  .plan-controls :is(button,summary) { min-height:44px; }
  .plan-custom input { min-width:0; }
  .plan-custom button { flex:none; }
  .ai-destination-context > div { min-width:0; overflow-wrap:anywhere; }
  .category-nav a { min-height:44px; display:inline-flex; align-items:center; }
}
@media screen and (max-width:400px) {
  .timing-form.timing-exact,.plan-export { grid-template-columns:minmax(0,1fr); }
}
@media screen and (max-width:365px) {
  .discover-hero .hero-actions,.detail-hero .hero-actions,.ai-destination .hero-actions,.travel-fit-actions {
    grid-template-columns:minmax(0,1fr);
  }
  .travel-context,.timing-detail { padding:12px; }
  .destination-search { gap:7px; }
  .destination-search button { padding-inline:.7rem; }
}
@media screen and (max-width:365px) {
  .discover-hero .hero-copy,
  .discover-hero:has(.hero-step:not([hidden])) .hero-copy { padding-block:23px 14px; }
  .discover-hero .landing-hero-tools,
  .discover-hero .landing-hero-tools:has(.hero-rotation:not([hidden])) { gap:6px; }
}

.saved-access { margin:-5px 0 13px; }
.saved-access a { display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:0 11px; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--forest); text-decoration:none; font-size:.94rem; font-weight:700; }
.saved-access a:hover { background:var(--gibbon-soft-olive); }
.saved-access span { border-radius:99px; padding:0 7px; background:var(--gibbon-soft-olive); }
.saved-feedback { display:flex; align-items:center; flex-wrap:wrap; gap:3px 12px; margin:13px 0 0; }
.saved-feedback p { margin:0; }
.saved-ideas-grid { padding:0; list-style:none; margin:16px 0 0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,225px),1fr)); gap:14px; align-items:start; }
.saved-ideas-grid li { min-width:0; max-width:330px; border:1px solid var(--line); border-radius:13px; background:var(--surface); overflow:hidden; }
.saved-ideas-grid .trip-card { border:0; border-radius:0; }
.saved-idea-action { margin:0; }
.saved-ideas-grid .saved-idea-action { padding:0 10px 10px; }
.saved-idea-action button { min-height:44px; max-width:100%; background:var(--gibbon-soft-olive); color:var(--forest); }
.saved-idea-action button:hover { background:var(--forest); color:var(--surface); }
@media screen and (max-width:500px) {
  .saved-ideas-grid { grid-template-columns:minmax(0,1fr); }
  .saved-ideas-grid li { max-width:none; }
  .saved-ideas-grid .saved-idea-action button { width:100%; }
}

@media(max-width:400px){.top-nav .nav-links a{font-size:.78rem;padding-inline:1px}}
