/* Layout: capa com status ao vivo, mapa da rota, feed de atualizações, roteiro dia a dia, hotéis e guias. Tudo é montado a partir do objeto DATA no fim do arquivo. */
:root {
  --bg: #EEF3F2;
  --surface: #FFFFFF;
  --ink: #10303A;
  --muted: #51696F;
  --line: #D3DEDD;
  --sea: #1B7F8F;
  --sea-soft: #D9ECEE;
  --sun: #C8451A;
  --on-sun: #FFFFFF;
  --hero-a: #08262C;
  --hero-b: #14606E;
  --hero-ink: #FFFFFF;
  --land: #E3EBE4;
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1B21; --surface: #12282F; --ink: #E6F0EE; --muted: #93AAAD; --line: #24424A;
    --sea: #4FC0CF; --sea-soft: #173A42; --sun: #FF8A5E; --on-sun: #1A0E08;
    --hero-a: #0A2E38; --hero-b: #14606E; --hero-ink: #F2F8F7; --land: #162E34; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1B21; --surface: #12282F; --ink: #E6F0EE; --muted: #93AAAD; --line: #24424A;
  --sea: #4FC0CF; --sea-soft: #173A42; --sun: #FF8A5E; --on-sun: #1A0E08;
  --hero-a: #0A2E38; --hero-b: #14606E; --hero-ink: #F2F8F7; --land: #162E34; color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; text-wrap: balance; margin: 0; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1040px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
section { padding-block: 2.75rem 0; }
.eyebrow { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sec-head { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.4rem; }
.sec-head h2 { font-size: clamp(2.1rem, 5.5vw, 3.1rem); font-weight: 400; }
.sec-head p { color: var(--muted); max-width: 60ch; }

/* Capa */
.hero { margin-top: calc(-1 * env(safe-area-inset-top, 0px)); padding-top: calc(env(safe-area-inset-top, 0px) + 2.5rem); padding-bottom: 3rem; color: var(--hero-ink);
  background: radial-gradient(900px 400px at 85% 0%, rgba(255,255,255,.16), transparent 60%), linear-gradient(160deg, var(--hero-a), var(--hero-b)); }
.hero .wrap { display: grid; gap: 1.4rem; }
.hero .eyebrow { color: inherit; opacity: .85; }
.hero h1 { font-size: clamp(3.2rem, 12vw, 6.8rem); font-weight: 400; letter-spacing: -.01em; line-height: .98; }
.hero h1 em { font-style: italic; opacity: .9; display: block; }
.hero .sub { font-size: 1.1rem; max-width: 52ch; opacity: .92; }
.live { display: inline-flex; align-items: center; gap: .6rem; align-self: start; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: .5rem 1rem .5rem .8rem; font-weight: 500; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; background: #FF8A5E; box-shadow: 0 0 0 0 rgba(255,138,94,.7); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 .8rem rgba(255,138,94,0); } 100% { box-shadow: 0 0 0 0 rgba(255,138,94,0); } }
.facts { display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem; margin-top: .4rem; }
.fact b { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 400; }
.fact span { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }

/* Nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--hero-a); }
.nav .wrap { display: flex; gap: .4rem; overflow-x: auto; padding-block: .6rem; scrollbar-width: none; }
.nav a { white-space: nowrap; text-decoration: none; padding: .4rem .9rem; border-radius: 999px; font-weight: 500; color: var(--muted); }
.nav a:hover { background: var(--sea-soft); color: var(--ink); }

/* Mapa */
.map-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.map-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .8rem; }
.map-card svg { width: 100%; height: auto; display: block; }
.map-card text { font-family: var(--font-body); font-size: 15px; fill: var(--ink); font-weight: 500; }
.map-card .coord { font-family: var(--font-mono); font-size: 10px; fill: var(--muted); }
.stops { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.stop-btn { width: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .85rem 1rem; cursor: pointer; font: inherit; color: inherit; }
.stop-btn:hover { border-color: var(--sea); }
.stop-btn[aria-current="true"] { border-color: var(--sun); box-shadow: inset 4px 0 0 var(--sun); }
.stop-btn .badge { grid-row: span 2; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--sea-soft); font-family: var(--font-mono); font-weight: 500; }
.stop-btn[aria-current="true"] .badge { background: var(--sun); color: var(--on-sun); }
.stop-btn strong { font-family: var(--font-display); font-size: 1.15rem; }
.stop-btn small { color: var(--muted); font-family: var(--font-mono); font-size: .78rem; }
.stop-detail { margin-top: .8rem; background: var(--sea-soft); border-radius: 14px; padding: 1rem 1.1rem; display: grid; gap: .6rem; }

/* Botões e links */
.btn { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; font-weight: 700; padding: .6rem 1.1rem; border-radius: 10px; background: var(--sun); color: var(--on-sun); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--sea); }
.btn.small { padding: .4rem .8rem; font-size: .9rem; }

/* Placeholders de foto e vídeo */
.ph { position: relative; aspect-ratio: 16 / 10; width: 100%; border-radius: 12px; overflow: hidden; display: grid; place-items: end start; padding: .7rem .9rem; color: #fff; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.45)); }
.ph span { position: relative; z-index: 1; }
.ph img, .ph video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.play i { width: 3.4rem; height: 3.4rem; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; }
.play i::before { content: ""; margin-left: .25rem; border-left: 1.1rem solid #10303A; border-block: .7rem solid transparent; }

/* Feed ao vivo */
.feed { display: grid; gap: 1rem; }
.post { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
.post time { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); padding-top: .25rem; }
.post-body { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; display: grid; gap: .7rem; min-width: 0; }
.post-body .where { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sea); }
.post.latest .post-body { border-color: var(--sun); }
.tag-new { background: var(--sun); color: var(--on-sun); font-family: var(--font-mono); font-size: .7rem; padding: .1rem .5rem; border-radius: 99px; margin-left: .5rem; }

/* Roteiro */
.day { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; padding-bottom: 1.8rem; position: relative; }
.day::before { content: ""; position: absolute; left: 2.15rem; top: 3.4rem; bottom: 0; border-left: 2px dashed var(--line); }
.day:last-child::before { display: none; }
.day-n { width: 4.3rem; height: 4.3rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--sea); display: grid; place-content: center; text-align: center; line-height: 1; z-index: 1; }
.day-n small { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; color: var(--muted); }
.day-n b { font-family: var(--font-display); font-size: 1.5rem; }
.day.today .day-n { background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
.day.today .day-n small { color: inherit; }
.day-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; display: grid; gap: .8rem; min-width: 0; }
.day-card h3 { font-size: 1.35rem; }
.day-card .meta { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.items li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .6rem; }
.items time { font-family: var(--font-mono); font-size: .85rem; color: var(--sea); padding-top: .12rem; }
.items a { color: var(--sea); font-weight: 500; }

/* Hotéis e guias */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 1.2rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .8rem .8rem 1.1rem; display: grid; gap: .8rem; align-content: start; min-width: 0; }
.card { overflow: hidden; }
.card > :not(.ph) { padding-inline: .4rem; }
/* Picote de ingresso entre o texto e os botões, como nos cartões de bilhete das referências */
.perf { position: relative; border-top: 2px dashed var(--line); margin-inline: -.8rem; padding: 0 !important; height: 0; }
.perf::before, .perf::after { content: ""; position: absolute; top: -.7rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.perf::before { left: -.7rem; }
.perf::after { right: -.7rem; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; }
.shots .ph { aspect-ratio: 4 / 3; font-size: .65rem; }
.card h3 { font-size: 1.3rem; }
.card .city { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sea); }
.card .nights { color: var(--muted); font-size: .92rem; }
.card .row { display: flex; flex-wrap: wrap; gap: .5rem; }
.vids { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.2rem; }

