/* 365 Clicks — Componentes
   Depende de tokens.css. Classes curtas e estáveis: são a API usada pelas telas. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--fw-bold); text-wrap: balance; margin: 0; }
h1 { font-size: var(--fs-4xl); line-height: var(--lh-tight); letter-spacing: var(--tracking-tight); margin-bottom: var(--sp-2); }
h2 { font-size: clamp(var(--fs-24), 3vw, var(--fs-32)); line-height: var(--lh-snug); letter-spacing: var(--tracking-tight); margin: var(--sp-8) 0 var(--sp-4); }
h3 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: var(--lh-snug); letter-spacing: 0; margin: var(--sp-2) 0; }
p { color: var(--ink-2); margin: 0 0 var(--sp-4); max-width: 68ch; }
main > h1 + p { font-size: var(--fs-lg); }

.small { font-size: var(--fs-sm); color: var(--ink-3); }
.eyebrow {
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--ink-3);
}
.mono, .exif { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
main {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-7) var(--gutter) var(--sp-9);
}
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Ícones ---------- */
.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; padding: 0 var(--sp-5);
  border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--ink); color: var(--ink-inverse);
  font-weight: var(--fw-semibold); font-size: var(--fs-14); line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.btn:hover, .btn-dark:hover { background: color-mix(in srgb, var(--ink) 84%, var(--bg)); }
.btn-dark { background: var(--ink); color: var(--ink-inverse); }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
/* Ação principal: laranja raro, no máximo um por bloco */
.btn-primary, .btn-accent { background: var(--c-accent); color: var(--c-on-accent); }
.btn-primary:hover, .btn-accent:hover { background: var(--c-accent-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 86%, #000); }
.btn-sm { min-height: 36px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }
.btn-lg { min-height: 52px; padding: 0 var(--sp-6); font-size: var(--fs-16); }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-block { width: 100%; }
.panel .btn, .hero .btn { margin-top: var(--sp-2); }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.hint { font-size: var(--fs-xs); color: var(--ink-3); }
.hint.error { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.textarea { min-height: 110px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-focus) 30%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }

.search-field { position: relative; display: flex; align-items: center; }
.search-field .i { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.search-field .input { padding-left: 42px; background: var(--surface-2); border-color: transparent; border-radius: var(--r-pill); }
.search-field .input:focus { background: var(--surface); }
.search-field.lg .input { min-height: 60px; font-size: var(--fs-16); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-3); }
.search-field.lg .i { left: 18px; width: 22px; height: 22px; }
.search-field.lg .input { padding-left: 50px; }

.check { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-md); }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.switch { position: relative; display: inline-flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--line-strong); position: relative; cursor: pointer; transition: background var(--dur); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--dur) var(--ease); box-shadow: var(--shadow-soft); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(16px); background: var(--bg); }

/* ---------- Chips, badges, pills ---------- */
.chips { display: flex; gap: var(--sp-2); overflow-x: auto; padding: 2px 2px var(--sp-3); margin: var(--sp-5) 0 var(--sp-2); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; text-decoration: none;
  height: 36px; padding: 0 var(--sp-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--ink-2); white-space: nowrap; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--ink-inverse); }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }

/* Contador do dia — marca registrada do 365 */
.day {
  display: inline-flex; align-items: baseline; gap: 0;
  font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-12); font-variant-numeric: tabular-nums;
  height: 24px; padding: 0 var(--sp-2); border-radius: var(--r-sm); background: var(--c-accent-soft); color: var(--c-accent-ink);
}
.day b { font-weight: 500; font-size: 1.1em; margin: 0 1px 0 .4em; }

/* ---------- Avatar ---------- */
.avatar {
  --size: 44px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--av, var(--surface-2)); color: var(--ink);
  font-family: var(--font-heading); font-weight: 800; font-size: calc(var(--size) * .38);
  overflow: hidden; border: 2px solid var(--surface);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { --size: 32px; }
