:root {
  --ink: #26343a; --ink-soft: #5b6b70; --cal: #fffdf8; --land: #fbf6ec; --terracotta: #c8664a; --sea: #8cc6d6; --line: #e6dcc8;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif; --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cal); color: var(--ink); font: 17px/1.6 var(--body); }
a { color: var(--ink); text-decoration-color: var(--terracotta); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0.3em 0; }
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 14px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line); background: var(--cal); position: sticky; top: 0; z-index: 10; }
.site-header nav { display: flex; gap: 18px; font-size: 0.95rem; }
.site-header nav a { white-space: nowrap; }
@media (max-width: 560px) { .site-header nav { gap: 14px; } .site-header nav .nav-about { display: none; } }
.brand { font-family: var(--display); font-size: 1.25rem; font-weight: 600; text-decoration: none; }
main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 64px; }
.hero { max-width: 720px; padding-top: 24px; }
.lead { font-size: 1.12rem; color: var(--ink-soft); }
.map-wrap { position: relative; max-width: 720px; margin: 16px auto 40px; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 40px rgba(38, 52, 58, 0.12); }
.place-list h2 { margin-top: 8px; }
.place-group ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.place-group li a { font-weight: 600; }
.place-group li span { color: var(--ink-soft); }
.crumbs { font-size: 0.9rem; color: var(--ink-soft); padding-top: 18px; }
.place-photo { margin: 20px 0 8px; }
.place-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; background: var(--line); box-shadow: 0 10px 36px rgba(38, 52, 58, 0.14); }
.place-photo figcaption { margin-top: 6px; font-size: 0.78rem; color: var(--ink-soft); text-align: right; }
.place-photo figcaption a { color: inherit; }
.place-card { display: grid; gap: 8px 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 24px 0; }
.place-card h2 { font-size: 1.2rem; }
.place .body, .place .faq { max-width: 68ch; }
.place .body h2, .place .faq h2 { font-size: 1.5rem; margin: 1.4em 0 0.4em; }
.place .faq h3 { font-size: 1.1rem; margin: 1.2em 0 0.3em; }
.place .faq p { margin: 0; }
.mini-map { max-width: 420px; margin: 32px 0; border-radius: 16px; overflow: hidden; }
button { font: inherit; cursor: pointer; }
.add-to-trip { background: var(--terracotta); color: var(--cal); border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 600; }
.add-to-trip[aria-pressed='true'] { background: var(--ink); }
.open-trip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 20px 0; }
.open-trip { display: inline-block; background: var(--terracotta); color: var(--cal); border-radius: 999px; padding: 10px 20px; font-weight: 600; text-decoration: none; }
.open-trip:hover, .open-trip:focus-visible { background: var(--ink); color: var(--cal); }
.open-trip-hint { color: var(--ink-soft); font-size: 0.95rem; }
.itinerary .body h3 { font-size: 1.1rem; margin: 1.2em 0 0.3em; }
@media (max-width: 640px) { .place-photo img { border-radius: 12px; } body { font-size: 16px; } .map-wrap { border-radius: 0; margin-inline: calc(-1 * clamp(16px, 4vw, 40px)); } }
.planner { display: grid; gap: 24px; grid-template-columns: minmax(0, 720px) minmax(260px, 1fr); align-items: start; margin: 16px 0 40px; }
.planner .map-wrap { margin: 0; }
.planner-side { position: sticky; top: 76px; display: grid; gap: 20px; }
.cart, .trip-form, .place-pop, .too-much, .day-card, .trip-end { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.cart h2, .trip-form h2 { font-size: 1.2rem; margin: 0 0 8px; }
.count { display: inline-block; min-width: 1.6em; text-align: center; background: var(--terracotta); color: var(--cal); border-radius: 999px; font: 600 0.85rem var(--body); padding: 1px 6px; }
#cart-list { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 6px; }
#cart-list li { display: flex; justify-content: space-between; gap: 8px; }
#cart-list button { background: none; border: 0; color: var(--ink-soft); text-decoration: underline; font-size: 0.85rem; }
.muted { color: var(--ink-soft); }
.primary, .secondary { display: inline-block; border-radius: 999px; padding: 10px 20px; font-weight: 600; text-decoration: none; border: 2px solid var(--terracotta); }
.primary { background: var(--terracotta); color: var(--cal); }
.secondary { background: transparent; color: var(--terracotta); }
.primary:disabled { opacity: 0.45; cursor: not-allowed; }
.trip-form fieldset { border: 0; padding: 0; margin: 10px 0; display: flex; gap: 14px; flex-wrap: wrap; }
.trip-form legend { font-weight: 600; margin-bottom: 4px; }
.trip-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.trip-form label { display: grid; gap: 4px; font-size: 0.92rem; }
.trip-form fieldset label { display: flex; align-items: center; gap: 6px; }
.trip-form select, .trip-form input[type='number'] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--cal); }
.place-pop { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(440px, calc(100vw - 24px)); z-index: 30; box-shadow: 0 16px 48px rgba(38, 52, 58, 0.2); }
.place-pop h3 { margin: 0 32px 6px 0; font-size: 1.4rem; }
.pop-close { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--ink-soft); }
.pop-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.too-much { border-color: var(--terracotta); margin: 8px 0 24px; }
.too-much h2 { margin-top: 0; }
.too-much-options { display: flex; gap: 12px; flex-wrap: wrap; }
.too-much-options[hidden] { display: none; }
.trip { display: grid; gap: 24px; grid-template-columns: minmax(0, 540px) 1fr; align-items: start; }
.trip-map { position: sticky; top: 76px; margin: 0; }
#days { display: grid; gap: 14px; }
.day-card header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.day-title { margin: 0; font-size: 1.15rem; }
.day-drive { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.day-card.is-heavy { border-color: var(--terracotta); }
.day-warning { color: var(--terracotta); font-weight: 600; }
.stop h4 { margin: 10px 0 4px; font-family: var(--display); font-size: 1.05rem; }
.stop p { margin: 2px 0; }
.next-time { margin-top: 18px; }
.trip-end { margin-top: 20px; display: grid; gap: 12px; justify-items: start; }
.tpm-order rect { fill: var(--terracotta); stroke: var(--cal); stroke-width: 3; }
.tpm-order text { fill: var(--cal); font-weight: 800; font-family: var(--font-body); }
.tpm-car { pointer-events: none; }
.trip-map .tpm-stamp, .tpm-place:has(.tpm-order) .tpm-stamp, .tpm-zone:has(.tpm-order) .tpm-stamp { display: none; }
@media (max-width: 900px) { .planner, .trip { grid-template-columns: 1fr; } .planner-side, .trip-map { position: static; } }
.help-form-wrap { margin-top: 28px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.help-form-wrap h2 { margin-top: 0; }
.help-form { display: grid; gap: 14px; }
.help-form .choices { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.choice small { display: block; color: var(--ink-soft); }
.choice.is-suggested { border-color: var(--terracotta); }
.choice:has(input:checked) { background: #fbefe9; border-color: var(--terracotta); }
.help-form .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.help-form label { display: grid; gap: 4px; font-size: 0.92rem; }
.help-form input, .help-form textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--cal); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.brand-note { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
#help-status { color: var(--terracotta); font-weight: 600; margin: 0; }
.sent { font-weight: 600; }
.consent { display: flex !important; gap: 8px; align-items: flex-start; font-size: 0.88rem; color: var(--ink-soft); }
.site-footer { border-top: 1px solid var(--line); padding: 24px clamp(16px, 4vw, 40px) 40px; color: var(--ink-soft); font-size: 0.92rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; }
.prose { max-width: 680px; }
.map-figure img { width: 100%; max-width: 640px; height: auto; border-radius: 16px; box-shadow: 0 10px 40px rgba(38, 52, 58, 0.12); }
.map-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }

/* Mapa em ecrã inteiro: cobre a página, sem carrinho nem formulário; o cartão do sítio fica por cima. */
body.tpm-full { overflow: hidden; }
.map-wrap.is-full, .planner .map-wrap.is-full { position: fixed; inset: 0; z-index: 60; max-width: none; margin: 0; border-radius: 0; box-shadow: none; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #1f2b30; }
.map-wrap.is-full .tpm-map { width: auto; height: min(100vh, 151.52vw); height: min(100dvh, 151.52vw); aspect-ratio: 660 / 1000; flex: none; }
.map-wrap.is-full .tpm-tools { top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); }
/* A coluna lateral é "sticky" e cria o seu próprio nível: sobe acima do mapa, deixa passar os cliques e só mostra o cartão do sítio. */
body.tpm-full .planner-side { z-index: 70; pointer-events: none; }
body.tpm-full .planner-side > :not(.place-pop) { visibility: hidden; }
body.tpm-full .place-pop { z-index: 70; pointer-events: auto; }

.demo-open-wrap { margin: 4px 0 0; }
.demo-open { background: none; border: 0; padding: 4px 0; color: var(--terracotta); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; gap: 8px; }
.demo-open::before { content: ''; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.demo-dialog { border: 0; border-radius: 18px; padding: 16px; width: min(960px, 94vw); background: var(--cal); box-shadow: 0 20px 60px rgba(38, 52, 58, 0.35); }
.demo-dialog::backdrop { background: rgba(38, 52, 58, 0.6); }
.demo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.demo-head h2 { font-size: 1.1rem; margin: 0; }
.demo-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--ink-soft); padding: 0 6px; }
.demo-dialog video { display: block; width: 100%; height: auto; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 12px; background: #000; }