.note { margin-top: 2.75rem; padding: 1rem 1.2rem; border: 1.5px dashed var(--sea); border-radius: 14px; color: var(--muted); font-size: .92rem; }
footer { padding-block: 3rem 3.5rem; color: var(--muted); font-size: .92rem; }
footer b { font-family: var(--font-display); color: var(--ink); font-size: 1.2rem; display: block; margin-bottom: .2rem; }

@media (max-width: 760px) {
  .map-grid { grid-template-columns: minmax(0, 1fr); }
  .post { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .day { grid-template-columns: 3.4rem minmax(0, 1fr); gap: .7rem; }
  .day-n { width: 3.3rem; height: 3.3rem; }
  .day-n b { font-size: 1.2rem; }
  .day::before { left: 1.6rem; top: 2.6rem; }
}
@media (prefers-reduced-motion: reduce) { .dot, .pulse-ring { animation: none !important; } html { scroll-behavior: auto; } }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 3.8rem; }

/* ---- Ajustes para rodar como site próprio (fora do viewer de artifacts) ---- */
:root { color-scheme: light; }
body { margin: 0; font-size: 16px; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Mídia dos posts (fotos e vídeo enviados pelo celular) */
.media { display: grid; gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media > :only-child, .media > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.media img, .media video { width: 100%; height: 100%; max-height: 70vh; object-fit: cover; border-radius: 12px; display: block; background: var(--sea-soft); }
.media video { object-fit: contain; background: #000; }
.feed-empty { color: var(--muted); border: 1.5px dashed var(--line); border-radius: 14px; padding: 1.2rem; }

/* Marcadores do mapa (classes no lugar de style="" por causa da CSP) */
.stop-hit { cursor: pointer; }
.map-card text.pin-n { fill: #fff; font-weight: 700; }

/* ---- Painel de postagem (/postar), pensado para o celular ---- */
.compose-page { padding-block: 1.4rem 3rem; max-width: 640px; }
.compose-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.2rem; }
.compose-head h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
.compose-head em { font-style: italic; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem; display: grid; gap: .7rem; }
.panel h2 { font-size: 1.6rem; }
.panel label { font-weight: 700; font-size: .95rem; }
.panel input[type="text"], .panel input[type="password"], .panel textarea, .panel select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: .75rem .85rem; }
.panel textarea { resize: vertical; min-height: 7rem; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.two > div { display: grid; gap: .4rem; min-width: 0; }
.file-btn { display: grid; place-items: center; border: 2px dashed var(--sea); border-radius: 14px; padding: 1rem; cursor: pointer; color: var(--sea); }
.file-btn:hover { background: var(--sea-soft); }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn:focus-within { outline: 3px solid var(--sun); outline-offset: 2px; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.previews:empty { display: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sea-soft); display: grid; place-items: center; font-size: .75rem; text-align: center; padding: .3rem; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: .25rem; right: .25rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; z-index: 1; }
button.btn { border: 0; font: inherit; font-weight: 700; cursor: pointer; justify-content: center; }
.btn.big { padding: .9rem 1.2rem; font-size: 1.1rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
progress { width: 100%; height: .6rem; accent-color: var(--sun); }
.msg { min-height: 1.4em; color: var(--muted); font-size: .95rem; }
.msg.err { color: var(--sun); font-weight: 700; }
.msg.ok { color: var(--sea); font-weight: 700; }
.recent-head { flex-direction: row; justify-content: space-between; align-items: end; margin-top: 2rem; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; padding: .4rem 0; }
.recent { display: grid; gap: .8rem; }
.rpost { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; display: grid; gap: .6rem; min-width: 0; }
.rpost .where { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sea); }
.rpost p { overflow-wrap: anywhere; }
.rpost textarea { width: 100%; font: inherit; border: 1.5px solid var(--line); border-radius: 10px; padding: .6rem; background: var(--bg); color: var(--ink); }
.rpost .row { display: flex; flex-wrap: wrap; gap: .5rem; }
.rpost .media img, .rpost .media video { max-height: 160px; }
.pw-box { margin-top: 2rem; }
.pw-box summary { cursor: pointer; font-weight: 700; }
.pw-box form { display: grid; gap: .6rem; margin-top: .8rem; }
.panel p { color: var(--muted); }