.avatar-lg { --size: 72px; }
.avatar-xl { --size: 112px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar + .avatar { margin-left: -10px; }

/* ---------- Superfícies ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.panel h2 { margin-top: var(--sp-2); }
.panel.inverse { background: var(--surface-inverse); color: var(--ink-inverse); border-color: transparent; }
.panel.inverse p, .panel.inverse .small { color: color-mix(in srgb, var(--ink-inverse) 72%, transparent); }
.panel.inverse .btn { background: var(--ink-inverse); color: var(--ink); }

.metric { font-family: var(--font-heading); font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .small { display: block; margin-bottom: var(--sp-1); }
.delta { font-size: var(--fs-xs); font-weight: 700; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }

.divider { height: 1px; background: var(--line); border: 0; margin: var(--sp-6) 0; }

/* ---------- Fotografia ---------- */
/* A foto é protagonista: sem borda, sem sombra, sem fundo de card. */
.photo {
  position: relative; overflow: hidden; border-radius: var(--r-md);
  background: var(--tone, var(--surface-2));
  background-image: linear-gradient(160deg, color-mix(in srgb, var(--tone2, var(--tone, var(--surface-2))) 90%, transparent), var(--tone, var(--surface-2)));
}
.photo img { width: 100%; height: auto; aspect-ratio: var(--ratio, auto); object-fit: cover; transition: transform 600ms var(--ease), opacity var(--dur); }
.photo img.is-broken, .card img.is-broken { background-color: var(--tone, var(--surface-2)); }

.card { break-inside: avoid; margin: 0 0 var(--masonry-gap); position: relative; }
.card > img, .card .photo img {
  width: 100%; height: auto; border-radius: var(--r-lg); aspect-ratio: var(--ratio, auto); object-fit: cover;
  background: var(--tone, var(--surface-2));
  background-image: linear-gradient(160deg, var(--tone2, var(--tone, var(--surface-2))), var(--tone, var(--surface-2)));
}

.card .meta { padding: var(--sp-2) 2px 0; display: grid; gap: 1px; font-size: var(--fs-md); line-height: 1.35; }
.card .meta b { font-weight: 700; }
.card .meta .small { color: var(--ink-3); }
.card .actions {
  position: absolute; top: var(--sp-2); right: var(--sp-2); display: flex; gap: 6px;
  opacity: 0; transform: translateY(-4px); transition: opacity var(--dur), transform var(--dur) var(--ease);
}
.card:hover .actions, .card:focus-within .actions { opacity: 1; transform: none; }
.card .actions button {
  width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .92); color: #141413; cursor: pointer;
}
.card .actions button[aria-pressed="true"] { background: var(--accent); }
@media (hover: none) { .card .actions { opacity: 1; transform: none; } }

/* Grid Masonry: fallback em CSS columns; app.js reordena por linha (mais recente primeiro). */
.grid { columns: 4 var(--masonry-min); column-gap: var(--masonry-gap); }
.grid.is-masonry { columns: auto; display: flex; gap: var(--masonry-gap); align-items: flex-start; }
.grid.is-masonry > .masonry-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--masonry-gap); }
.grid.is-masonry .card { margin: 0; }

/* ---------- Hero e capas ---------- */
.hero {
  position: relative; min-height: 440px; border-radius: var(--r-xl); overflow: hidden;
  display: flex; align-items: flex-end; padding: var(--sp-8);
  color: #fff; isolation: isolate;
  background: var(--tone, #1d2433);
  background-image: linear-gradient(95deg, rgba(0, 0, 0, .66), rgba(0, 0, 0, .06) 70%), var(--img, none), linear-gradient(160deg, var(--tone2, #3b4a66), var(--tone, #1d2433));
  background-size: cover; background-position: center;
}
.hero h1 { color: #fff; font-size: var(--fs-5xl); max-width: 14ch; margin-bottom: var(--sp-3); }
.hero p { color: rgba(255, 255, 255, .86); font-size: var(--fs-lg); max-width: 52ch; }
.hero .eyebrow { color: rgba(255, 255, 255, .78); margin-bottom: var(--sp-3); }
.hero .credit { position: absolute; right: var(--sp-5); bottom: var(--sp-4); font-family: var(--font-mono); font-size: var(--fs-xs); color: rgba(255, 255, 255, .7); }
.hero .search-field { width: min(640px, 100%); margin: var(--sp-5) 0 var(--sp-3); }
.hero .search-field .input { color: var(--ink); }

.searchbig {
  display: flex; align-items: center; gap: var(--sp-3);
  width: min(640px, 100%); min-height: 56px; margin: var(--sp-5) 0 var(--sp-3); padding: 0 var(--sp-5);
  background: var(--surface); color: var(--ink-3); border-radius: var(--r-lg); font-size: var(--fs-lg);
}

.cover {
  height: 280px; border-radius: var(--r-xl); margin-bottom: var(--sp-6);
  background: var(--tone, var(--surface-2));
  background-image: var(--img, none), linear-gradient(160deg, var(--tone2, var(--surface-2)), var(--tone, var(--surface-2)));
  background-size: cover; background-position: center;
}

@media (max-width: 800px) {
  .hero { min-height: 480px; padding: var(--sp-6) var(--sp-5); border-radius: var(--r-lg); flex-direction: column; justify-content: flex-end; align-items: stretch; }
  .hero .credit { position: static; margin-top: var(--sp-4); }
  .cover { height: 200px; border-radius: var(--r-lg); }
  .panel { padding: var(--sp-5); }
}

/* ---------- 365 Challenge ---------- */
.challenge {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-5); align-items: end;
  padding: var(--sp-6); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
}
.challenge .theme { font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-3xl); letter-spacing: -.03em; line-height: 1; margin: var(--sp-3) 0 var(--sp-2); }
.challenge .technique { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--accent-ink); }
@media (max-width: 640px) { .challenge { grid-template-columns: 1fr; } }

.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--value, 0%); background: var(--accent); border-radius: inherit; }
.progress.ink > span { background: var(--ink); }

