/* Comunidade Plan-ish: base partilhada pelos três layouts. Ver DESIGN.md.
   Ordem das folhas: tokens.css → style.css (esta) → pc.css e mobile.css, que
   só têm regras dentro do seu [data-layout] e por isso não se estragam uma à
   outra. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.55 var(--font); overflow-x: clip; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
img, svg { display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 750; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.block { display: block; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 44rem; margin: 0 auto; padding-inline: var(--safe-l) var(--safe-r); }
.feed-wrap { max-width: 38rem; }
main.wrap { padding-block: 1.25rem 4rem; }
main > h1 { margin-bottom: 1rem; }

/* ---------------------------------------------------------------- topo */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: .75rem; min-height: 3.6rem; max-width: 60rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; }
.brand .mark { width: 32px; height: 32px; flex: none; }
.brand b { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.brand span { color: var(--muted); font-weight: 600; }
nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
nav a {
  color: var(--muted); text-decoration: none; font-weight: 700; padding: 0 .9rem; border-radius: 999px;
  min-height: 42px; display: inline-flex; align-items: center;
}
nav a:hover { color: var(--text); background: var(--surface-2); }
nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
@media (max-width: 420px) { .brand span { display: none; } }
.mode {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; padding: 0;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.mode:hover { background: var(--surface-2); }
.mode:active { transform: scale(.94); }

/* ------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 46px; padding: 0 1.15rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 700 .98rem/1 var(--font);
  cursor: pointer; text-decoration: none; transition: background .15s, transform .15s var(--ease);
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); min-height: 40px; padding: 0 .7rem; }
.btn.quiet:hover { background: var(--surface-2); color: var(--text); }
.btn.quiet.danger, .btn.quiet.danger:hover { color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn svg { width: 19px; height: 19px; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.row.end { justify-content: flex-end; margin: .5rem 0 0; }

input, textarea {
  width: 100%; font: 400 1rem/1.5 var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem .9rem; min-height: 46px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 5.5rem; resize: vertical; }
::placeholder { color: var(--muted); opacity: .85; }
label { display: block; font-weight: 700; margin: 0 0 .35rem; }

.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; margin: 1rem 0; }
.notice.error { border-color: var(--danger); }
.back { margin: 0 0 .9rem; font-weight: 700; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--text); }

/* ------------------------------------------------------------- feed */
.feed-top { margin-bottom: 1rem; }
.feed-top p { margin: .35rem 0 .9rem; }
.tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; font: 700 .92rem/1 var(--font); color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 1rem; min-height: 40px; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.search { border-radius: 999px; padding-inline: 1.1rem; margin-bottom: .7rem; }
/* Popular / Recentes / Meus: o que se vê. Os filtros (.tabs) ficam por baixo. */
.views { display: flex; gap: .2rem; width: fit-content; max-width: 100%; padding: .22rem; margin: .1rem 0 .8rem; background: var(--surface-2); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.views::-webkit-scrollbar { display: none; }
.view {
  flex: none; border: 0; background: transparent; color: var(--muted); font: 750 .95rem/1 var(--font);
  min-height: 40px; padding: 0 1.1rem; border-radius: 999px; cursor: pointer; transition: background-color .15s, color .15s;
}
.view:hover { color: var(--text); }
.view[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.feed { display: grid; gap: 1.1rem; }
.more-btn { display: flex; margin: 1.25rem auto 0; }

/* ------------------------------------------------------------- cartão */
.trip { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.trip-head { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; }
.trip-head .when { color: var(--muted); font-size: .88rem; flex: none; }
.trip-head .when::before { content: "·"; margin-right: .5rem; }

.badge {
  display: inline-flex; align-items: center; gap: .3rem; flex: none;
  font-size: .8rem; font-weight: 750; padding: .28rem .6rem .28rem .45rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}
.badge svg { width: 16px; height: 16px; }
.badge.original { background: var(--verified-soft); color: var(--verified); }
.badge.done { background: var(--done-soft); color: var(--done); }

.media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.media .cover { width: 100%; height: 100%; }
.slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.media-place {
  position: absolute; left: 1rem; right: 1rem; bottom: 2.9rem; color: #fff; font-weight: 800;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.1rem); letter-spacing: -.02em; line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.media-badge { position: absolute; top: .75rem; left: .75rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.media-badge .badge { box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.media-badge .badge.plan { background: rgba(6, 16, 26, .55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.media-badge .badge.original { background: #DCF3E8; color: #0B6B44; }
.media-badge .badge.done { background: #E2EAFA; color: #244FA3; }
.media-facts {
  position: absolute; left: .75rem; bottom: .75rem; display: inline-flex; align-items: center; gap: .35rem;
  font-size: .85rem; font-weight: 700; color: #fff; background: rgba(6, 16, 26, .55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: .3rem .65rem; border-radius: 999px;
}
.media-facts svg { width: 16px; height: 16px; }
.dots { position: absolute; left: 0; right: 0; bottom: .9rem; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: background .2s, transform .2s; }
.dots i.on { background: #fff; transform: scale(1.25); }
.media .nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #0C1B2A; cursor: pointer;
  opacity: 0; transition: opacity .2s;
}
.media .nav svg { width: 20px; height: 20px; }
.media .prev { left: .6rem; }
.media .next { right: .6rem; }
.media:hover .nav, .media .nav:focus-visible { opacity: 1; }
@media (hover: none) { .media .nav { display: none; } }

.trip-body { padding: .9rem 1rem .2rem; }
.trip-title { font-size: var(--fs-title); font-weight: 800; }
h1.trip-title { font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem); }
.trip-title a { color: var(--text); text-decoration: none; }
.trip-title a:hover { color: var(--accent); }
.trip-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--muted); font-size: .92rem; margin: .35rem 0 .6rem; }
.i { display: inline-flex; align-items: center; gap: .3rem; }
.i svg, .fact svg { width: 17px; height: 17px; flex: none; }
.facts { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .7rem; }
.fact {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 700;
  padding: .32rem .7rem; border-radius: 999px; background: var(--surface-2);
}
.fact.gps { background: var(--verified-soft); color: var(--verified); }
.summary { color: var(--text); }
.summary.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.actions { display: flex; align-items: center; gap: .15rem; padding: .2rem .5rem .5rem; }
.act {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .65rem; border-radius: 999px;
  border: 0; background: transparent; color: var(--muted); font: 700 .95rem/1 var(--font); text-decoration: none; cursor: pointer;
}
.act:hover { background: var(--surface-2); color: var(--text); }
.act svg { width: 22px; height: 22px; }
.act.like[aria-pressed="true"] { color: var(--like); }
.act.like[aria-pressed="true"] svg { fill: var(--like); animation: pop .35s var(--ease); }
@keyframes pop { 45% { transform: scale(1.3); } }
.act.toggle { margin-left: auto; color: var(--accent); }
.act.toggle svg { transition: transform .25s var(--ease); }
.act.toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.hint { margin: 0 1rem; font-size: .88rem; color: var(--muted); }
.hint:empty { display: none; }

.more { border-top: 1px solid var(--line); padding: 1rem; animation: open .3s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } }
.evidence-note { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.more-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .6rem; }

/* -------------------------------------------------------- dia a dia */
.days { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.day-head { display: flex; align-items: baseline; gap: .55rem; }
.day-n { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.day-summary { color: var(--muted); font-size: .92rem; margin: .15rem 0 0; }
.stops { list-style: none; margin: .45rem 0 0; padding: 0 0 0 1.35rem; position: relative; }
.stops::before { content: ""; position: absolute; left: .42rem; top: .7rem; bottom: .7rem; border-left: 2px solid var(--line); }
.stop { position: relative; padding: .3rem 0 .55rem; }
.stop::before {
  content: ""; position: absolute; left: -1.2rem; top: .62rem; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--muted);
}
.stop.v-gps::before { background: var(--verified); border-color: var(--verified); }
.stop.v-manual::before { border-color: var(--done); }
.stop.v-skipped::before { background: var(--line); border-color: var(--line); }
.stop.v-skipped .stop-name { color: var(--muted); text-decoration: line-through; }
.stop-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.stop-name { font-weight: 700; }
.gps { display: inline-flex; align-items: center; gap: .2rem; font-size: .75rem; font-weight: 800; color: var(--verified); }
.gps svg { width: 14px; height: 14px; }
.stop-meta { display: flex; flex-wrap: wrap; gap: .1rem .8rem; color: var(--muted); font-size: .86rem; }
.stop-desc { margin: .2rem 0 0; font-size: .95rem; }

/* ---------------------------------------------------- pessoas */
.who { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); text-decoration: none; font-weight: 750; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.who:hover { color: var(--accent); }
.avatar {
  --c: var(--accent); width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--c); color: #fff;
  font: 800 .78rem/1 var(--font); letter-spacing: .02em;
}
.avatar.lg { width: 76px; height: 76px; font-size: 1.5rem; }

/* ------------------------------------------------ itinerário: painéis */
.panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem; margin-top: 1rem; }
.panel h2 { margin-bottom: .75rem; }
.people { display: flex; flex-wrap: wrap; gap: .5rem; }
.person { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .8rem .3rem .3rem; background: var(--surface-2); border-radius: 999px; }
.person .avatar { width: 30px; height: 30px; font-size: .7rem; }
.person .small { color: var(--muted); }
.person.gps .small { color: var(--verified); font-weight: 750; }

.thread { padding: .8rem 0; border-top: 1px solid var(--line); }
.thread:first-child { border-top: 0; padding-top: 0; }
.comment .head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.comment .head .avatar { width: 30px; height: 30px; font-size: .7rem; }
.comment .when { color: var(--muted); font-size: .85rem; }
.comment .chip { font-size: .75rem; font-weight: 800; padding: .1rem .5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.comment .body { margin: .3rem 0 .15rem 2.5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .tools { margin-left: 2rem; display: flex; flex-wrap: wrap; }
.comment .tools .btn { font-size: .88rem; min-height: 38px; }
.comment .tools .like[aria-pressed="true"] { color: var(--like); }
.comment .tools .like[aria-pressed="true"] svg { fill: var(--like); }
.replies { margin: .4rem 0 0 2.5rem; padding-left: .9rem; border-left: 2px solid var(--line); display: grid; gap: .6rem; }
.replies.empty { display: none; }
.composer { margin-top: .8rem; }
.replying { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; color: var(--muted); font-size: .9rem; }
.replying svg { width: 18px; height: 18px; }
.report { margin-top: 1.5rem; text-align: center; }
.report .btn { margin-inline: auto; }

/* ------------------------------------------------------------ perfil */
.profile-head { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.2rem 1rem; margin-bottom: 1rem; }
.profile { display: flex; gap: 1rem; align-items: center; }
.profile h1 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.profile p { margin: .15rem 0 0; }
.you { font-size: .75rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.names { display: grid; gap: .3rem; margin-top: .4rem !important; color: var(--muted); }
.names span { display: inline-flex; align-items: center; gap: .35rem; }
.names .avatar { width: 22px; height: 22px; font-size: .55rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); text-align: center; }
.stat b { display: block; font-size: 1.35rem; font-weight: 800; }
.stat span { color: var(--muted); font-size: .8rem; line-height: 1.2; display: block; }
.profile-head + .tabs { margin-bottom: .75rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: var(--r); overflow: hidden; }
.tile { position: relative; aspect-ratio: 1; display: block; color: #fff; text-decoration: none; background: var(--surface-2); }
.tile:hover, .tile:focus-visible { color: #fff; }
.tile img, .tile .cover { width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .6)); }
.tile-text { position: absolute; left: .55rem; right: .55rem; bottom: .5rem; z-index: 1; display: grid; line-height: 1.2; }
.tile-text strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-text span { font-size: .75rem; opacity: .9; }
.tile-badge { position: absolute; top: .4rem; right: .4rem; z-index: 1; }
.tile-badge .badge { font-size: 0; gap: 0; padding: .3rem; }
.grid .empty { grid-column: 1 / -1; padding: 1rem; background: var(--surface); margin: 0; }
@media (max-width: 480px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: .9rem; } .avatar.lg { width: 64px; height: 64px; } }

/* ------------------------------------------------------------- conta */
.hero { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem 1rem; }
.name { display: flex; align-items: center; gap: .85rem; font-size: 1.5rem; font-weight: 800; margin: 0 0 .5rem; }
.card { display: block; color: inherit; text-decoration: none; background: var(--surface); border-radius: var(--r-sm); padding: .85rem 1rem; margin: .6rem 0; box-shadow: var(--shadow); }
a.card:hover { color: inherit; background: var(--surface-2); }
.card.mini { display: flex; align-items: center; gap: .85rem; justify-content: space-between; }
.after-hero { margin-top: .9rem; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
section h2 { margin-top: 1.75rem; margin-bottom: .6rem; }
.panel h2, .profile-head h2 { margin-top: 0; }

.prose h2 { margin: 1.6rem 0 .5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .35rem 0; }
footer { border-top: 1px solid var(--line); padding: 1.5rem 0 calc(3rem + var(--safe-b)); color: var(--muted); font-size: .88rem; }
footer .wrap { max-width: 38rem; }
footer a { color: var(--muted); }

/* ------------------------------------------------- plano partilhado */
.plan-head { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem; margin-bottom: 1rem; }
.plan-title { font: 800 clamp(1.4rem, 1.2rem + 1vw, 1.8rem)/1.2 var(--font); border-color: transparent; padding: .3rem .5rem; margin: 0 0 .3rem -.5rem; width: calc(100% + .5rem); background: transparent; }
.plan-title:hover { border-color: var(--line); }
.plan-live { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--line); padding-top: .7rem; }
.undo-tools { display: inline-flex; gap: .25rem; margin-left: auto; }
.presence { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.here { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; padding: .2rem .65rem .2rem .2rem; border-radius: 999px; background: var(--surface-2); }
.here .avatar { width: 26px; height: 26px; font-size: .62rem; }
.live { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.live-dot.on { background: var(--verified); box-shadow: 0 0 0 0 var(--verified); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--verified) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.plan-days { display: grid; gap: 1rem; }
.day-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: .9rem 1rem 1rem; }
.day-top { display: flex; align-items: center; gap: .6rem; }
.day-top .btn { margin-left: auto; }
.day-title { font-weight: 750; margin: .3rem 0 .6rem; }
.edit-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; counter-reset: stop; }
.edit-stop { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; gap: .5rem; padding: .7rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.stop-main { min-width: 0; display: grid; gap: .4rem; }
.stop-name-input { font-weight: 700; }
.stop-fields { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
label.inline { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-weight: 600; font-size: .92rem; }
label.inline input { width: auto; min-height: 40px; padding: .35rem .6rem; }
label.inline input[type="number"] { width: 5.5rem; }
.where { margin: 0; }
details summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: .92rem; min-height: 32px; display: flex; align-items: center; }
details textarea { margin-top: .35rem; }
.stop-tools { display: flex; flex-direction: column; gap: .2rem; align-items: stretch; }
.stop-tools select { font: 600 .85rem/1.2 var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 40px; max-width: 9.5rem; padding: 0 .4rem; }
.add-stop { display: flex; gap: .5rem; margin-top: .7rem; }
.add-stop input { flex: 1; min-width: 0; }
.plain-list { margin: .3rem 0 .8rem; padding-left: 1.2rem; }
.panel h2.sub { margin-top: 1rem; }
.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent); background-color: var(--accent-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 520px) {
  .edit-stop { grid-template-columns: minmax(0, 1fr); }
  .stop-tools { flex-direction: row; align-items: center; }
  .stop-tools select { max-width: none; flex: 1 1 0; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------ toque, estrelas, avaliações */

a, button, input, select, textarea, label, summary { touch-action: manipulation; }
.fact.rating svg { fill: currentColor; }
.rating-all { display: inline-flex; align-items: center; gap: .15rem; color: var(--muted); font-size: .88rem; font-weight: 600; }
.info { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 999px; }
.info:hover { color: var(--text); background: var(--surface-2); }
.info svg { width: 17px; height: 17px; }
.stars { display: inline-flex; gap: 1px; color: var(--muted); }
.stars svg { width: 16px; height: 16px; }
.stars svg.on { fill: var(--accent); color: var(--accent); }
.verified .stars svg.on { fill: var(--verified); color: var(--verified); }

.score { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .9rem; margin-bottom: .75rem; }
.score .big { font-size: 2rem; font-weight: 800; color: var(--verified); font-variant-numeric: tabular-nums; }
.score .big svg { display: inline; width: 26px; height: 26px; fill: currentColor; vertical-align: -3px; margin-right: .2rem; }
.score .who { color: var(--muted); }
.review-group { margin-top: 1rem; }
.review-group > h3 { font-size: 1rem; font-weight: 750; margin-bottom: .4rem; display: flex; align-items: center; gap: .4rem; }
.review { padding: .8rem 0; border-top: 1px solid var(--line); }
.review .head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.review .head .avatar { width: 30px; height: 30px; font-size: .7rem; }
.review .when { color: var(--muted); font-size: .85rem; }
.review .body { margin: .4rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.review .tools, .comment .tools { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: .3rem; }
.chip.made { font-size: .75rem; font-weight: 800; padding: .1rem .55rem; border-radius: 999px; background: var(--verified-soft); color: var(--verified); display: inline-flex; gap: .25rem; align-items: center; }
.chip.made svg { width: 14px; height: 14px; }

.star-input { display: flex; gap: .15rem; border: 0; padding: 0; margin: 0 0 .5rem; }
.star-input legend { font-weight: 700; margin-bottom: .3rem; }
.star-input label { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; color: var(--muted); border-radius: 12px; }
.star-input label:hover { background: var(--surface-2); }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input input:focus-visible + svg { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.star-input svg { width: 30px; height: 30px; }
.star-input label.on svg { fill: var(--accent); color: var(--accent); }
.my-review textarea { width: 100%; }

dialog.terms-dialog { max-width: min(92vw, 30rem); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); padding: 1.2rem 1.2rem 1rem; box-shadow: var(--shadow); overscroll-behavior: contain; }
dialog.terms-dialog::backdrop { background: rgba(6, 16, 26, .55); }
dialog.terms-dialog h2 { margin-bottom: .6rem; }

/* Moderação */
.mod-item { padding: .9rem 0; border-top: 1px solid var(--line); }
.mod-item .excerpt { margin: .35rem 0; padding: .5rem .7rem; background: var(--surface-2); border-radius: var(--r-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
.mod-item .state { font-size: .8rem; font-weight: 800; color: var(--muted); }
.mod-item.resolved { opacity: .7; }

/* ---------------------------------------------- o que é meu: retirar */
.owner-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  margin: 0 0 .75rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.mine-row { display: flex; align-items: center; gap: .75rem; }
.mine-row > a { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.mine-row > a strong { margin-right: .4rem; }
.chip.warn { font-size: .75rem; font-weight: 800; padding: .1rem .55rem; border-radius: 999px; color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); white-space: nowrap; }

/* ------------------------------------------------------------- pontos */
.points { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem; }
.points h3 { font-size: 1rem; font-weight: 750; margin: 1.2rem 0 .45rem; }
.points-balance { display: flex; align-items: baseline; gap: .45rem; margin: 0 0 .35rem; }
.points-balance b { font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.points-balance span { color: var(--muted); font-weight: 700; }
.points .row { margin: .6rem 0 .2rem; }
.inline-form { display: flex; gap: .5rem; }
.inline-form input { flex: 1; min-width: 0; }
.code { font: 700 1rem/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .04em; }
.gift-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.gift-row:first-child { border-top: 0; }
.moves { list-style: none; margin: 0; padding: 0; }
.moves li { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.moves li:first-child { border-top: 0; }
.moves .delta { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.moves .delta.up { color: var(--verified); }
.moves .delta.down { color: var(--muted); }
@media (max-width: 420px) { .inline-form { flex-direction: column; } }

/* Para quem é uma paragem num plano partilhado (ramos). */
.people-pick { margin-top: .25rem; }
.people-pick summary { cursor: pointer; font-size: .9rem; color: var(--muted, inherit); }
.people-pick label.inline { display: inline-flex; gap: .35rem; align-items: center; margin: .35rem .9rem 0 0; min-height: 44px; }

/* Números que se comparam ou mudam (gostos, dias, paragens, estatísticas) não dançam. */
.act, .fact, .media-facts, .trip-meta, .stop-meta, .stat b, .rating-all, .day-n, .when { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- esqueletos
   Enquanto carrega, a forma do que vem a seguir, e não uma caixa "A carregar…". */
.sk { display: block; background: var(--surface-2); border-radius: 8px; position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 55%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: .9rem; margin: .5rem 0; }
.sk-line.title { height: 1.35rem; width: 70%; }
.sk-line.short { width: 40%; }
.sk-round { border-radius: 50%; }
.sk-pill { border-radius: 999px; height: 1.7rem; width: 7rem; }
.skeleton { pointer-events: none; }
.skeleton .media { background: none; }
.skeleton .media .sk { position: absolute; inset: 0; border-radius: 0; }

.grow { flex: 1; min-width: 0; }
.skeleton .tile::after { display: none; }
.skeleton .tile .sk { position: absolute; inset: 0; border-radius: 0; }

/* ------------------------------------------------------------ explorar
   No telemóvel, a coluna do feed de sempre. No PC e no tablet, pc.css põe a
   navegação e os filtros ao lado (.explore.wide). */
.explore-feed { max-width: 38rem; margin: 0 auto; padding: 1.25rem var(--safe-r) 4rem var(--safe-l); }
.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.active-filters:not(:empty) { margin-top: .6rem; }
.chip-clear {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .9rem; border-radius: 999px;
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--text); font: 700 .9rem/1 var(--font); cursor: pointer;
}
.chip-clear span { color: var(--accent); font-size: .85rem; }
.notice.empty p { margin-bottom: .75rem; }
kbd {
  display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem; padding: 0 .45rem; border-radius: 8px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface); font: 700 .9rem/1 ui-monospace, Menlo, Consolas, monospace;
}
.keys { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; align-items: center; margin: .5rem 0 1rem; }
.keys dd { margin: 0; }

/* O traçado grande (layout/shared/route-map.js): um traço por dia, na cor do dia. */
.route-map { width: 100%; height: auto; display: block; border-radius: var(--r-sm); background: var(--surface-2); }
.route-map .hop { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; opacity: .6; }
.route-map polyline { fill: none; stroke: var(--day); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.route-map circle { fill: var(--day); stroke: var(--surface); stroke-width: 2.5; cursor: pointer; transition: r .15s var(--ease); }
.route-map circle.on { r: 10; }
.route-map .leg { transition: opacity .2s var(--ease); }
.route-map .leg.dim { opacity: .18; }
.stop.lit { background: var(--accent-soft); border-radius: 10px; box-shadow: -.6rem 0 0 var(--accent-soft), .6rem 0 0 var(--accent-soft); }
.itin-side[hidden] { display: none; }
.day[id] { scroll-margin-top: calc(3.6rem + 1rem); }
.tile-more { display: none; }
/* Conta: a navegação por secções é só do PC (pc.css). */
.account-nav { display: none; }
.account-body h2[id], .account-body .hero[id] { scroll-margin-top: calc(3.6rem + 1rem); }

/* ♥ que salta ao dar gosto com dois toques na fotografia. */
.heart-burst { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #fff; }
.heart-burst svg { width: 96px; height: 96px; fill: var(--like); stroke: #fff; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .35)); animation: burst .8s var(--ease) forwards; }
@keyframes burst { 0% { transform: scale(.3); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 60% { transform: scale(.95); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }

/* ------------------------------------------------ folha que sobe de baixo
   (layout/mobile/sheet.js). */
dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 40rem; margin-inline: auto;
  max-height: 88dvh; padding: 0 0 var(--safe-b); border: 0; border-radius: 22px 22px 0 0;
  background: var(--surface); color: var(--text); box-shadow: 0 -10px 40px rgba(6, 16, 26, .25);
  display: flex; flex-direction: column; overscroll-behavior: contain;
  transform: translateY(var(--drag, 0px)); animation: sheet-up .28s var(--ease);
}
dialog.sheet:not([open]) { display: none; }
dialog.sheet.full { height: 94dvh; max-height: 94dvh; }
dialog.sheet.dragging { animation: none; transition: none; }
dialog.sheet:not(.dragging) { transition: transform .2s var(--ease); }
dialog.sheet::backdrop { background: rgba(6, 16, 26, .5); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-handle { display: grid; place-items: center; height: 22px; cursor: grab; touch-action: none; }
.sheet-handle i { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .6rem .4rem 1.1rem; touch-action: none; }
.sheet-head h2 { font-size: 1.2rem; }
.sheet-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 1rem; cursor: pointer; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: .2rem 1.1rem 1.2rem; }
.sheet-foot { position: sticky; bottom: 0; padding-top: .8rem; background: linear-gradient(transparent, var(--surface) 30%); }
.sheet-foot .btn { width: 100%; }
.filter-panel h3, .search-group h3 { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .4rem; }
.filter-panel h3:first-child { margin-top: .2rem; }
.search-form .search { margin: 0; }
.act.save[aria-pressed="true"] { color: var(--accent); }
.act.save[aria-pressed="true"] svg { fill: var(--accent); }
.act.save .act-label { display: none; }
.follow-line { color: var(--muted); margin-top: .25rem !important; font-variant-numeric: tabular-nums; }
.follow-row { margin-top: .6rem !important; }
.btn.follow { min-height: 40px; padding-inline: 1.3rem; }

/* ------------------------------------------------ notificações */
nav a.bell { position: relative; width: 42px; padding: 0; justify-content: center; }
.bell svg { width: 22px; height: 22px; }
.bell-count {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  display: grid; place-items: center; background: var(--like); color: #fff; font: 800 .7rem/1 var(--font); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--bg);
}
.notes { list-style: none; margin: 1rem 0 0; padding: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.note + .note { border-top: 1px solid var(--line); }
.note-link { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; color: var(--text); text-decoration: none; }
a.note-link:hover { background: var(--surface-2); color: var(--text); }
.note-text { flex: 1; min-width: 0; }
.note-text em { font-style: normal; font-weight: 700; color: var(--accent); }
.note .when { color: var(--muted); font-size: .85rem; flex: none; }
.note.unread { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.note.unread .note-text strong::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: .35rem; vertical-align: middle; }
.plan-days > * { min-width: 0; }

/* ------------------------------------------------------------ painel (admin) */
.admin-head { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }
.admin-range { display: flex; gap: .25rem; }
.admin-range [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .75rem; }
.adm-tile { display: grid; align-content: start; gap: .15rem; padding: .85rem 1rem; background: var(--surface); border-radius: var(--r-sm); }
.adm-tile-label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.adm-tile-value { font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.adm-tile-note { font-size: .8rem; color: var(--muted); }
.adm-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.adm-chart { margin: 0; padding: .85rem 1rem; background: var(--surface); border-radius: var(--r-sm); }
.adm-chart figcaption { display: flex; justify-content: space-between; gap: .5rem; font-weight: 700; color: var(--text); margin-bottom: .35rem; }
.adm-chart figcaption strong { font-variant-numeric: tabular-nums; }
.adm-bars-frame { position: relative; }
.adm-bars { display: block; width: 100%; height: auto; overflow: visible; }
.adm-bars .adm-bar { fill: var(--accent); }
.adm-bars .adm-hit { fill: transparent; cursor: default; }
.adm-bars .adm-hit:hover { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.adm-bars .adm-grid { stroke: var(--line); stroke-dasharray: 2 3; }
.adm-bars .adm-baseline { stroke: var(--line); }
.adm-bars .adm-axis { font-size: 10px; fill: var(--muted); }
.adm-bars .adm-axis.end { text-anchor: end; }
.adm-bar-tip { position: absolute; top: -.4rem; transform: translate(-50%, -100%); padding: .2rem .5rem; border-radius: 8px; background: var(--text); color: var(--bg); font-size: .8rem; font-weight: 700; white-space: nowrap; pointer-events: none; }
.adm-chart details { margin-top: .4rem; font-size: .85rem; }
.adm-chart table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.adm-chart td, .adm-chart th { text-align: left; padding: .15rem 0; border-bottom: 1px solid var(--line); }
.adm-funnel { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .75rem; list-style: none; padding: 0; margin: 0; }
.adm-funnel li { display: grid; gap: .15rem; padding: .85rem 1rem; background: var(--surface); border-radius: var(--r-sm); }
.adm-funnel strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.adm-tops { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.adm-top-list { padding: .85rem 1rem; background: var(--surface); border-radius: var(--r-sm); }
.adm-top-list h3 { margin: 0 0 .4rem; font-size: 1rem; }
.adm-top-list ol { margin: 0; padding-left: 1.2rem; }
.adm-top-list li { margin: .2rem 0; overflow-wrap: anywhere; }
.admin-note { margin-top: 1.5rem; max-width: 60ch; }
.finish-account { max-width: 40rem; }
.finish-account h2 { margin-top: 1.5rem; }
.finish-account .choices { margin: 1rem 0; }

/* ------------------------------------------------------------ feitos com IA */
.badge.ai { background: #2b2f6b; color: #fff; }
:root[data-theme="dark"] .badge.ai { background: #c9ccff; color: #14163a; }
.ai-row { margin: 0 0 1.25rem; }
.ai-row-head h2 { margin: 0; font-size: var(--fs-h2); }
.ai-row-head p { margin: .15rem 0 .6rem; }
.ai-track { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; }
.ai-tile { flex: 0 0 min(16rem, 72vw); scroll-snap-align: start; display: grid; gap: .3rem; text-decoration: none; color: var(--text); }
.ai-cover { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; }
.ai-cover .cover { width: 100%; height: 100%; display: block; }
.ai-cover .media-badge { position: absolute; left: .5rem; top: .5rem; }
.ai-tile:hover strong { text-decoration: underline; }
.adm-publish { margin: 0 0 1.5rem; padding: .85rem 1rem; background: var(--surface); border-radius: var(--r-sm); }
.adm-publish textarea { width: 100%; font-family: ui-monospace, monospace; font-size: .85rem; }
.adm-publish .plan-days { padding-left: 1.2rem; }
.adm-publish .plan-days ol { margin: .2rem 0 .6rem; }
.adm-publish .state.ok { color: var(--verified); font-weight: 700; font-size: .85rem; }
.adm-publish .state.bad { color: var(--danger); font-weight: 700; font-size: .85rem; }
.adm-publish .plan-form { display: grid; gap: .35rem; max-width: 36rem; margin: 1rem 0; }
.adm-publish .plan-form input:not([type]), .adm-publish .plan-form textarea { width: 100%; }
.adm-publish .plan-form .check { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; font-weight: 400; }
.adm-publish .plan-form .check input { width: 1.1rem; height: 1.1rem; margin: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
