/* Pauta — interface enxuta, neutra, feita para o polegar. */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --line: #e2e0d9;
  --line-strong: #cfccc2;
  --ink: #1b1b19;
  --ink-2: #57564f;
  --ink-3: #8a887f;
  --accent: #d93b36;
  --accent-ink: #ffffff;
  --ok: #2f7d4f;
  --warn: #a86a00;
  --err: #c0362c;
  --focus: #2d6cdf;
  --chart: #3b6fb6;
  --chart-soft: #d6e2f3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .08);
  --radius: 10px;
  --radius-sm: 7px;
  --nav-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #131312;
  --surface: #1c1c1a;
  --surface-2: #252522;
  --line: #2e2e2b;
  --line-strong: #3d3d39;
  --ink: #ecebe6;
  --ink-2: #b1afa6;
  --ink-3: #7d7b73;
  --accent: #ef5a4f;
  --ok: #5cb383;
  --warn: #d9a13b;
  --err: #ef6b5f;
  --focus: #6d9bf0;
  --chart: #7aa5e0;
  --chart-soft: #2a3a52;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131312;
    --surface: #1c1c1a;
    --surface-2: #252522;
    --line: #2e2e2b;
    --line-strong: #3d3d39;
    --ink: #ecebe6;
    --ink-2: #b1afa6;
    --ink-3: #7d7b73;
    --accent: #ef5a4f;
    --ok: #5cb383;
    --warn: #d9a13b;
    --err: #ef6b5f;
    --focus: #6d9bf0;
    --chart: #7aa5e0;
    --chart-soft: #2a3a52;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { flex: none; }