/* Calendário de 365 dias — cada ponto é um dia */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(14px, 1fr)); gap: 4px; }
.days i { aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.days i.done { background: var(--ink); }
.days i.today { background: var(--accent); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.days i.missed { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }

.streak { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 700; }
.streak .i { color: var(--accent); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--sp-6); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: none; padding: var(--sp-3) var(--sp-3); border: 0; background: none; cursor: pointer;
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-3); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }

/* ---------- Tabela ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table .who { display: flex; align-items: center; gap: var(--sp-3); }
.table td.r, .table th.r { text-align: right; }

/* ---------- Lista ---------- */
.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.list-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item.unread { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }

/* ---------- Estado vazio ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3);
  padding: var(--sp-9) var(--sp-6); border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
}
.empty .frame {
  width: 72px; height: 56px; border-radius: var(--r-sm); border: 2px solid var(--ink-3); position: relative; margin-bottom: var(--sp-2);
}
.empty .frame::before, .empty .frame::after { content: ""; position: absolute; width: 12px; height: 12px; border-color: var(--accent); border-style: solid; }
.empty .frame::before { top: -7px; left: -7px; border-width: 3px 0 0 3px; }
.empty .frame::after { bottom: -7px; right: -7px; border-width: 0 3px 3px 0; }
.empty h3 { margin: 0; }
.empty p { margin: 0 auto var(--sp-2); max-width: 42ch; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--sp-4); }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: var(--overlay); animation: fade var(--dur) var(--ease); }
.modal-dialog {
  position: relative; width: min(520px, 100%); max-height: calc(100% - 32px); overflow: auto;
  background: var(--surface); border-radius: var(--r-xl); padding: var(--sp-7); box-shadow: var(--shadow-float);
  animation: rise var(--dur) var(--ease);
}
.modal-dialog h3 { margin-top: 0; font-size: var(--fs-2xl); }
.modal-close { position: absolute; top: var(--sp-4); right: var(--sp-4); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-6); flex-wrap: wrap; }
@media (max-width: 640px) {
  .modal { place-items: end stretch; padding: 0; }
  .modal-dialog { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: var(--sp-6) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: var(--sp-2); width: min(420px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-inverse); color: var(--ink-inverse); box-shadow: var(--shadow-float); font-size: var(--fs-sm); animation: rise var(--dur) var(--ease); }
.toast .i { color: var(--accent); }
@media (max-width: 800px) { .toasts { bottom: calc(var(--tabbar-h) + var(--sp-3) + env(safe-area-inset-bottom, 0px)); } }

/* ---------- Menu suspenso ---------- */
.menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-float); padding: var(--sp-2); }
.menu a, .menu button { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: 9px var(--sp-3); border: 0; background: none; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: var(--fs-sm); cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .menu-label { padding: var(--sp-2) var(--sp-3) 2px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: var(--sp-2) 0; }

/* ---------- Cabeçalho (renderizado por app.js) ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  height: var(--header-h); display: flex; align-items: center; gap: var(--sp-5);
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--c-surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; font-family: var(--font-sans); font-weight: 800; font-size: var(--fs-18); letter-spacing: -0.04em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo b { color: var(--c-accent); }
.site-nav { display: flex; gap: var(--sp-1); align-items: center; }
.site-nav > a, .site-nav > .more > button {
  padding: 8px 12px; border-radius: var(--r-sm); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2);
  background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.site-nav > a:hover, .site-nav > .more > button:hover { color: var(--ink); background: var(--surface-2); }
.site-nav > a[aria-current="page"], .site-nav > .more.is-current > button { color: var(--ink); font-weight: 700; }
.site-nav .more { position: relative; }
.site-nav .more .menu { left: 0; right: auto; width: min(640px, 80vw); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-1) var(--sp-3); padding: var(--sp-4); }
.site-nav .more .menu section { display: flex; flex-direction: column; }
.site-nav .more .menu a[aria-current="page"] { font-weight: 700; background: var(--surface-2); }
.header-search { flex: 1; max-width: 380px; margin-left: auto; }
.header-search .input { min-height: 40px; }
.header-actions { display: flex; align-items: center; gap: var(--sp-1); position: relative; }
.header-actions .btn-ghost { color: var(--ink-2); }
.dot-badge { position: relative; }
.dot-badge::after { content: ""; position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.menu-toggle { display: none; }

@media (max-width: 1100px) { .header-search { display: none; } .header-actions { margin-left: auto; } }
@media (max-width: 800px) {
  .site-header { gap: var(--sp-2); }
  .site-nav, .header-actions .hide-mobile { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* Barra inferior mobile */
.tabbar { display: none; }
@media (max-width: 800px) {
  body.has-shell { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 500; }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .tabbar a.shoot .i { width: 44px; height: 44px; padding: 11px; border-radius: var(--r-pill); background: var(--c-accent); color: var(--c-on-accent); stroke-width: 2.2; }
  .tabbar a.shoot span { display: none; }
}

/* Gaveta de navegação mobile */
.drawer { position: fixed; inset: 0; z-index: 40; }
.drawer .modal-backdrop { animation: fade var(--dur) var(--ease); }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 88%); overflow-y: auto;
  background: var(--bg); padding: calc(var(--sp-4) + env(safe-area-inset-top, 0px)) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  animation: slide var(--dur) var(--ease);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); }
