:root {
  --site-max-width: 60rem;
}

/* Cooperation and policy pages inherit the public shell and type scale. */
.cooperation-page,
.privacy-page {
  max-width: 44rem;
  margin-inline: auto;
  overflow-wrap: anywhere;
}

.cooperation-page h1 {
  max-width: 24ch;
}

.cooperation-lead {
  font-size: 1.1rem;
}

.cooperation-contact {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pico-muted-border-color, #ddd);
}

.cooperation-contact:focus {
  outline: none;
}

.cooperation-form input,
.cooperation-form textarea {
  font-size: max(1rem, 16px);
}

.cooperation-form textarea {
  resize: vertical;
  min-height: 10rem;
}

.cooperation-form small {
  display: block;
  margin-block: -0.5rem 1rem;
}

.form-optional,
.privacy-version,
.cooperation-privacy {
  color: var(--pico-muted-color, #555);
  font-size: 0.9rem;
}

.cooperation-privacy {
  margin-block: 1.5rem;
}

.cooperation-form button {
  min-height: 44px;
}

.form-error-summary,
.form-success,
.policy-draft-notice {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid currentColor;
  border-radius: 0.4rem;
}

.form-error-summary,
.form-field-error {
  color: #a32924;
}

.form-error-summary a {
  color: inherit;
}

.form-success {
  color: #24633b;
}

.form-error-summary h3,
.form-success h3 {
  color: inherit;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.form-error-summary > :last-child,
.form-success > :last-child {
  margin-bottom: 0;
}

.policy-draft-notice {
  font-size: 0.85rem;
  color: #725017;
}

@media (prefers-color-scheme: dark) {
  .form-error-summary,
  .form-field-error {
    color: #ffaaa4;
  }

  .form-success {
    color: #8cdbab;
  }

  .policy-draft-notice {
    color: #edc584;
  }
}

.privacy-contents {
  display: block;
  margin-block: 1.5rem 2rem;
}

.privacy-contents ul {
  display: block;
  padding-left: 1.25rem;
}

.privacy-contents li {
  display: block;
  padding-block: 0.2rem;
}

.privacy-page section {
  margin-top: 2rem;
}

.privacy-page h2,
#contact {
  scroll-margin-top: 1rem;
}

/* Site type root for every page: 1rem = former 0.9rem bubble size, then +1px. */
html {
  font-size: calc(90% + 1px);
}

/* viewport-fit=cover: keep content clear of the notch in landscape. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}

.site-container {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--site-max-width);
  margin-inline: auto;
  padding-inline: var(--pico-spacing, 1rem);
}

body > header.site-header {
  flex-shrink: 0;
  padding-block: 0.39rem;
  border-bottom: 1px solid var(--pico-muted-border-color, #e5e7eb);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: 1.11rem;
}

.site-header-start {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.site-brand {
  color: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* Opens the saved-ideas drawer; only shown under the mobile breakpoint. */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  margin: 0 0 0 -0.6rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0.56rem;
  box-shadow: none;
  color: inherit;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: #ececee;
  color: inherit;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--pico-muted-border-color, #e5e7eb);
  border-radius: 0.35rem;
  color: var(--pico-muted-color, #666);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

a.lang-switcher,
a.lang-switcher:is(:hover, :focus, :active) {
  text-decoration: none;
}

.lang-switcher-flag {
  font-size: 1rem;
  line-height: 1;
}

body > main.site-main {
  flex: 1;
  padding-block: 2rem;
}

/* Trip-ideas strip + footer: identical on every page, full width. */
.seo-nav-compact {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.15rem 1rem;
  box-sizing: border-box;
  margin: 0;
  padding: 0.56rem 1.11rem 0;
  border-top: 1px solid var(--pico-muted-border-color, #ddd);
  font-size: 0.83rem;
  line-height: 1.35;
  color: var(--pico-muted-color, #666);
}

.seo-nav-compact h2 {
  flex-shrink: 0;
  margin: 0;
  font-size: 0.83rem;
  font-weight: 600;
  color: inherit;
}

.seo-nav-compact ul {
  flex: 1 1 28rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  gap: 0.15rem 1rem;
  margin: 0;
}

.seo-nav-compact li {
  padding: 0.15rem 0;
}

.seo-nav-compact a,
.site-footer a {
  color: inherit;
}

.site-footer {
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 0.39rem 0 0;
  padding: 0.39rem 1.11rem 0.5rem;
  border-top: 1px solid var(--pico-muted-border-color, #ddd);
  color: var(--pico-muted-color, #666);
  font-size: 0.76rem;
  line-height: 1.35;
}

.site-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-footer-brand {
  margin: 0;
}

.site-footer-brand a {
  font-weight: 600;
  text-decoration: none;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
}

.site-footer-links li {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Not a link yet; muted text color is kept for contrast, so no opacity. */
.site-footer-pending {
  cursor: default;
}

.form-errors,
.recommend-error {
  margin-bottom: 1rem;
}

.preferences {
  margin-bottom: 1.5rem;
}

.destination {
  margin-bottom: 1rem;
  scroll-margin-top: 1rem;
}

body.chat-page .chat-scroll-area {
  position: relative;
}

body.chat-page .chat-scroll-area--more-below::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  height: 3rem;
  margin-top: -3rem;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--pico-background-color, #fff) 88%, transparent)
  );
}

.destination-photo {
  margin: 0.75rem 0 1rem;
}

.destination-photo img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 0;
}

.destination-photo-credit {
  margin: 0.35rem 0 0;
  font-size: 0.85em;
  line-height: 1.35;
  color: var(--pico-muted-color, #666);
}

.destination-photo-credit .destination-photo-description {
  display: block;
}

.destination-photo-credit a {
  color: inherit;
  text-decoration: underline;
}

.reasons {
  margin-bottom: 0;
}

.tradeoff-notices {
  margin: 0 0 1.25rem;
}

.tradeoff-notice {
  margin: 0 0 0.5rem;
  color: var(--pico-del-color, #a32);
}

.tradeoff-notice:last-child {
  margin-bottom: 0;
}

.caveats {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--pico-del-color, #a32);
  font-size: 0.95em;
}

#results:empty {
  display: none;
}

#results:not(:empty) {
  margin-top: 2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --app-height is the visible viewport height, kept current by chat.js. */
body.chat-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  min-height: 0;
  margin: 0;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  overflow: hidden;
}

body.chat-page > main.chat-app-main {
  display: flex;
  flex: 1;
  align-items: stretch;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.saved-sidebar {
  box-sizing: border-box;
  flex: 0 0 18.33rem;
  width: 18.33rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.94rem 0.78rem 1.39rem;
  background: #f7f7f8;
  border-right: 1px solid var(--pico-muted-border-color, #e5e7eb);
  border-radius: 0;
}

.saved-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.44rem;
  margin-bottom: 1.11rem;
}

/* Drawer-only pieces; the mobile block below shows them. */
.sidebar-close,
.drawer-footer,
.drawer-backdrop {
  display: none;
}

.sidebar-close {
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  margin: 0 0 0 auto;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0.56rem;
  box-shadow: none;
  color: var(--pico-muted-color, #666);
}

.sidebar-close:hover,
.sidebar-close:focus-visible {
  background: #ececee;
  color: inherit;
}

.saved-new-chat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.39rem 0.72rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  box-shadow: none;
  text-decoration: none;
  color: var(--pico-muted-color, #666);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.saved-new-chat-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.saved-new-chat:hover,
.saved-new-chat:focus,
.saved-new-chat:active {
  background: color-mix(in srgb, var(--pico-primary, #0172ad) 10%, transparent);
  border-color: color-mix(in srgb, var(--pico-primary, #0172ad) 28%, transparent);
  box-shadow: none;
  text-decoration: none;
  color: var(--pico-primary, #0172ad);
  outline: none;
}

.saved-new-chat:hover .saved-new-chat-icon,
.saved-new-chat:focus .saved-new-chat-icon {
  opacity: 1;
}

.saved-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.56rem;
  margin: 0 0 0.56rem;
  padding: 0 0.72rem;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--pico-muted-color, #666);
}

.saved-sidebar-title-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.saved-sidebar-title-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.saved-ideas-count {
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0;
}

.saved-ideas-empty {
  margin: 0.39rem 0 0;
  padding: 0 0.72rem;
  font-size: 0.94rem;
  color: var(--pico-muted-color, #666);
}

.saved-ideas-list {
  display: flex;
  flex-direction: column;
  gap: 0.17rem;
  padding: 0 0.72rem;
}

.saved-idea-row {
  display: flex;
  align-items: stretch;
  border-radius: 0.56rem;
}

.saved-idea-row.is-current {
  background: #ececee;
}

.saved-idea-open {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.11rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 0.61rem;
  background: transparent;
  border: none;
  box-shadow: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1.25;
}

.saved-idea-open:hover,
.saved-idea-row:hover {
  background: #ececee;
}

.saved-idea-name {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.87rem;
  font-weight: 500;
}

.saved-idea-meta {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  color: var(--pico-muted-color, #666);
}

.saved-idea-row .saved-idea-remove {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.28rem;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  line-height: 0;
  color: var(--pico-muted-color, #666);
}

.saved-idea-row .saved-idea-remove svg {
  display: block;
}

.saved-idea-row:hover .saved-idea-remove,
.saved-idea-row:focus-within .saved-idea-remove {
  opacity: 1;
}

.saved-idea-row .saved-idea-remove:hover,
.saved-idea-row .saved-idea-remove:focus-visible {
  color: var(--pico-del-color, #a32);
}

.conversations-sidebar-title {
  margin-top: 1.39rem;
}

.history-preference {
  padding: 0 1.1rem;
}

.history-preference label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.history-preference input {
  flex-shrink: 0;
  margin: 0;
}

.history-preference p {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  line-height: 1.5;
}

#history-status:empty {
  display: none;
}

.conversations-list {
  display: flex;
  flex-direction: column;
  gap: 0.17rem;
  padding: 0 0.72rem;
}

.conversation-row {
  display: flex;
  align-items: stretch;
  border-radius: 0.56rem;
}

.conversation-row.is-current {
  background: #ececee;
}

.conversation-open {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.11rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 0.61rem;
  text-align: left;
  background: transparent;
  border: none;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.conversation-open:hover {
  background: rgba(0, 0, 0, 0.04);
}

.conversation-title {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.87rem;
  font-weight: 500;
}

.conversation-meta {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  color: var(--pico-muted-color, #666);
}

.conversation-row .conversation-remove {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.28rem;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  line-height: 0;
  color: var(--pico-muted-color, #666);
}

.conversation-row .conversation-remove svg {
  display: block;
}

.conversation-row:hover .conversation-remove,
.conversation-row:focus-within .conversation-remove {
  opacity: 1;
}

.conversation-row .conversation-remove:hover,
.conversation-row .conversation-remove:focus-visible {
  color: var(--pico-del-color, #a32);
}

/* Full-width column right of the sidebar: the 740px chat shell on top, then
   the trip-ideas strip and footer spanning the whole pane. */
body.chat-page .chat-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

body.chat-page .chat-page-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 740px;
  margin: 0 auto;
  padding: 1.11rem 1.11rem 0.83rem;
  overflow: hidden;
  box-sizing: border-box;
}

body.chat-page .chat-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.chat-page .chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.83rem;
  margin: 0 0 1.11rem;
}

body.chat-page .chat-scroll-area--welcome {
  display: flex;
  flex-direction: column;
}

body.chat-page .chat-scroll-area--welcome .chat-thread,
body.chat-page .chat-scroll-area--welcome .chat-results {
  display: none;
}

body.chat-page .chat-welcome {
  flex: 0 0 auto;
  width: 100%;
  max-width: 38rem;
  margin: auto;
  padding-block: 1.5rem;
  text-align: center;
}

body.chat-page .chat-welcome[hidden] {
  display: none;
}

body.chat-page .chat-welcome-title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
}

body.chat-page .chat-welcome-description {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--pico-muted-color, #666);
  font-size: 1rem;
  line-height: 1.5;
}

body.chat-page .chat-bubble {
  max-width: 70%;
  margin: 0;
  border: none;
  padding: 0.78rem 1.06rem;
  border-radius: 1rem;
  font-size: 1rem;
}

body.chat-page .chat-bubble strong {
  display: none;
}

body.chat-page .chat-bubble-assistant {
  align-self: flex-start;
  margin-right: auto;
  background: #f3f4f6;
}

body.chat-page .chat-bubble-user {
  align-self: flex-end;
  margin-left: auto;
  background: #eef4f8;
}

body.chat-page .chat-bubble p {
  margin: 0;
}

body.chat-page .chat-bubble-text p {
  margin: 0 0 0.75rem;
}

body.chat-page .chat-bubble-text p:last-child {
  margin-bottom: 0;
}

body.chat-page .chat-bubble-text a {
  color: var(--pico-primary, #0172ad);
}

body.chat-page .chat-bubble-streaming p,
body.chat-page .chat-bubble-streaming .chat-bubble-text {
  min-height: 1.25em;
}

body.chat-page .chat-composer {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0.56rem 0 0;
}

body.chat-page .chat-composer-field {
  position: relative;
}

body.chat-page .chat-composer textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  /* One line by default; grow to 3 lines, then scroll. */
  min-height: calc(1.56rem + 1.45em + 2px);
  max-height: calc(1.56rem + 3 * 1.45em + 2px);
  margin: 0;
  /* Right padding leaves room for the send/stop button. */
  padding: 0.78rem 2.4rem 0.78rem 1.06rem;
  border: 1px solid color-mix(in srgb, var(--pico-primary, #0172ad) 35%, #c5d5e0);
  border-radius: 1rem;
  background: #eef4f8;
  color: inherit;
  font-size: 1rem;
  line-height: 1.45;
  overflow-y: auto;
  resize: none;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.chat-page .chat-composer textarea:focus,
body.chat-page .chat-composer textarea:focus-visible {
  border-color: var(--pico-primary, #0172ad);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pico-primary, #0172ad) 18%, transparent);
}

/* Send / stop share one slot; 25% larger than the textarea font size. */
body.chat-page .chat-composer-btn {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  min-width: 0;
  height: 1.25em;
  margin: 0;
  padding: 0;
  background: var(--pico-primary-background, #0172ad);
  border: none;
  border-radius: 50%;
  box-shadow: none;
  color: var(--pico-primary-inverse, #fff);
  font-size: 1rem;
  line-height: 1;
  transform: translateY(-50%);
}

body.chat-page .chat-composer-btn svg {
  display: block;
  width: 0.7em;
  height: 0.7em;
}

body.chat-page .chat-composer-btn[hidden] {
  display: none;
}

body.chat-page .chat-composer-btn:hover,
body.chat-page .chat-composer-btn:focus-visible {
  background: var(--pico-primary-hover-background, #015887);
}

body.chat-page .chat-composer-btn:focus-visible {
  outline: 2px solid var(--pico-primary, #0172ad);
  outline-offset: 2px;
}

body.chat-page .chat-phase,
body.chat-page .chat-results,
body.chat-page #chat-alerts:empty {
  margin: 0;
}

body.chat-page .chat-phase {
  color: var(--pico-muted-color, #666);
  font-style: italic;
}

body.chat-page .chat-phase-detail {
  display: block;
  margin-top: 0.28rem;
  font-style: normal;
  opacity: 0.85;
}

body.chat-page .chat-results {
  margin-top: 1.67rem;
}

body.chat-page .chat-results .destinations,
body.chat-page .saved-idea-preview .destination,
body.chat-page .saved-idea-preview .preferences {
  font-size: 1rem;
  line-height: 1.45;
}

body.chat-page .chat-results .destinations h2,
body.chat-page .saved-idea-preview .preferences h2 {
  font-size: 1.11rem;
  line-height: 1.35;
}

body.chat-page .chat-results .destination h3,
body.chat-page .saved-idea-preview .destination h3 {
  font-size: 1.06rem;
  line-height: 1.35;
}

body.chat-page .chat-results .destination p,
body.chat-page .saved-idea-preview .destination p,
body.chat-page .chat-results .preferences ul,
body.chat-page .saved-idea-preview .preferences ul,
body.chat-page .chat-results .reasons,
body.chat-page .saved-idea-preview .reasons,
body.chat-page .chat-results .tradeoff-notices,
body.chat-page .chat-results .caveats,
body.chat-page .saved-idea-preview .caveats {
  font-size: inherit;
}

body.chat-page .chat-alert {
  margin: 1.11rem 0;
  color: var(--pico-del-color, #a32);
}

body.chat-page .chat-caret {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: currentColor;
  animation: chat-caret-blink 1s steps(1) infinite;
}

@keyframes chat-caret-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.seo-niche .seo-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
}

.seo-niche .seo-highlights li {
  flex: 1 1 20rem;
  min-width: 0;
  list-style: none;
}

.seo-niche .seo-prompt {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 44px;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 1.5rem;
  background: var(--pico-card-background-color);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.seo-niche .seo-prompt:hover {
  border-color: var(--pico-primary);
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
}

.seo-niche .seo-prompt:focus-visible {
  outline: 3px solid var(--pico-primary);
  outline-offset: 3px;
}

.seo-niche a {
  color: inherit;
}

.seo-niche .seo-back {
  margin-bottom: 0;
}

.destination header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.destination header h3 {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.destination-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.save-idea-btn,
.accommodation-btn,
.destination-actions .saved-idea-remove {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.22rem 0.78rem;
  font-size: 0.85em;
  font-weight: 500;
  white-space: nowrap;
}

.accommodation-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pico-primary-border);
  border-radius: var(--pico-border-radius);
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
  text-decoration: none;
}

.accommodation-btn:hover {
  border-color: var(--pico-primary-hover-border);
  background: var(--pico-primary-hover-background);
  color: var(--pico-primary-inverse);
  text-decoration: none;
}

.accommodation-btn:focus-visible {
  outline: 3px solid var(--pico-primary-focus);
  outline-offset: 2px;
}

.save-idea-btn.is-saved {
  background: transparent;
  border: 1px solid var(--pico-muted-border-color, #ccc);
  color: inherit;
}

.saved-idea-preview {
  margin: 0 0 1.39rem;
}

.saved-idea-preview:not([hidden]) {
  padding-bottom: 1.11rem;
  border-bottom: 1px solid var(--pico-muted-border-color, #ddd);
}

body.chat-page.viewing-saved-idea .chat-page-shell {
  overflow-y: auto;
}

body.chat-page.viewing-saved-idea #chat-scroll-area,
body.chat-page.viewing-saved-idea .chat-composer,
body.chat-page.viewing-saved-idea .chat-pane > .seo-nav {
  display: none;
}

body.chat-page.viewing-saved-idea .saved-idea-preview:not([hidden]) {
  border-bottom: none;
  padding-bottom: 0;
}

.saved-idea-preferences {
  margin-top: 1.39rem;
}

.saved-idea-back {
  margin: 0 0 0.83rem;
}

.saved-idea-back-btn {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.saved-idea-detail .saved-idea-detail-remove {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.28rem;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--pico-muted-color, #666);
  line-height: 0;
  flex-shrink: 0;
}

.saved-idea-detail .saved-idea-detail-remove:hover,
.saved-idea-detail .saved-idea-detail-remove:focus-visible {
  color: var(--pico-del-color, #a32);
}

.saved-idea-detail .saved-idea-detail-remove svg {
  display: block;
}

.saved-idea-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.83rem;
  margin: 0.94rem 0 0.28rem;
}

.saved-idea-plan-note {
  margin: 0;
  font-size: 0.85em;
  color: var(--pico-muted-color, #666);
}

/* Mobile: one breakpoint for every page. Media queries resolve em against the
   browser default (16px), not the site root, so 47.99em is just under 768px. */
@media (max-width: 47.99em) {
  body > header.site-header {
    padding-block: 0;
  }

  .site-header-inner {
    min-height: 44px;
    padding-inline: 0.83rem;
  }

  .site-brand {
    font-size: 1.11rem;
  }

  body.chat-page .sidebar-toggle {
    display: inline-flex;
  }

  /* Sidebar becomes an off-canvas drawer over a backdrop. */
  body.chat-page .saved-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: min(85vw, 20rem);
    padding-top: 0.5rem;
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: max(0.78rem, env(safe-area-inset-left));
    border-right: none;
    box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.18);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }

  body.chat-page.drawer-open .saved-sidebar {
    transform: none;
    visibility: visible;
    transition: transform 0.2s ease;
  }

  body.chat-page .saved-sidebar-header {
    margin-bottom: 0.56rem;
  }

  body.chat-page .sidebar-close {
    display: inline-flex;
  }

  body.chat-page .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 29;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  }

  body.chat-page.drawer-open .drawer-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease;
  }

  /* Shared footer lives at the bottom of the drawer instead of under the composer. */
  body.chat-page .chat-pane > .seo-nav,
  body.chat-page .chat-pane > .site-footer {
    display: none;
  }

  body.chat-page .drawer-footer {
    display: block;
    margin-top: auto;
    padding-top: 1.39rem;
  }

  body.chat-page .drawer-footer .seo-nav-compact {
    padding: 0.56rem 0.72rem 0;
  }

  body.chat-page .drawer-footer .site-footer {
    padding: 0.39rem 0.72rem 0.83rem;
  }

  body.chat-page .chat-page-shell {
    padding: 0.75rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  }

  body.chat-page .chat-bubble {
    max-width: 85%;
  }

  .destination-photo img {
    max-height: 200px;
  }

  /* The nav type selector outranks Pico's negative nav ul:first-of-type margins. */
  nav.seo-nav-compact ul {
    flex-basis: 100%;
    justify-content: flex-start;
    margin-inline: 0;
  }

  .site-footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* Touch screens have no hover, so row actions are always visible. */
@media (hover: none), (max-width: 47.99em) {
  .saved-idea-row .saved-idea-remove,
  .conversation-row .conversation-remove {
    opacity: 1;
  }
}

@media (pointer: coarse) {
  .saved-idea-row .saved-idea-remove,
  .destination-actions .saved-idea-remove,
  .conversation-row .conversation-remove,
  .saved-idea-detail .saved-idea-detail-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .saved-new-chat,
  .save-idea-btn,
  .accommodation-btn,
  .saved-idea-back-btn {
    min-height: 44px;
  }

  .save-idea-btn,
  .accommodation-btn {
    padding-inline: 1rem;
  }

  .seo-nav-compact li,
  .site-footer-links li,
  .site-footer-brand {
    padding-block: 0.35rem;
  }

  /* Keep a 44px tap target while the visible circle stays smaller. */
  body.chat-page .chat-composer-btn::before {
    content: "";
    position: absolute;
    inset: -12px;
  }
}

/* iOS zooms into inputs under 16px on focus; the site root is ~15.4px. */
@media (max-width: 47.99em), (pointer: coarse) {
  body.chat-page .chat-composer textarea,
  body.chat-page .chat-composer-btn {
    font-size: max(16px, 1rem);
  }
}

@media (max-width: 47.99em) and (prefers-reduced-motion: reduce) {
  body.chat-page .saved-sidebar,
  body.chat-page .drawer-backdrop {
    transition: none;
  }
}

.geo-credit {
  margin: 0 0 0.35rem;
  font-size: inherit;
}

/* Selection and keyboard focus convey different states. */
nav.lang-switcher { display:flex; gap:.3rem; padding:0; border:0; background:none; }
.lang-switcher a { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:.25rem .5rem; border:3px solid transparent; border-radius:.35rem; color:var(--pico-color); text-decoration:none; }
.lang-switcher a[aria-current="true"] { border-color:currentColor; font-weight:700; }
.lang-switcher a:focus-visible { outline:3px solid var(--pico-primary); outline-offset:3px; }
.language-notice { display:flex; align-items:center; gap:1rem; padding:.4rem 1rem; font-size:.8rem; background:var(--pico-card-background-color); }
.language-notice[hidden] { display:none; }
.language-notice button { margin:0 0 0 auto; padding:.2rem .7rem; }
.destination details {
  --pico-accordion-close-summary-color: var(--pico-primary);
  --pico-accordion-open-summary-color: var(--pico-primary);
  --pico-accordion-active-summary-color: var(--pico-primary);
  margin: .5rem 0 0;
}
.destination summary { font-size:.9rem; }
.contact-form { max-width:40rem; }
.contact-form textarea { min-height:9rem; }
.honeypot { position:absolute; left:-10000px; }
.chat-page .language-notice { flex-shrink:0; }
.chat-page .site-header { flex-shrink:0; }