svg:not([width]) { width: 20px; height: 20px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- estrutura ---------- */
.shell { min-height: 100%; display: flex; }
.rail { display: none; }
.main { flex: 1; min-width: 0; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page { padding: 8px 16px 24px; max-width: 1120px; margin: 0 auto; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.sync-dot.on { background: var(--ok); }
.sync-dot.busy { background: var(--warn); }
.sync-dot.off { background: var(--err); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(6, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tabbar a, .rail a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 500;
}
.tabbar a.on, .rail a.on { color: var(--ink); }
.tabbar svg, .rail svg { width: 22px; height: 22px; }

@media (min-width: 820px) {
  .tabbar { display: none; }
  .main { padding-bottom: 24px; }
  .rail {
    display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: 0; height: 100vh; width: 92px; flex: none;
    padding: 18px 8px; border-right: 1px solid var(--line); background: var(--surface);
  }
  .rail .brand { font-weight: 750; font-size: 17px; letter-spacing: -.02em; text-align: center; margin: 2px 0 18px; }
  .rail a { padding: 10px 4px; border-radius: var(--radius-sm); font-size: 12px; }
  .rail a:hover { background: var(--surface-2); }
  .rail a.on { background: var(--surface-2); }
  .rail .spacer { flex: 1; }
  .page { padding: 12px 28px 32px; }
  .topbar { padding: 16px 28px 12px; }
}

/* ---------- elementos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 550; font-size: 15px; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { opacity: .9; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--err); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none;
  border: 0; background: transparent; border-radius: var(--radius-sm); color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hint { font-size: 13px; color: var(--ink-3); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink-2); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }
.sep { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 16px; }
.section-title { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 22px 0 10px; }
.section-title:first-child { margin-top: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.chip svg { width: 16px; height: 16px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 550; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.avatar.lg { width: 96px; height: 96px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.err { color: var(--err); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); }
.empty h3 { color: var(--ink); font-size: 16px; margin: 0 0 6px; }
.empty p { margin: 0 auto 14px; max-width: 380px; }

.progress { height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .3s; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- camadas: folha inferior, menu, aviso ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .38); z-index: 60; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 92vh;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: var(--shadow);
  animation: up .22s cubic-bezier(.2, .8, .2, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 650; }
.sheet-body { overflow: auto; padding: 16px 18px 20px; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.sheet.full { top: env(safe-area-inset-top); max-height: none; border-radius: 16px 16px 0 0; }
@media (min-width: 820px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); max-height: 86vh; border-radius: 14px; animation: pop .18s; }
  .sheet.wide { width: min(980px, 94vw); }
  .sheet.full { top: 50%; width: min(1100px, 96vw); height: 92vh; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -48%); } }
}

.menu {
  position: fixed; z-index: 70; min-width: 210px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: fade .12s;
}
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: transparent;
  border-radius: 7px; text-align: left; font-size: 15px;
}
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--err); }
.menu svg { width: 18px; height: 18px; color: var(--ink-2); }
.menu button.danger svg { color: var(--err); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 4px 0; }

.toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); display: flex; flex-direction: column; gap: 8px; width: min(420px, 92vw); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; box-shadow: var(--shadow); animation: up .2s; pointer-events: auto; display: flex; gap: 10px; align-items: center; }
.toast.err { background: var(--err); color: #fff; }
.toast button { background: transparent; border: 0; color: inherit; font-weight: 650; text-decoration: underline; padding: 0; }
@media (min-width: 820px) { .toasts { bottom: 20px; } }

/* ---------- Criar ---------- */
.ask { font-size: 22px; font-weight: 650; letter-spacing: -.015em; margin: 6px 0 12px; }
.prompt-box { position: relative; }
.prompt-box .textarea { font-size: 17px; min-height: 110px; padding: 14px; border-radius: var(--radius); }
.opts { display: grid; gap: 14px; margin-top: 16px; }
.opt-row { display: flex; flex-direction: column; gap: 8px; }
.style-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.style-pick button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 4px; text-align: center; font-size: 12px; font-weight: 550; color: var(--ink-2); }
.style-pick button canvas { width: 100%; aspect-ratio: 4/5; display: block; border-radius: 5px; margin-bottom: 4px; background: #000; }
.style-pick button.on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); padding: 0; overflow: hidden; flex: none; position: relative; }
.swatch input { position: absolute; inset: -8px; width: 60px; height: 60px; border: 0; padding: 0; cursor: pointer; }
.more-toggle { background: none; border: 0; color: var(--ink-2); font-weight: 600; padding: 8px 0; display: inline-flex; align-items: center; gap: 6px; }
.more-toggle svg { width: 16px; height: 16px; transition: transform .2s; }
.more-toggle.open svg { transform: rotate(180deg); }
.drafts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.draft { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; text-align: left; padding: 0; }
.draft .th { aspect-ratio: 4/5; background: var(--surface-2); display: block; width: 100%; object-fit: cover; }
.draft .meta { padding: 8px 10px; font-size: 13px; }
.draft .meta b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.editor { display: grid; gap: 18px; }
.editor > * { min-width: 0; }
@media (min-width: 980px) { .editor { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; } .editor .side { position: sticky; top: 72px; } }
.stage { position: relative; margin: 0 auto; width: 100%; max-width: 480px; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage canvas { width: 100%; height: auto; display: block; border-radius: 6px; background: #111; }
.stage .box { position: absolute; border: 1.5px dashed transparent; border-radius: 3px; cursor: move; }
.stage .box:hover { border-color: rgba(255, 255, 255, .55); }
.stage .box.sel { border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.stage-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.dots i.on { background: var(--ink); }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.strip .th { flex: none; width: 64px; border-radius: 5px; border: 2px solid transparent; padding: 0; background: var(--surface-2); overflow: hidden; position: relative; }
.strip .th canvas, .strip .th img { width: 100%; display: block; aspect-ratio: 4/5; object-fit: cover; }
.strip .th.on { border-color: var(--ink); }
.strip .add { flex: none; width: 64px; aspect-ratio: 4/5; border: 1px dashed var(--line-strong); border-radius: 5px; background: transparent; display: grid; place-items: center; color: var(--ink-3); }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.caption-box .textarea { min-height: 160px; }
.tags-edit { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 6px; padding: 4px 4px 4px 8px; font-size: 14px; color: var(--focus); }
.tag button { border: 0; background: transparent; color: var(--ink-3); width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; padding: 0; }
.tag button svg { width: 14px; height: 14px; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--surface-2); border: 0; padding: 0; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .more { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: 0; display: grid; place-items: center; }
.ph .more svg { width: 16px; height: 16px; }
.ph .n { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 650; color: #fff; background: rgba(0,0,0,.55); border-radius: 4px; padding: 1px 5px; }
.ph.sel { outline: 3px solid var(--accent); outline-offset: -3px; }
.ph .check { position: absolute; top: 5px; left: 5px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); }
.ph.sel .check { background: var(--accent); border-color: var(--accent); }

/* ---------- visualização por rede ---------- */
.mock { margin: 0 auto; width: 100%; max-width: 380px; background: #fff; color: #111; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; }
.mock.dark { background: #000; color: #f5f5f5; border-color: #222; }
.mock svg { width: 22px; height: 22px; flex: none; }
.mock .mhead { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.mock .mhead img, .mock .mhead .ph0 { width: 32px; height: 32px; border-radius: 50%; background: #ddd; object-fit: cover; }
.mock .mhead b { font-size: 14px; }
.mock .media { position: relative; background: #000; overflow: hidden; }
.mock .media .track { display: flex; transition: transform .25s; }
.mock .media .track > * { flex: none; width: 100%; }
.mock .media canvas, .mock .media img { width: 100%; display: block; }
.mock .count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.mock .acts { display: flex; gap: 14px; padding: 10px 12px 6px; align-items: center; }
.mock .acts svg { width: 24px; height: 24px; }
.mock .cap { padding: 0 12px 12px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.4; }
.mock .cap .ht { color: #00376b; }
.mock.dark .cap .ht { color: #e0f1ff; }
.mock .cap .more { color: #737373; cursor: pointer; }
.mock.vertical { max-width: 300px; aspect-ratio: 9/16; position: relative; border-radius: 16px; background: #000; color: #fff; }
.mock.vertical .media { position: absolute; inset: 0; display: flex; align-items: center; }
.mock.vertical .overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 64px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.55)); font-size: 13px; }
.mock.vertical .rightbar { position: absolute; right: 8px; bottom: 90px; display: flex; flex-direction: column; gap: 16px; align-items: center; font-size: 11px; }
.mock.vertical .rightbar svg { width: 28px; height: 28px; }
.mock.vertical .storybar { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 3px; }
.mock.vertical .storybar i { flex: 1; height: 2px; background: rgba(255,255,255,.4); border-radius: 2px; }
.mock.vertical .storybar i.on { background: #fff; }
.mock .grid4 { display: grid; gap: 2px; grid-template-columns: 1fr 1fr; border-radius: 14px; overflow: hidden; margin: 0 12px 10px; }
.mock .grid4 canvas { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.mock .grid4.n1 { grid-template-columns: 1fr; }
.mock .grid4.n1 canvas { aspect-ratio: auto; }
.mock .xtext { padding: 0 12px 8px 54px; white-space: pre-wrap; line-height: 1.4; }
.mock.x { background: #000; color: #e7e9ea; border-color: #2f3336; }
.mock.x .ht { color: #1d9bf0; }
.mock.fb .ht { color: #216fdb; }
.warnline { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--warn); margin: 10px 0 0; }
.warnline svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* ---------- Planner ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal .dow { background: var(--surface); font-size: 11px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; text-align: center; padding: 8px 0; }
.cal .day { background: var(--surface); min-height: 56px; padding: 4px; display: flex; flex-direction: column; gap: 3px; border: 0; text-align: left; align-items: stretch; }
.cal .day.out { background: var(--bg); color: var(--ink-3); }
.cal .day.today .num { background: var(--ink); color: var(--bg); }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.cal .day.drop { box-shadow: inset 0 0 0 2px var(--focus); }
.cal .num { font-size: 12px; font-weight: 600; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.cal .pips { display: flex; flex-wrap: wrap; gap: 3px; }
.cal .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.cal .pip.agendado { background: var(--focus); }
.cal .pip.publicado { background: var(--ok); }
.cal .pip.erro { background: var(--err); }
.cal .mini { font-size: 11px; line-height: 1.25; padding: 2px 4px; border-radius: 4px; background: var(--surface-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; cursor: grab; }
@media (min-width: 820px) {
  .cal .day { min-height: 104px; }
  .cal .mini { display: block; }
  .cal .pips { display: none; }
}
.pcard { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); align-items: center; }
.pcard + .pcard { margin-top: 8px; }
.pcard .th { width: 56px; height: 70px; border-radius: 6px; object-fit: cover; background: var(--surface-2); flex: none; }
.pcard .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nets { display: inline-flex; gap: 4px; color: var(--ink-2); }
.nets svg { width: 15px; height: 15px; }
.tagdot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table th button { border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; padding: 0; }
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }

/* ---------- Análise ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: 14px; }
.kpi .k { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 13px; margin-top: 2px; color: var(--ink-3); }
.kpi .d.up { color: var(--ok); }
.kpi .d.down { color: var(--err); }
.charts { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 900px) { .charts { grid-template-columns: 1fr 1fr; } .charts .wide { grid-column: 1 / -1; } }
.chart { padding: 14px 14px 8px; position: relative; }
.chart h3 { margin: 0 0 2px; font-size: 15px; font-weight: 650; }
.chart .sub { font-size: 13px; color: var(--ink-3); margin: 0 0 8px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis text { fill: var(--ink-3); font-size: 11px; }
.chart .grid line { stroke: var(--line); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12px; padding: 6px 8px; border-radius: 6px; white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10px; color: var(--ink-3); }
.heat i { aspect-ratio: 1; border-radius: 2px; background: var(--surface-2); display: block; }
.insight { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.insight:last-child { border-bottom: 0; }
.insight b { font-weight: 650; }

/* ---------- Dicas ---------- */
.trend { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trend:last-child { border-bottom: 0; }
.trend .rk { width: 22px; text-align: right; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.trend img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.tip-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.tip-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bullets { margin: 4px 0 0; padding-left: 18px; }
.bullets li { margin-bottom: 4px; }

/* ---------- Rostos ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent; padding: 6px 0; text-align: center; }
.person img, .person .ph0 { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.person b { font-size: 14px; font-weight: 600; }
.person small { font-size: 12px; color: var(--ink-3); }
.person.add .ph0 { display: grid; place-items: center; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--ink-3); }
.viewer { position: relative; background: #000; border-radius: 8px; overflow: hidden; }
.viewer img { width: 100%; max-height: 62vh; object-fit: contain; }
.viewer .fbox { position: absolute; border: 2px solid #fff; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.viewer .fbox span { position: absolute; left: -2px; bottom: 100%; margin-bottom: 3px; background: #fff; color: #111; font-size: 11px; font-weight: 650; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.viewer .fbox.unknown { border-style: dashed; border-color: #ffd257; }
.viewer .fbox.unknown span { background: #ffd257; }
.facecrop { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--surface-2); flex: none; }
.facecrop canvas { width: 100%; height: 100%; display: block; }
.scanbox { display: flex; gap: 14px; align-items: center; }

/* ---------- entrada ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 18px; }
.gate .box { width: min(420px, 100%); }
.gate h1 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 6px; }
.gate p { color: var(--ink-2); margin: 0 0 22px; }

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