.drawer details { border-bottom: 1px solid var(--line); }
.drawer summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: var(--sp-3) 0; font-weight: 700; cursor: pointer; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary .count { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; }
.drawer details a { display: block; padding: 8px 0 8px var(--sp-3); text-decoration: none; color: var(--ink-2); font-size: var(--fs-md); }
.drawer details a[aria-current="page"] { color: var(--ink); font-weight: 700; box-shadow: inset 2px 0 0 var(--accent); }

/* Sub-navegação do módulo (renderizada por app.js) */
.subnav { margin: calc(var(--sp-2) * -1) 0 var(--sp-6); }
.subnav .eyebrow { display: block; margin-bottom: var(--sp-1); }

/* Rodapé */
.site-footer { margin-top: var(--sp-8); padding: var(--sp-7) var(--gutter); border-top: 1px solid var(--line); background: var(--surface); font-size: var(--fs-14); color: var(--ink-3); }
.site-footer .footer-grid { max-width: var(--container); margin: 0 auto; }
.footer-grid { display: grid; gap: var(--sp-6); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-grid > div:first-child { grid-column: 1 / -1; }
.footer-grid .logo { white-space: normal; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); } .footer-grid > div:first-child { grid-column: auto; } }
.footer-grid h4 { margin: 0 0 var(--sp-3); font-size: var(--fs-14); color: var(--ink); }
.footer-grid a { display: block; padding: var(--sp-1) 0; text-decoration: none; color: var(--ink-3); }
.footer-grid a:hover { color: var(--ink); }
.footer-grid p { margin: var(--sp-2) 0 0; font-size: var(--fs-14); }

/* ---------- Movimento ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes slide { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---------- Estados alternáveis ---------- */
.btn-secondary[aria-pressed="true"] { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }
.btn:not(.btn-secondary)[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.panel .cluster h3 { margin: 0; }

/* ---------- Eventos, cursos e inscrição ---------- */
/* Etapas do fluxo (inscrição, checkout) */
.steps { display: flex; gap: var(--sp-2); list-style: none; margin: var(--sp-5) 0 var(--sp-6); padding: 0; counter-reset: step; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps li { flex: 1 0 auto; display: flex; align-items: center; gap: var(--sp-2); padding-top: var(--sp-3); border-top: 3px solid var(--line); font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-2); flex: none; }
.steps li.done { border-top-color: var(--ink); color: var(--ink-2); }
.steps li.done::before { content: "✓"; background: var(--ink); color: var(--ink-inverse); }
.steps li[aria-current="step"] { border-top-color: var(--accent); color: var(--ink); font-weight: 700; }
.steps li[aria-current="step"]::before { background: var(--accent); color: var(--on-accent); }

/* Opção selecionável (ingresso, forma de pagamento) */
.options { display: grid; gap: var(--sp-3); }
.option { position: relative; display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast); }
.option:hover { border-color: var(--line-strong); }
.option input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.option:has(input:checked) { border-color: var(--ink); background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.option .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.option .price { font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-xl); white-space: nowrap; font-variant-numeric: tabular-nums; }
.option.is-disabled { opacity: .5; pointer-events: none; }
.options.inline { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.options.inline .option { align-items: center; }

/* Grade de campos do formulário */
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-4); }
.form-grid > .col-6 { grid-column: span 6; }
.form-grid > .col-4 { grid-column: span 4; }
.form-grid > .col-3 { grid-column: span 3; }
.form-grid > .col-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid > [class*="col-"] { grid-column: span 6; } }
.fieldset { border: 0; padding: 0; margin: 0 0 var(--sp-7); }
.fieldset legend { font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-lg); padding: 0; margin-bottom: var(--sp-4); }
.req { color: var(--danger); margin-left: 2px; }

/* Documento com rolagem (termos, contratos) */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.doc > summary { list-style: none; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); cursor: pointer; font-weight: 700; }
.doc > summary::-webkit-details-marker { display: none; }
.doc > summary .grow { flex: 1; }
.doc > summary .i { transition: transform var(--dur); color: var(--ink-3); }
.doc[open] > summary .i { transform: rotate(180deg); }
.doc-body { max-height: 280px; overflow-y: auto; padding: 0 var(--sp-5) var(--sp-5); font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-2); border-top: 1px solid var(--line); }
.doc-body h4 { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700; color: var(--ink); margin: var(--sp-4) 0 var(--sp-1); }
.doc-body p { font-size: var(--fs-sm); margin: 0 0 var(--sp-2); max-width: none; }
.doc + .doc { margin-top: var(--sp-3); }
.accept { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); margin-top: var(--sp-2); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); cursor: pointer; }
.accept input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ink); flex: none; }
.accept[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--danger); }

/* Pares rótulo / valor */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2) var(--sp-4); margin: 0; font-size: var(--fs-sm); }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.kv .total { font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-xl); color: var(--ink); }

/* Aviso em linha */
.notice { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--info-soft); color: var(--ink); font-size: var(--fs-sm); }
.notice .i { color: var(--info); margin-top: 2px; }
.notice.warning { background: var(--warning-soft); }
.notice.warning .i { color: var(--warning); }
.notice.success { background: var(--success-soft); }
.notice.success .i { color: var(--success); }

/* Bloco de data (calendário de mesa) */
.date-block { display: grid; place-items: center; width: 64px; padding: var(--sp-2) 0; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); line-height: 1.1; flex: none; }
.date-block .m { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.date-block .d { font-family: var(--font-heading); font-size: var(--fs-2xl); font-weight: 800; }
.date-block .w { font-size: var(--fs-xs); color: var(--ink-3); }

/* Card de evento / curso */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-5); }
.offer { display: flex; flex-direction: column; gap: var(--sp-3); text-decoration: none; color: inherit; }
.offer .cover { height: auto; aspect-ratio: 16 / 9; margin: 0; border-radius: var(--r-md); position: relative; transition: transform var(--dur) var(--ease); }
.offer:hover .cover { transform: scale(1.01); }
.offer .cover .badge { position: absolute; top: var(--sp-3); left: var(--sp-3); }
.offer .body { display: flex; gap: var(--sp-3); }
.offer h3 { margin: 0 0 2px; font-size: var(--fs-lg); }
.offer .price-line { font-weight: 700; margin-top: var(--sp-1); }

/* Barra de inscrição fixa (mobile) */
.buy-bar { display: none; }
@media (max-width: 900px) {
  .buy-bar { display: flex; align-items: center; gap: var(--sp-3); position: fixed; left: 0; right: 0; z-index: 24; bottom: 0; padding: var(--sp-3) var(--gutter) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); }
  body.has-shell .buy-bar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: var(--sp-3); }
  .buy-bar .grow { flex: 1; min-width: 0; }
  body.has-buy-bar main { padding-bottom: 120px; }
}
@media (min-width: 801px) and (max-width: 900px) { body.has-shell .buy-bar { bottom: 0; } }

/* Painel lateral fixo (resumo da compra, ingressos) */
.sticky { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }

/* Ingresso */
.ticket { display: grid; grid-template-columns: minmax(0, 1fr) auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.ticket-main { padding: var(--sp-6); display: grid; gap: var(--sp-3); }
.ticket-stub { position: relative; display: grid; place-items: center; gap: var(--sp-2); padding: var(--sp-6); border-left: 2px dashed var(--line-strong); background: var(--surface-2); text-align: center; }
.ticket-stub::before, .ticket-stub::after { content: ""; position: absolute; left: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); }
.ticket-stub::before { top: -12px; }
.ticket-stub::after { bottom: -12px; }
.ticket .code { font-family: var(--font-mono); font-size: var(--fs-md); font-weight: 500; letter-spacing: .06em; }
.qr { width: 132px; height: 132px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: var(--r-sm); }
@media (max-width: 640px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket-stub { border-left: 0; border-top: 2px dashed var(--line-strong); }
  .ticket-stub::before, .ticket-stub::after { top: -12px; left: auto; bottom: auto; }
  .ticket-stub::before { left: -12px; }
  .ticket-stub::after { right: -12px; }
}

/* Linha do tempo (programação, módulos) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .t { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.timeline strong { display: block; }

/* ---------- Visualizador de foto (lightbox) ---------- */
.card-hit { position: absolute; inset: 0; z-index: 1; width: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; border-radius: var(--r-lg); }
.card .actions { z-index: 2; }
.card img, .viewer-img, .feed-card .ph, .viewer-thumb { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.protected, .protected * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

body.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-columns: minmax(0, 1fr) 400px; background: #0c0c0b; color: #f2f2ee; animation: fade var(--dur) var(--ease); }
.viewer-stage { position: relative; display: grid; padding: calc(var(--sp-7) + env(safe-area-inset-top, 0px)) var(--sp-9) var(--sp-8); min-height: 0; overflow: hidden; }
.viewer-photo { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.viewer-img { position: relative; background-size: cover; background-position: center; border-radius: var(--r-sm); }
.viewer-mark { position: absolute; inset: 0; background-repeat: repeat; pointer-events: none; border-radius: var(--r-sm); }
.viewer-guard { position: absolute; inset: 0; }
.viewer-rights { position: absolute; left: var(--sp-6); bottom: var(--sp-4); font-family: var(--font-mono); font-size: var(--fs-xs); color: rgba(255, 255, 255, .55); }
.viewer-nav { position: absolute; top: 50%; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; cursor: pointer; transform: translateY(-50%); }
.viewer-nav:hover { background: rgba(255, 255, 255, .2); }
.viewer-nav.prev { left: var(--sp-4); }
.viewer-nav.prev .i { transform: rotate(90deg); }
.viewer-nav.next { right: var(--sp-4); }
.viewer-nav.next .i { transform: rotate(-90deg); }
.viewer-side { background: var(--surface); color: var(--ink); overflow-y: auto; padding: calc(var(--sp-4) + env(safe-area-inset-top, 0px)) var(--sp-6) var(--sp-8); }
.viewer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-4); }
.viewer-title { font-size: var(--fs-2xl); margin: var(--sp-3) 0 var(--sp-2); }
.viewer-desc { color: var(--ink); font-size: var(--fs-md); }
.viewer-cta { margin: var(--sp-6) 0; padding: var(--sp-5); border-radius: var(--r-lg); background: var(--accent-soft); }
.viewer-more { font-size: var(--fs-md); margin: var(--sp-6) 0 var(--sp-3); }
.viewer-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.viewer-thumb { aspect-ratio: 1; border: 0; border-radius: var(--r-sm); background-size: cover; background-position: center; cursor: pointer; }
.viewer-thumb:hover { outline: 2px solid var(--ink); outline-offset: 2px; }
.viewer-legal { margin-top: var(--sp-6); font-size: var(--fs-xs); color: var(--ink-3); }
.viewer .kv dd { color: var(--ink); }
@media (max-width: 900px) {
  /* Celular: foto e painel empilhados; a foto aparece inteira (sem cortar) e o aviso de direitos fica abaixo dela */
  .viewer { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .viewer-stage { display: block; overflow: visible; padding: calc(56px + env(safe-area-inset-top, 0px)) var(--sp-3) var(--sp-3); }
  .viewer-photo { height: auto; }
  .viewer-rights { position: static; display: block; text-align: center; margin-top: var(--sp-3); }
  .viewer-nav { width: 40px; height: 40px; }
  .viewer-nav.prev { left: 6px; }
  .viewer-nav.next { right: 6px; }
  .viewer-side { overflow: visible; }
  .viewer-top { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); left: 12px; right: 8px; color: #fff; }
  .viewer-top .btn { color: #fff; }
}

/* Escudo: esconde as fotos ao detectar captura de tela, troca de janela ou impressão */
body.is-shielded .card img, body.is-shielded .viewer-img, body.is-shielded .feed-card .ph, body.is-shielded .viewer-thumb, body.is-shielded .photo img, body.is-shielded .hero, body.is-shielded .cover { filter: blur(28px) brightness(.7); transition: filter 60ms; }
@media print {
  .card img, .viewer, .feed-card .ph, .photo, .hero, .cover { visibility: hidden !important; }
  body::before { content: "Impressão bloqueada: as fotografias do 365 Clicks são protegidas por direitos autorais."; display: block; padding: 40px; font: 16px/1.5 sans-serif; }
}

/* ---------- Feed horizontal infinito ---------- */
.feed { display: flex; gap: var(--sp-5); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: var(--sp-2) var(--gutter) var(--sp-5); margin: 0 calc(var(--gutter) * -1); scrollbar-width: thin; overscroll-behavior-x: contain; }
.feed:focus-visible { outline-offset: -2px; }
.feed-card { flex: none; scroll-snap-align: center; display: flex; flex-direction: column; gap: var(--sp-3); width: auto; }
.feed-card .who { display: flex; align-items: center; gap: var(--sp-3); }
.feed-card .who .grow { flex: 1; min-width: 0; }
.feed-card .ph { position: relative; height: min(64vh, 620px); aspect-ratio: var(--ratio, 4/5); max-width: calc(100vw - 2 * var(--gutter)); border: 0; padding: 0; border-radius: var(--r-md); background-size: cover; background-position: center; cursor: zoom-in; }
.feed-card .cap { max-width: 520px; display: grid; gap: 4px; }
.feed-card .cap p { margin: 0; font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-bar { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.feed-bar .grow { flex: 1; }
.feed-end { flex: none; width: 120px; display: grid; place-items: center; color: var(--ink-3); }
@media (max-width: 800px) { .feed-card .ph { height: 58vh; } }

/* Comentários, citações e marcações */
.viewer-social { border-top: 1px solid var(--line); padding-top: var(--sp-5); margin-top: var(--sp-5); }
.comments { display: grid; gap: var(--sp-4); margin: var(--sp-3) 0 var(--sp-4); }
.comment { display: flex; gap: var(--sp-3); font-size: var(--fs-sm); line-height: 1.5; }
.mention { color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.comment-form { display: grid; gap: var(--sp-2); justify-items: end; }
.comment-form .mention-wrap { position: relative; width: 100%; }
.comment-form .textarea { min-height: 64px; }
.mention-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-float); padding: 4px; }
.mention-list button, .tag-opt { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: var(--r-sm); font-size: var(--fs-sm); cursor: pointer; text-align: left; color: var(--ink); }
.mention-list button:hover, .tag-opt:hover { background: var(--surface-2); }
.tag-options { max-height: 220px; overflow-y: auto; }

/* ---------- Landing page de oferta (StoryBrand) ---------- */
.lp-hero { min-height: 560px; }
.lp-hero h1 { max-width: 18ch; }
.lp-ghost { background: rgba(255, 255, 255, .14); color: #fff; }
.lp-ghost:hover { background: rgba(255, 255, 255, .24); }
.lp-facts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid rgba(255, 255, 255, .25); font-size: var(--fs-sm); color: rgba(255, 255, 255, .85); }
.lp-sec { padding: var(--sp-9) 0 0; }
.lp-sec > h2 { font-size: var(--fs-3xl); max-width: 26ch; margin-top: var(--sp-2); }
.lp-problems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.lp-problems > div { padding: var(--sp-5); border-top: 3px solid var(--ink); background: var(--surface); border-radius: 0 0 var(--r-md) var(--r-md); }
.lp-problems p { margin: var(--sp-2) 0 0; color: var(--ink); }
.lp-guide { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--sp-8); align-items: start; }
.lp-guide h2 { margin-top: var(--sp-2); }
.lp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-5); }
.lp-quote { margin: 0; padding: var(--sp-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.lp-quote blockquote { margin: 0 0 var(--sp-2); font-family: var(--font-display); font-size: var(--fs-24); line-height: 1.35; }
.lp-plan { list-style: none; counter-reset: passo; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); padding: 0; margin: 0 0 var(--sp-6); }
.lp-plan li { counter-increment: passo; display: grid; gap: var(--sp-1); padding: var(--sp-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.lp-plan li::before { content: counter(passo); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--font-mono); font-weight: 500; margin-bottom: var(--sp-2); }
.lp-plan span { color: var(--ink-2); font-size: var(--fs-sm); }
.lp-stakes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.lp-stakes ul { margin: var(--sp-3) 0 0; padding-left: 18px; display: grid; gap: var(--sp-2); }
.lp-final { margin-top: var(--sp-9); padding: var(--sp-8) var(--sp-6); text-align: center; border-radius: var(--r-xl); background: var(--accent-soft); display: grid; justify-items: center; gap: var(--sp-2); }
.lp-final h2 { margin: 0; max-width: 24ch; font-family: var(--font-display); font-weight: 400; font-size: clamp(var(--fs-32), 4vw, var(--fs-56)); }
@media (max-width: 800px) {
  .lp-problems, .lp-plan, .lp-stakes, .lp-guide { grid-template-columns: 1fr; }
  .lp-sec { padding-top: var(--sp-8); }
  .lp-sec > h2 { font-size: var(--fs-2xl); }
}

/* Faixa de ofertas acima do cabeçalho */
.promo { display: flex; align-items: center; gap: var(--sp-3); min-height: 40px; padding: 6px var(--gutter); padding-top: calc(6px + env(safe-area-inset-top, 0px)); background: var(--surface-inverse); color: var(--ink-inverse); font-size: var(--fs-sm); }
.promo-item { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: var(--sp-3); animation: fade 400ms var(--ease); }
.promo-tag { flex: none; padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.promo-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo a { flex: none; color: var(--ink-inverse); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.promo-close { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-inverse); cursor: pointer; opacity: .7; }
.promo-close:hover { opacity: 1; }
@media (max-width: 640px) { .promo-item { justify-content: flex-start; } .promo-tag { display: none; } }
.share-box { display: grid; gap: var(--sp-3); margin-top: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); }
.share-url { display: block; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-2); word-break: break-all; -webkit-user-select: all; user-select: all; }


/* =====================================================================
   Componentes do design system v0.1 (nomes oficiais do README)
   ===================================================================== */
.h1, .h2, .h3 { margin: 0; letter-spacing: var(--tracking-tight); line-height: var(--lh-tight); font-family: var(--font-sans); }
.h1 { font-size: clamp(var(--fs-40), 6vw, var(--fs-72)); font-weight: var(--fw-bold); }
.h2 { font-size: clamp(var(--fs-24), 3vw, var(--fs-32)); font-weight: var(--fw-bold); line-height: var(--lh-snug); }
.h3 { font-size: var(--fs-20); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
.h1 em, .h2 em { font-family: var(--font-display); font-weight: 400; font-style: italic; }
.lead { font-size: var(--fs-18); color: var(--c-ink-2); }
.muted { color: var(--c-muted); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; }
.section { padding: var(--sp-7) 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.section-head h2 { margin: 0; }
.section-head a { font-size: var(--fs-14); font-weight: var(--fw-semibold); text-decoration: none; color: var(--c-ink-2); white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }
.tag { display: inline-flex; align-items: center; gap: var(--sp-1); height: 24px; padding: 0 var(--sp-2); border-radius: var(--r-sm); font-size: var(--fs-12); font-weight: var(--fw-semibold); background: var(--c-accent-soft); color: var(--c-accent-ink); }
.photo-meta { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-6) var(--sp-3) var(--sp-3); background: var(--overlay-photo); color: #fff; font-size: var(--fs-14); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: var(--sp-4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--sp-2); }
.rail > * { scroll-snap-align: start; }
@media (min-width: 1200px) { .rail { grid-auto-columns: calc((100% - 3 * var(--sp-4)) / 4); } }
.person { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); }
.person-head { display: flex; align-items: center; gap: var(--sp-3); }
.person-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-1); border-radius: var(--r-md); overflow: hidden; }
.person-shots button { aspect-ratio: 1; border: 0; padding: 0; background: var(--c-surface-2) center/cover; cursor: zoom-in; }
.collections { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .collections { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .collections { grid-template-columns: 2fr 1fr 1fr; } }
.collection { position: relative; min-height: 280px; border-radius: var(--r-xl); overflow: hidden; background: #121212 center/cover; color: #fff; display: flex; align-items: end; padding: var(--sp-5); text-decoration: none; }
.collection::before { content: ""; position: absolute; inset: 0; background: var(--overlay-photo); }
.collection > * { position: relative; }
.cta-band { margin-top: var(--sp-8); padding: var(--sp-8) var(--sp-5); border-radius: var(--r-xl); background: #121212; color: #fff; text-align: center; display: grid; justify-items: center; gap: var(--sp-3); }
.cta-band p { color: #c9c9c4; margin: 0 auto; }
.cta-band .h1 { font-family: var(--font-display); font-weight: 400; }
.cta-band .h1 em { color: #fdba74; }
.stats { display: flex; gap: var(--sp-6); flex-wrap: wrap; }
.stats .stat b { display: block; font-size: var(--fs-24); letter-spacing: var(--tracking-tight); }
.stats .stat span { font-size: var(--fs-12); color: var(--c-muted); }
.load-more { display: flex; justify-content: center; margin-top: var(--sp-5); }

/* Rolagem infinita pelos desafios anteriores */
.infinite-block { margin-top: var(--sp-7); }
.infinite-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--c-line); }
.infinite-head h3 { margin: 0; }
.infinite-sentinel { height: 1px; }
.comment-body { flex: 1; min-width: 0; }
.comment.is-muted .comment-text { color: var(--c-muted); }
.comment-actions { display: flex; flex-wrap: wrap; gap: 2px; margin: 2px 0 0 -12px; }
.comment-actions .btn-sm { min-height: 28px; padding: 0 10px; font-size: var(--fs-12); color: var(--c-muted); }
.comment-actions .btn-sm:hover { color: var(--c-ink); }
.comment-extra:empty { display: none; }
.comment-extra { margin-top: 6px; }
.report { display: grid; gap: 8px; padding: var(--sp-3); border-radius: var(--r-md); background: var(--c-surface-2); }

/* ---------- Mídia 365: espaços patrocinados ---------- */
.ad-badge { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.promo-tag.is-ad { background: var(--c-surface-2); color: var(--c-ink); }
.ad-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) var(--sp-4); border: 1px dashed var(--c-line-strong); border-radius: var(--r-md); text-decoration: none; color: var(--c-ink); background: var(--c-surface); }
.ad-line:hover { border-color: var(--c-ink); }
.ad-line .ad-badge { margin-left: auto; }
.ad-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--sp-5); align-items: center; padding: var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--r-lg); background: var(--c-surface); text-decoration: none; color: var(--c-ink); }
.ad-card:hover { border-color: var(--c-ink); }
.ad-img { aspect-ratio: 16 / 9; border-radius: var(--r-md); background: linear-gradient(160deg, var(--tone2), var(--tone)); }
.ad-body { display: grid; gap: var(--sp-1); justify-items: start; }
.ad-body strong { font-size: var(--fs-20); }
.ad-vaga { display: block; padding: var(--sp-3) var(--sp-4); border: 1px dashed var(--c-line-strong); border-radius: var(--r-md); font-size: var(--fs-14); color: var(--c-muted); text-decoration: none; text-align: center; }
.ad-vaga:hover { color: var(--c-ink); border-color: var(--c-ink); }
@media (max-width: 640px) { .ad-card { grid-template-columns: 1fr; } }

/* Licenças no visualizador (grátis CC BY-NC · comercial · WhatsApp) */
.viewer-cta .lic { display: flex; gap: var(--sp-3); align-items: center; justify-content: space-between; padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.viewer-cta .lic > div { display: grid; gap: 2px; min-width: 0; }
.viewer-cta .lic .btn { flex: none; }

/* Fase 1 · Banco de Imagem Brasileiro */
.logo .logo-banco { letter-spacing: -0.03em; font-weight: 800; }
.logo .logo-banco b { color: var(--c-accent); font-weight: 800; }
@media (max-width: 520px) { .logo .logo-banco { font-size: var(--fs-14, 14px); } }
.hashtags { display: flex; flex-wrap: wrap; gap: 6px; }
.hashtags a, .hashtags button { font: inherit; font-size: var(--fs-sm); padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); text-decoration: none; border: 0; cursor: pointer; }
.hashtags a:hover, .hashtags button:hover, .hashtags [aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-3); }
.cat { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: center / cover; display: flex; align-items: flex-end; padding: var(--sp-4); color: #fff; text-decoration: none; }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0) 60%); }
.cat > span { position: relative; z-index: 1; display: grid; gap: 2px; }
.cat strong { font-size: var(--fs-lg); }
.cat .small { color: rgba(255,255,255,.85); }
