:root {
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f5f6fa;
  --panel: #ffffff;
  --ink: #1d2030;
  --ink-2: #5b6075;
  --ink-3: #8d92a6;
  --line: #e4e6ef;
  --line-2: #d3d6e2;
  --accent: #4c6fff;
  --accent-ink: #ffffff;
  --accent-soft: #eef1ff;
  --danger: #e5484d;
  --ok: #1f9d6b;
  --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 4px 16px rgba(20, 24, 40, .08);
  --shadow-lg: 0 8px 40px rgba(20, 24, 40, .18);
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.hidden { display: none !important; }

/* Botões e campos --------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; white-space: nowrap; }
.btn:hover { background: #f0f2f8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #eef0f6; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px; border: 0; background: transparent; color: var(--ink); }
.icon-btn:hover { background: #eef0f6; }
.icon-btn.on { background: var(--accent-soft); color: var(--accent); }
.icon-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.icon-btn svg { width: 20px; height: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.input, textarea.input, select.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; outline: none; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(76, 111, 255, .15); }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.err { color: var(--danger); min-height: 20px; font-size: 13px; }

/* Login ------------------------------------------------------------------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 20% 0%, #e6ebff 0, transparent 60%), radial-gradient(900px 500px at 100% 100%, #fde7f3 0, transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 32px 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.auth-card h1 { font-size: 22px; margin: 22px 0 6px; letter-spacing: -.02em; }
.auth-card p { margin: 0 0 20px; }
.auth-card .btn.primary { width: 100%; justify-content: center; height: 42px; }

/* Início ------------------------------------------------------------------ */
.home { min-height: 100%; display: flex; flex-direction: column; }
.home-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: rgba(245, 246, 250, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.home-top .grow { flex: 1; }
.search-box { position: relative; width: min(340px, 40vw); }
.search-box svg { position: absolute; left: 11px; top: 11px; width: 18px; height: 18px; color: var(--ink-3); }
.search-box .input { padding-left: 36px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; border: 0; }
.home-body { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px; }
.home-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.home-hero h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; flex: 1; min-width: 200px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--accent); border-color: var(--accent); }
.view-toggle { margin-left: auto; display: flex; gap: 2px; align-self: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: box-shadow .15s, transform .15s; position: relative; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card .thumb { aspect-ratio: 16 / 10; background: #fafbfd center / contain no-repeat; border-bottom: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); }
.card .thumb svg { width: 48px; height: 48px; opacity: .35; }
.card .meta { padding: 10px 12px 12px; display: flex; gap: 6px; align-items: flex-start; }
.card .meta .t { flex: 1; min-width: 0; }
.card .title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.card .fav { color: #f5a524; }
.card .more { width: 30px; height: 30px; }
.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:hover { background: #fafbfe; }
.row .ico { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.row .ico svg { width: 18px; height: 18px; }
.row .title { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .date { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.empty { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.empty > svg { width: 64px; height: 64px; color: var(--line-2); }
.drop-hint { position: fixed; inset: 0; background: rgba(76, 111, 255, .12); border: 3px dashed var(--accent); z-index: 50; display: grid; place-items: center; font-size: 20px; font-weight: 700; color: var(--accent); pointer-events: none; }

/* Menus, popovers, modais ------------------------------------------------- */
.menu { position: fixed; z-index: 100; min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-align: left; }
.menu button:hover { background: #f1f3f9; }
.menu button svg { width: 18px; height: 18px; color: var(--ink-2); }
.menu button.danger { color: var(--danger); }
.menu button.danger svg { color: var(--danger); }
.menu button .kbd { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu .label { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px 4px; }
.menu button.checked::after { content: "✓"; margin-left: auto; color: var(--accent); font-weight: 700; }
.modal-back { position: fixed; inset: 0; z-index: 200; background: rgba(20, 22, 35, .38); display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 22px; }
.modal.wide { max-width: 640px; }
.modal h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: -.01em; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1d2030; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 500; animation: fade .15s; max-width: calc(100vw - 32px); }
.toast.erro { background: var(--danger); }

/* Editor ------------------------------------------------------------------ */
.editor { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--map-bg, #fff); }
.ed-top { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 20; display: flex; gap: 8px; pointer-events: none; align-items: flex-start; }
.ed-top > * { pointer-events: auto; }
.pill { display: flex; align-items: center; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; }
.ed-title { max-width: 32vw; font-weight: 700; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-state { font-size: 12px; color: var(--ink-3); padding: 0 8px; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.save-state.bad { color: var(--danger); font-weight: 600; }
.save-state svg { width: 16px; height: 16px; }
.ed-top .grow { flex: 1; }
.viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: default; outline: none; user-select: none; -webkit-user-select: none; }
.viewport.panning { cursor: grabbing; }
.viewport.linking, .viewport.linking .node { cursor: crosshair; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.world svg.edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.world svg.links { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; z-index: 3; }
.world svg.links .hit { pointer-events: stroke; cursor: pointer; }
.nodes { position: absolute; left: 0; top: 0; z-index: 2; }

.node { position: absolute; left: 0; top: 0; width: max-content; display: flex; flex-direction: column; align-items: stretch; gap: 6px; font-family: var(--font); line-height: 1.32; cursor: pointer; border: 0 solid transparent; transition: box-shadow .12s; }
.node .n-main { display: flex; align-items: center; gap: 6px; }
.node .n-text { white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; max-width: 300px; min-width: 1ch; outline: none; }
.node.lvl-0 .n-text { max-width: 360px; text-align: center; }
.node .n-text:empty::before { content: "\200b"; }
.node.editing .n-text { cursor: text; user-select: text; -webkit-user-select: text; min-width: 90px; caret-color: var(--accent); }
.node.editing::after { border-color: #2ea8e6; }
.node.editing .n-text:empty::before { content: "Digite o tópico…"; color: #a3a8ba; font-weight: 400; }
.node.editing .addbtn, .node.editing .tog { display: none !important; }
.node.selected .n-text { cursor: text; }
.node .n-icons { white-space: nowrap; font-size: 1.05em; letter-spacing: 1px; }
.node .n-check { width: 18px; height: 18px; border-radius: 5px; border: 2px solid currentColor; display: grid; place-items: center; font-size: 12px; font-weight: 900; flex: none; opacity: .75; }
.node .n-check.done { background: var(--ok); border-color: var(--ok); color: #fff; opacity: 1; }
.node.done-node .n-text { text-decoration: line-through; opacity: .6; }
.node .n-badges { display: inline-flex; gap: 2px; flex: none; }
.node .n-badges span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; color: var(--ink-2); background: rgba(120, 128, 150, .12); }
.node .n-badges span:hover { background: rgba(76, 111, 255, .18); color: var(--accent); }
.node .n-badges svg { width: 13px; height: 13px; }
.node .n-img { display: flex; justify-content: center; }
.node .n-img img { display: block; border-radius: 6px; max-width: none; pointer-events: auto; }
/* Contorno de seleção fino e arredondado, com folga em volta (estilo MindMeister) */
.node::after { content: ""; position: absolute; inset: -5px -6px; border: 2px solid transparent; border-radius: 9px; pointer-events: none; transition: border-color .1s; }
.node.lvl-0::after { inset: -6px; border-radius: 17px; }
.node.selected::after { border-color: #2ea8e6; }
.node.match::after { border-color: #f5b700; background: rgba(245, 183, 0, .12); }
.node.match.selected::after { border-color: #2ea8e6; }
.node.drop-child::after { border-color: #1f9d6b; background: rgba(31, 157, 107, .08); border-style: dashed; }
.node.dragging { opacity: .3; }
.viewport.linking .node:hover::after { border-color: #f15bb5; }
.node .tog { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--branch, #888); display: none; place-items: center; font-size: 10px; font-weight: 800; color: var(--branch, #666); z-index: 2; line-height: 1; }
.node .tog.r { left: 100%; margin-left: 3px; }
.node .tog.l { right: 100%; margin-right: 3px; }
.node .tog.b { top: 100%; margin-top: 3px; left: 50%; margin-left: -9px; }
.node .tog.mid { top: 50%; margin-top: -9px; }
.node .tog.low { bottom: -9px; }
.node .tog { display: grid; width: 11px; height: 11px; font-size: 0; margin-top: -5.5px; }
.node .tog.r { margin-left: 4px; } .node .tog.l { margin-right: 4px; } .node .tog.b { margin-left: -5.5px; margin-top: 4px; }
.node .tog.low { bottom: -5.5px; margin-top: 0; }
.node .tog::before { content: ""; position: absolute; inset: -6px; }
.node .tog:not(.closed):hover { background: var(--branch, #888); }
.node .tog.closed { display: grid; font-size: 10px; height: 18px; margin-top: -9px; }
.node .tog.low.closed { margin-top: 0; bottom: -9px; }
.node .tog.closed { background: var(--branch, #888); color: #fff; min-width: 18px; width: auto; padding: 0 4px; border-radius: 9px; }
.node .addbtn { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #2ea8e6; color: #fff; border: 0; display: none; place-items: center; z-index: 3; box-shadow: 0 1px 3px rgba(20, 60, 90, .25); top: 50%; margin-top: -11px; }
.node .addbtn svg { width: 16px; height: 16px; }
.node.selected .addbtn { display: grid; }
.node .addbtn.r { left: 100%; margin-left: 24px; }
.node .addbtn.l { right: 100%; margin-right: 24px; }
.node .addbtn.b { top: 100%; margin-top: 24px; left: 50%; margin-left: -12px; }
.node .addbtn:hover { transform: scale(1.12); }
.node .addbtn.r.root { left: 50%; top: 100%; margin: 12px 0 0 -11px; }
.node .addbtn.r.solo { margin-left: 12px; }
.node .addbtn.l.solo { margin-right: 12px; }
.node .addbtn.b.solo { margin-top: 10px; }
.drop-line { position: absolute; height: 4px; border-radius: 2px; background: #1f9d6b; z-index: 4; pointer-events: none; }
.drag-ghost { position: fixed; z-index: 90; pointer-events: none; opacity: .85; transform-origin: 0 0; }
.side-hint { position: absolute; top: 0; bottom: 0; pointer-events: none; background: rgba(46, 168, 230, .07); z-index: 1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 80px; }
.side-hint span { background: #2ea8e6; color: #fff; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; }

/* Barra flutuante do tópico */
.ntool { position: absolute; z-index: 30; display: flex; align-items: center; gap: 1px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; }
.ntool .sep { width: 1px; height: 22px; background: var(--line); margin: 0 3px; }
.ntool .icon-btn { width: 34px; height: 34px; flex: none; }
.ntool { max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
.pop { position: fixed; z-index: 120; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px; width: 272px; }
.pop h4 { margin: 4px 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.pop h4:first-child { margin-top: 0; }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 12px; }
.sw { width: 100%; aspect-ratio: 1; border-radius: 7px; border: 1px solid rgba(0, 0, 0, .1); padding: 0; position: relative; }
.sw.none { background: linear-gradient(135deg, #fff 45%, var(--danger) 45%, var(--danger) 55%, #fff 55%); }
.sw.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.sw input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sw.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.seg { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.seg button { flex: 1; min-width: 36px; height: 34px; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; font-weight: 600; display: grid; place-items: center; }
.seg button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.seg button svg { width: 18px; height: 18px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-grid button { border: 0; background: none; font-size: 20px; height: 32px; border-radius: 7px; padding: 0; }
.emoji-grid button:hover, .emoji-grid button.on { background: #eef0f6; }
.emoji-grid button.on { outline: 2px solid var(--accent); }
.range { width: 100%; }

/* Barra de zoom e modos */
.ed-bottom { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 20; display: flex; gap: 8px; }
.zoom-val { min-width: 52px; text-align: center; font-weight: 600; font-size: 13px; border: 0; background: none; height: 36px; border-radius: 9px; }
.zoom-val:hover { background: #eef0f6; }
.mode-btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 9px; border: 0; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.mode-btn svg { width: 18px; height: 18px; }
.focus-bar { position: absolute; top: 114px; left: 50%; transform: translateX(-50%); z-index: 20; background: #1d2030; color: #fff; border-radius: 10px; padding: 6px 6px 6px 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); }
.focus-bar .btn { height: 30px; }

/* Busca */
.find { position: absolute; top: 114px; right: 10px; z-index: 25; display: flex; gap: 4px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.find .input { height: 34px; width: 220px; }
.find .count { font-size: 12px; color: var(--ink-2); min-width: 44px; text-align: center; }

/* Painel lateral de detalhes */
.drawer { position: absolute; top: 60px; right: 10px; bottom: 64px; width: 340px; max-width: calc(100vw - 20px); z-index: 35; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-head .t { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { flex: 1; overflow: auto; padding: 14px 16px 20px; }
.drawer section { margin-bottom: 22px; }
.drawer h3 { margin: 0 0 8px; font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.drawer h3 svg { width: 16px; height: 16px; }
.drawer textarea.input { min-height: 140px; }
.att { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.att a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-weight: 600; }
.att .sz { color: var(--ink-3); font-size: 12px; }
.att svg { width: 16px; height: 16px; flex: none; color: var(--ink-2); }
.comment { background: #f6f7fb; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.comment .who { font-size: 12px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; }
.comment .who button { border: 0; background: none; color: var(--ink-3); padding: 0; font-size: 12px; }
.comment .who button:hover { color: var(--danger); }
.comment .txt { white-space: pre-wrap; margin-top: 3px; }
.link-row { display: flex; gap: 6px; }

/* Visão em esboço (lista) */
.outline { position: absolute; inset: 0; overflow: auto; padding: 80px 16px 90px; background: var(--panel); }
.outline-inner { max-width: 820px; margin: 0 auto; }
.outline h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 16px; outline: none; }
.outline ul { list-style: none; margin: 0; padding-left: 26px; }
.outline > .outline-inner > ul { padding-left: 0; }
.outline li { position: relative; }
.ol-row { display: flex; align-items: flex-start; gap: 6px; padding: 3px 0; }
.ol-bullet { width: 18px; height: 26px; flex: none; display: grid; place-items: center; border: 0; background: none; padding: 0; }
.ol-bullet i { width: 7px; height: 7px; border-radius: 50%; background: var(--bc, #8d92a6); display: block; }
.ol-bullet.closed i { box-shadow: 0 0 0 4px rgba(141, 146, 166, .3); }
.ol-text { flex: 1; outline: none; white-space: pre-wrap; line-height: 26px; min-height: 26px; border-radius: 4px; padding: 0 4px; }
.ol-text:focus { background: var(--accent-soft); }
.ol-note { color: var(--ink-3); font-size: 12.5px; margin: -2px 0 4px 28px; white-space: pre-wrap; }

/* Visualizador compartilhado */
.ro-banner { position: absolute; bottom: 14px; right: 14px; z-index: 20; font-size: 12px; color: var(--ink-3); background: var(--panel); border: 1px solid var(--line); padding: 6px 10px; border-radius: 9px; }
.lightbox { position: fixed; inset: 0; z-index: 250; background: rgba(10, 12, 20, .85); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow-lg); }

.kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; }
.kbd-list kbd { font-family: var(--font); background: #f1f3f9; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.rev { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rev:last-child { border-bottom: 0; }
.rev .d { flex: 1; }
.share-link { display: flex; gap: 6px; margin-top: 10px; }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.user-row .n { flex: 1; }

@media (max-width: 720px) {
  .home-top { padding: 10px 16px; flex-wrap: wrap; }
  .search-box { width: 100%; order: 5; }
  .home-body { padding: 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .ed-title { max-width: 30vw; }
  .save-state span { display: none; }
  .hide-sm { display: none !important; }
  .drawer { top: auto; left: 10px; right: 10px; width: auto; height: 60vh; bottom: 10px; }
  .find .input { width: 140px; }
}

@media print {
  .ed-top, .ed-bottom, .ntool, .drawer, .find { display: none !important; }
}

/* ===================== Paridade com MindMeister ===================== */
.bar-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; align-self: center; }
.mode-btn svg:last-child { width: 14px; height: 14px; opacity: .6; }
.icon-btn.xs { width: 28px; height: 28px; flex: none; }
.icon-btn.xs svg { width: 16px; height: 16px; }
.input.sm { height: 34px; font-size: 13px; }

/* botões + (filho à direita, irmão embaixo) */
/* + de irmão: menor e encostado na borda de baixo, para não cobrir o tópico seguinte */
.node .addbtn { padding: 0; line-height: 0; }
.node .addbtn svg { display: block; width: 14px; height: 14px; margin: auto; stroke-width: 2.6; }
/* + de irmão: logo abaixo do tópico, sem encostar no texto */
.node .addbtn.sib { left: 50%; top: 100%; width: 18px; height: 18px; margin: 3px 0 0 -9px; }
.node .addbtn.sib svg { width: 12px; height: 12px; }
.node .addbtn.bl { left: 0; top: 100%; margin: 9px 0 0 4px; }
.node .addbtn.b.child { top: 100%; }
.node.lvl-0 .addbtn.child.r.root { left: 100%; top: 50%; margin: -11px 0 0 12px; }
.node .tog.bl { left: 4px; top: 100%; margin-top: 3px; }
.node:has(.tog.bl) .addbtn.sib { margin-left: 16px; }

/* etiquetas de tarefa e ícones */
.n-prio { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; flex: none; font-style: normal; }
.n-prio.p1 { background: #e5484d; }
.n-prio.p2 { background: #f5a524; }
.n-prio.p3 { background: #3f79f7; }
.node .n-badges em.n-chip { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(120, 128, 150, .14); color: #5b6075; line-height: 18px; white-space: nowrap; }
.node .n-badges em.n-chip.late { background: #ffe3e3; color: #c92a2a; }
.node .n-badges em.n-chip.prog { background: #e6f7ee; color: #1f7a52; }
.node .n-badges span b { font-size: 10px; margin-left: 1px; }
.node .n-badges span:has(b) { width: auto; padding: 0 4px; gap: 2px; display: inline-flex; align-items: center; }
.n-icons { display: inline-flex; align-items: center; gap: 2px; }
.n-ico { display: inline-grid; place-items: center; font-style: normal; }
.n-emo { display: inline-block; }

/* dica de teclado */
.kb-hint { position: absolute; z-index: 18; pointer-events: none; display: none; font-size: 12.5px; color: var(--ink-2); background: rgba(255, 255, 255, .9); border-radius: 8px; padding: 4px 6px; line-height: 2; white-space: nowrap; }
.kb-hint kbd { font-family: var(--font); background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; color: var(--ink); margin-right: 6px; }
.dark-map .kb-hint { background: rgba(30, 32, 42, .85); color: #c8ccda; }

/* janelinhas com abas */
.ptabs { display: flex; border-bottom: 1px solid var(--line); margin: -4px -12px 12px; padding: 0 8px; }
.ptabs button { flex: 1; border: 0; background: none; padding: 9px 6px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ptabs button.on { color: var(--accent); border-color: var(--accent); }
.pbody h4 { margin-top: 2px; }
.pfoot { border-top: 1px solid var(--line); margin: 10px -12px -4px; padding: 8px 8px 0; }
.seg .seg-sep, .note-tools .seg-sep { width: 1px; background: var(--line); margin: 4px 2px; flex: none; min-width: 1px; align-self: stretch; }
.sw.auto { background: conic-gradient(#3f79f7, #a56cf0, #ef5da8, #f45b3c, #f6a623, #7cc62a, #22c3c6, #3f79f7); -webkit-mask: radial-gradient(circle, transparent 36%, #000 38%); mask: radial-gradient(circle, transparent 36%, #000 38%); border: 0; }
.fonts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 10px; }
.fonts button { height: 38px; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; font-size: 17px; font-weight: 700; }
.fonts button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dropzone { border: 2px dashed var(--line-2); border-radius: 12px; padding: 22px 12px; text-align: center; cursor: pointer; display: grid; gap: 6px; justify-items: center; color: var(--ink-2); }
.dropzone svg { width: 30px; height: 30px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.lib { max-height: 290px; overflow: auto; margin-top: 8px; }
.lib-cat { font-size: 11.5px; font-weight: 700; color: var(--ink-3); margin: 8px 0 4px; }
.icon-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.icon-grid button { height: 36px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; color: var(--ink); }
.icon-grid button:hover { background: #eef0f6; }
.icon-grid button.on { background: var(--accent-soft); color: var(--accent); outline: 2px solid var(--accent); }
.img-edit img { width: 100%; max-height: 140px; object-fit: contain; border-radius: 8px; background: #f6f7fb; margin-bottom: 8px; }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* nota estilo post-it */
.pop.note-pop { background: #fff6d5; border-color: #f1e2a6; padding: 0; overflow: hidden; }
.note-tools { display: flex; align-items: center; gap: 1px; padding: 6px; border-bottom: 1px solid #f1e2a6; background: #fff1c2; }
.note-tools button { min-width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; font-weight: 800; font-size: 12px; color: #5c4d1a; display: grid; place-items: center; }
.note-tools button:hover { background: rgba(0, 0, 0, .07); }
.note-tools svg { width: 16px; height: 16px; }
.note-area { min-height: 150px; max-height: 360px; overflow: auto; padding: 12px 14px; outline: none; line-height: 1.5; color: #3d3418; cursor: text; }
.note-area:empty::before { content: attr(data-ph); color: #b9a86a; }
.note-area h1 { font-size: 18px; margin: 4px 0; }
.note-area h2 { font-size: 15px; margin: 4px 0; }
.note-area ul, .note-area ol { padding-left: 22px; margin: 4px 0; }
.note-area p { margin: 0 0 4px; }

/* painéis laterais (Aparência, Versões) */
.side-panel { position: absolute; top: 62px; bottom: 64px; width: 340px; max-width: calc(100vw - 20px); z-index: 35; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.side-panel.left { left: 10px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.sp-body { flex: 1; overflow: auto; padding: 12px 14px 18px; }
.sp-label { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 8px; }
.sp-body > .sp-label:first-child { margin-top: 2px; }
.cards { display: grid; gap: 8px; }
.cards.cols2 { grid-template-columns: 1fr 1fr; }
.card-opt { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 6px 6px 8px; display: grid; gap: 4px; font-weight: 600; font-size: 12.5px; color: var(--ink); }
.card-opt svg { width: 100%; height: auto; border-radius: 8px; display: block; }
.card-opt:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.card-opt.on { border-color: #2ea8e6; box-shadow: 0 0 0 2px rgba(46, 168, 230, .25); }
.side-panel .seg button { font-size: 12.5px; gap: 4px; display: flex; align-items: center; justify-content: center; }
.detail-row { display: flex; align-items: center; gap: 10px; }
.detail-row b { min-width: 36px; text-align: center; }
.pop .switch.small { font-size: 13px; margin-top: 4px; }

/* arrastar solto e apresentação */
.drag-ghost.free-drop { outline: 2px dashed #2ea8e6; outline-offset: 4px; border-radius: 8px; }
.world.animate { transition: transform .6s cubic-bezier(.3, .7, .2, 1); }
.node.dim { opacity: .12; transition: opacity .4s; }
svg.edges.dim path { opacity: .15; }
.editor.presenting .ed-top, .editor.presenting .ed-bottom, .editor.presenting .ntool, .editor.presenting .kb-hint, .editor.presenting .ro-banner { display: none !important; }
.editor.presenting .node .addbtn, .editor.presenting .node .tog { display: none !important; }
.present-bar { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 6px; background: rgba(29, 32, 48, .92); color: #fff; border-radius: 12px; padding: 6px 8px; box-shadow: var(--shadow-lg); }
.present-bar .icon-btn { color: #fff; }
.present-bar .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.present-bar span[data-c] { min-width: 54px; text-align: center; font-weight: 600; font-size: 13px; }
.present-bar .bar-sep { background: rgba(255, 255, 255, .2); }
.lightbox iframe { width: min(960px, 92vw); aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #000; }

@media (max-width: 720px) {
  .side-panel.left { left: 10px; right: 10px; width: auto; }
  .ntool { max-width: calc(100vw - 16px); }
}

/* bolinha no canto do tópico selecionado: ajusta a largura (ou o tamanho da imagem) */
.node .w-handle { position: absolute; right: -10px; bottom: -9px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #2ea8e6; cursor: nwse-resize; display: none; z-index: 4; }
.node.selected:not(.editing) .w-handle { display: block; }
.node .w-handle::before { content: ""; position: absolute; inset: -7px; }
/* tópico com imagem: imagem em cima, texto centralizado embaixo */
.node.has-img .n-main { justify-content: center; }
.node.has-img .n-text { text-align: center; }

/* galeria de modelos */
.modal.gal-modal { max-width: 1040px; width: 100%; height: min(720px, calc(100vh - 32px)); padding: 0; overflow: hidden; }
.gal { display: flex; height: 100%; }
.gal-side { width: 230px; flex: none; border-right: 1px solid var(--line); padding: 18px 10px; overflow: auto; background: #fafbfd; }
.gal-title { font-weight: 800; font-size: 18px; padding: 0 10px 12px; }
.gal-cats { display: flex; flex-direction: column; gap: 2px; }
.gal-cats button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font-weight: 600; color: var(--ink-2); }
.gal-cats button:hover { background: #eef0f6; }
.gal-cats button.on { background: var(--accent-soft); color: var(--accent); }
.gal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gal-top { display: flex; gap: 8px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.gal-top .search-box { flex: 1; width: auto; }
.gal-grid { flex: 1; overflow: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; align-content: start; }
.gal-card { cursor: pointer; }
.gal-thumb { position: relative; aspect-ratio: 2 / 1; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; transition: box-shadow .15s; }
.gal-thumb svg, .gal-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gal-card:hover .gal-thumb { box-shadow: var(--shadow); border-color: var(--line-2); }
.gal-blank { width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.gal-blank svg { width: 34px; height: 34px; }
.gal-hover { position: absolute; inset: 0; background: rgba(255, 255, 255, .86); display: none; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.gal-card:hover .gal-hover { display: flex; }
.gal-name { font-weight: 600; font-size: 13.5px; margin-top: 7px; padding: 0 2px; }
.tpl-tag { font-size: 11px; font-weight: 700; color: #7048e8; background: #f3f0ff; padding: 1px 6px; border-radius: 5px; }
.modal.tpl-prev { max-width: 1100px; width: 100%; height: min(760px, calc(100vh - 32px)); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.tpl-prev-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tpl-prev-head .grow { flex: 1; }
.tpl-prev-map { position: relative; flex: 1; min-height: 0; }
.tpl-prev-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.tpl-prev-foot p { flex: 1; margin: 0; }
.editor.embedded { position: absolute; inset: 0; }
.editor.embedded .ed-top, .editor.embedded .ro-banner { display: none !important; }
@media (max-width: 720px) {
  .gal { flex-direction: column; }
  .gal-side { width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .gal-title { display: none; }
  .gal-cats { flex-direction: row; overflow-x: auto; }
  .gal-cats button { white-space: nowrap; }
  .gal-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ===================== Modo noturno ===================== */
:root[data-night] {
  --bg: #15171c;
  --panel: #20232b;
  --ink: #e6e8ef;
  --ink-2: #a9aec0;
  --ink-3: #7c8296;
  --line: #2f333e;
  --line-2: #3b404d;
  --accent: #6d8bff;
  --accent-soft: #263055;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .35);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
:root[data-night] .input, :root[data-night] textarea.input, :root[data-night] select.input,
:root[data-night] .seg button, :root[data-night] .fonts button, :root[data-night] .card-opt,
:root[data-night] .kb-hint kbd, :root[data-night] .kbd-list kbd { background: #1a1d24; color: var(--ink); }
:root[data-night] .gal-thumb, :root[data-night] .card .thumb { background-color: #1a1d24; color: var(--ink-3); }
:root[data-night] .btn:hover, :root[data-night] .icon-btn:hover, :root[data-night] .btn.ghost:hover,
:root[data-night] .menu button:hover, :root[data-night] .icon-grid button:hover, :root[data-night] .emoji-grid button:hover,
:root[data-night] .gal-cats button:hover, :root[data-night] .row:hover { background: #2b2f3a; }
:root[data-night] .home-top { background: rgba(21, 23, 28, .9); }
:root[data-night] .auth { background: radial-gradient(1200px 600px at 20% 0%, #1d2440 0, transparent 60%), radial-gradient(900px 500px at 100% 100%, #2a1d33 0, transparent 60%), var(--bg); }
:root[data-night] .gal-side { background: #1a1d24; }
:root[data-night] .gal-hover { background: rgba(21, 23, 28, .86); }
:root[data-night] .comment { background: #1a1d24; }
:root[data-night] .kb-hint { background: rgba(30, 32, 42, .85); color: #c8ccda; }
:root[data-night] .row .ico { background: #263055; }
:root[data-night] .tpl-tag { background: #2e2650; color: #b9a6ff; }
:root[data-night] .node .tog { background: #1b1d24; }
:root[data-night] .node.editing { color: inherit; }
:root[data-night] .pop.note-pop { background: #3a3420; border-color: #57502f; }
:root[data-night] .note-tools { background: #443d24; border-color: #57502f; }
:root[data-night] .note-tools button { color: #f1e3a8; }
:root[data-night] .note-area { color: #f4ead0; }
:root[data-night] .toast { background: #e6e8ef; color: #15171c; }
:root[data-night] .outline { background: var(--panel); }
:root[data-night] .sw { border-color: rgba(255, 255, 255, .15); }
.night-btn svg { width: 20px; height: 20px; }

/* aviso "Modo noturno ativado" */
.night-notice { position: fixed; right: 16px; bottom: 76px; z-index: 260; width: min(360px, calc(100vw - 32px)); display: flex; gap: 12px; align-items: flex-start; background: #262a36; color: #eef0f6; border: 1px solid #3b4050; border-radius: 14px; padding: 14px 12px 14px 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); animation: nn-in .25s ease-out; }
@keyframes nn-in { from { opacity: 0; transform: translateY(10px); } }
.night-notice .nn-ico { font-size: 22px; line-height: 1; }
.night-notice .nn-txt { flex: 1; display: grid; gap: 4px; font-size: 13px; color: #b9bfd0; }
.night-notice .nn-txt b { color: #fff; font-size: 14.5px; }
.night-notice .nn-link { justify-self: start; margin-top: 4px; border: 0; background: none; color: #8fa6ff; font-weight: 600; padding: 0; font-size: 13px; }
.night-notice .nn-link:hover { text-decoration: underline; }
.night-notice .nn-x { border: 0; background: none; color: #9aa1b5; font-size: 22px; line-height: 1; width: 28px; height: 28px; border-radius: 8px; }
.night-notice .nn-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ===================== Página inicial (pública) ===================== */
.auth-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13px; margin-top: 18px; }
.auth-back svg { width: 16px; height: 16px; }
.auth-back:hover { color: var(--accent); }
.auth-card h1 { margin-top: 12px; }
.auth-alt { margin: 16px 0 0 !important; text-align: center; }

.lp { min-height: 100%; background: var(--panel); color: var(--ink); }
.lp a { text-decoration: none; }
.lp-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.lp-narrow { max-width: 780px; }
.lp-bar { display: flex; align-items: center; gap: 10px; }
.lp-bar .grow { flex: 1; }
.lp-top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-top .lp-bar { height: 64px; }
.lp .brand { color: var(--ink); }
.lp-nav { display: flex; gap: 22px; margin-left: 28px; }
.lp-nav a { color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.lp-nav a:hover { color: var(--accent); }

.lp-hero { text-align: center; padding: 56px 0 30px; overflow: hidden; }
.lp-kicker { color: var(--ink-2); font-size: 18px; margin: 0 0 10px; }
.lp-hero h1 { font-size: clamp(32px, 5.2vw, 56px); line-height: 1.08; letter-spacing: -.03em; margin: 0; }
.lp-sub { max-width: 620px; margin: 18px auto 0; color: var(--ink-2); font-size: 18px; line-height: 1.5; }
.lp-stage { position: relative; height: 380px; margin: 26px auto 0; max-width: 1000px; }
.lp-branches { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-r { stroke-dasharray: 700; stroke-dashoffset: 700; animation: lp-draw 1s ease-out forwards; animation-delay: var(--d); }
.lp-rl { fill: var(--ink-2); font: 700 22px var(--font); opacity: 0; animation: lp-fade .5s ease-out forwards; animation-delay: var(--d); }
@keyframes lp-draw { to { stroke-dashoffset: 0; } }
@keyframes lp-fade { to { opacity: 1; } }
.lp-cta-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 12px; background: var(--panel); padding: 18px 26px; border-radius: 999px; }
.btn.lp-cta { height: 58px; padding: 0 30px; font-size: 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(76, 111, 255, .35); }
.btn.lp-cta svg { width: 22px; height: 22px; }
.lp-cta-alt { color: var(--accent); font-weight: 600; font-size: 14px; }
.lp-cta-alt:hover { text-decoration: underline; }
.lp-pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 900px; margin: 10px auto 0; }
.lp-pills div { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; display: grid; gap: 2px; }
.lp-pills b { font-size: 17px; }
.lp-pills span { color: var(--ink-2); font-size: 14px; }

.lp-sec { padding: 72px 0; scroll-margin-top: 64px; }
.lp-alt { background: var(--bg); }
.lp-h2 { text-align: center; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.02em; margin: 0; }
.lp-lead { text-align: center; color: var(--ink-2); font-size: 17px; margin: 12px auto 36px; max-width: 640px; }
.lp-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 34px; }
.lp-tabs button { border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 14.5px; }
.lp-tabs button.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.lp-uso { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; }
.lp-uso-txt h2, .lp-uso-txt h3 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; margin: 0 0 20px; line-height: 1.15; }
.lp-uso-txt[hidden] { display: none; }
.lp-uso-txt ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.lp-uso-txt li { display: flex; gap: 10px; font-size: 16.5px; line-height: 1.45; }
.lp-uso-txt li svg { width: 22px; height: 22px; color: #1f9d6b; flex: none; margin-top: 1px; }
.lp-uso-img { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); min-height: 240px; display: grid; place-items: center; }
.lp-uso-img img { width: 100%; height: auto; display: block; border-radius: 10px; }
.lp-uso-img img:not([src]) { visibility: hidden; }

.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.lp-card h3 { margin: 14px 0 6px; font-size: 18px; }
.lp-card p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.lp-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }

.lp-tpls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-tpl { display: grid; gap: 8px; font-weight: 600; font-size: 14px; }
.lp-tpl-img { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; aspect-ratio: 2 / 1; background: #fff; }
.lp-tpl-img svg { width: 100%; height: 100%; display: block; }
.lp-center { text-align: center; margin-top: 30px; }
.lp-center .btn svg { width: 16px; height: 16px; }

.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.lp-steps > div { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.lp-steps b { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 17px; }
.lp-steps h3 { margin: 14px 0 6px; font-size: 18px; }
.lp-steps p { margin: 0; color: var(--ink-2); line-height: 1.5; }

.lp-faq { margin-top: 30px; display: grid; gap: 10px; }
.lp-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.lp-faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary svg { width: 18px; height: 18px; transition: transform .2s; flex: none; color: var(--ink-3); }
.lp-faq details[open] summary svg { transform: rotate(180deg); }
.lp-faq details p { margin: 0; padding: 0 18px 18px; color: var(--ink-2); line-height: 1.55; }

.lp-final { padding: 72px 0; text-align: center; background: linear-gradient(135deg, #4070ff, #a179f2 55%, #f7578c); color: #fff; }
.lp-final h2 { font-size: clamp(26px, 3.6vw, 40px); margin: 0; letter-spacing: -.02em; }
.lp-final p { opacity: .9; font-size: 17px; margin: 12px 0 26px; }
.lp-final .btn.lp-cta { background: #fff; color: #1d2030; border-color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.lp-foot { padding: 22px 0; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .lp-uso { grid-template-columns: 1fr; }
  .lp-grid { grid-template-columns: 1fr 1fr; }
  .lp-tpls { grid-template-columns: 1fr 1fr; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-pills { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lp-wrap { padding: 0 16px; }
  .lp-stage { height: 260px; }
  .lp-rl { display: none; }
  .lp-grid { grid-template-columns: 1fr; }
  .lp-sec { padding: 52px 0; }
  .btn.lp-cta { height: 52px; font-size: 16px; padding: 0 22px; }
}

/* ===================== Assinatura ===================== */
.sub-banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; line-height: 1.4; }
.sub-banner svg { width: 20px; height: 20px; flex: none; }
.sub-banner span { flex: 1; }
.sub-banner.trial { background: var(--accent-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.sub-banner.trial svg { color: var(--accent); }
.sub-banner.expired { background: #fff4e5; color: #6b3d00; border: 1px solid #ffd8a8; }
.sub-banner.expired svg { color: #e8590c; }
:root[data-night] .sub-banner.expired { background: #3b2a12; color: #ffd8a8; border-color: #6b4a1f; }
.sub-banner.in-editor { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); z-index: 30; margin: 0; width: min(640px, calc(100vw - 20px)); box-shadow: var(--shadow); }
.pay { text-align: center; display: grid; gap: 10px; justify-items: center; }
.pay h2 { margin: 4px 0 0; }
.pay p { margin: 0; }
.pay-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.pay-ico svg { width: 26px; height: 26px; }
.pay-price { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 6px 0; }
.pay-price b { font-size: 36px; letter-spacing: -.02em; }
.pay-price span { color: var(--ink-2); font-weight: 600; }
.pay-list { list-style: none; padding: 0; margin: 4px 0 6px; display: grid; gap: 6px; text-align: left; }
.pay-list li { display: flex; gap: 8px; align-items: center; }
.pay-list svg { width: 18px; height: 18px; color: #1f9d6b; flex: none; }
.btn.pay-btn { width: 100%; justify-content: center; height: 46px; font-size: 16px; }
.sub-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 6px; }
.sub-tag { justify-self: start; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #eef0f6; color: #5b6075; }
.sub-card.ativo .sub-tag, .st-chip.ativo { background: #e6f7ee; color: #1f7a52; }
.sub-card.teste .sub-tag, .st-chip.teste { background: var(--accent-soft); color: var(--accent); }
.sub-card.expirado .sub-tag, .st-chip.expirado { background: #ffe3e3; color: #c92a2a; }
.sub-card.isento .sub-tag, .st-chip.isento { background: #f3f0ff; color: #7048e8; }
.st-chip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-top: 4px; background: #eef0f6; }
.pay-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pay-row span:first-child { flex: 1; color: var(--ink-2); }
.pay-st { font-size: 12px; font-weight: 700; }
.pay-st.approved { color: #1f9d6b; } .pay-st.rejected, .pay-st.cancelled, .pay-st.refunded { color: #c92a2a; }
.sim-tag { display: inline-block; background: #fff3bf; color: #7a5b00; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; margin-top: 12px; }

/* preço na página inicial */
.lp-price { max-width: 460px; margin: 0 auto; background: var(--panel); border: 2px solid var(--accent); border-radius: 22px; padding: 28px; display: grid; gap: 16px; text-align: center; box-shadow: var(--shadow-lg); }
.lp-price-top { display: grid; gap: 6px; justify-items: center; }
.lp-price-top p { margin: 0; }
.lp-price-tag { font-size: 12.5px; font-weight: 800; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }
.lp-price-val { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 8px; }
.lp-price-val span, .pay-price span { white-space: nowrap; }
.lp-price-val b { font-size: 46px; letter-spacing: -.03em; }
.lp-price-val span { color: var(--ink-2); font-weight: 700; font-size: 17px; }
.lp-price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; text-align: left; }
.lp-price li { display: flex; gap: 10px; align-items: flex-start; }
.lp-price li svg { width: 20px; height: 20px; color: #1f9d6b; flex: none; margin-top: 1px; }
.lp-price .btn.lp-cta { justify-self: stretch; justify-content: center; }
.lp-price p.small { margin: 0; }

/* ===================== Termos e privacidade ===================== */
.legal-body { max-width: 760px; padding-top: 32px; padding-bottom: 56px; line-height: 1.65; }
.legal-body h1 { font-size: 32px; margin: 0 0 4px; letter-spacing: -.02em; }
.legal-body h2 { font-size: 19px; margin: 30px 0 8px; }
.legal-body p, .legal-body li { font-size: 15.5px; }
.legal-body ul { padding-left: 22px; display: grid; gap: 6px; }
.legal-body a { color: var(--accent); }
.legal-alt { margin-top: 36px; }
.lp-foot-in { display: grid; gap: 8px; }
.lp-foot-in > p { margin: 0; }
.lp-foot-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.lp-foot-links a { color: var(--ink-2); text-decoration: none; }
.lp-foot-links a:hover { color: var(--accent); }
.check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); margin: 4px 0 6px; line-height: 1.4; cursor: pointer; }
.check-line input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.check-line a { color: var(--accent); }

/* ===================== Esqueci minha senha ===================== */
.forgot-link { justify-self: end; font-size: 13px; color: var(--accent); text-decoration: none; margin: -4px 0 4px; }
.forgot-link:hover { text-decoration: underline; }
.code-input { font-size: 24px; letter-spacing: 10px; text-align: center; font-weight: 700; }

/* ===================== SEO: página montada no servidor ===================== */
.lp-h1 { display: block; }
.lp-h1 .lp-kicker { display: block; font-weight: 400; letter-spacing: 0; line-height: 1.4; }
.lp-h1-main { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lp-uso-img img { aspect-ratio: 900 / 520; object-fit: contain; }
.legal-body.nf { min-height: 50vh; }

/* ===================== Páginas de conteúdo: modelos e guias ===================== */
a.lp-tpl { color: inherit; text-decoration: none; }
a.lp-tpl:hover .lp-tpl-img { border-color: var(--accent); box-shadow: var(--shadow); }
.conteudo-corpo { padding-top: 22px; padding-bottom: 64px; }
.conteudo-corpo h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.1; letter-spacing: -.025em; margin: 6px 0 14px; }
.conteudo-corpo section { margin-top: 44px; }
.conteudo-corpo h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.015em; margin: 0 0 14px; }
.conteudo-corpo p, .conteudo-corpo li { font-size: 16.5px; line-height: 1.65; }
.conteudo-corpo a:not(.btn):not(.lp-tpl):not(.guia-card) { color: var(--accent); }
.mdl-migalhas { font-size: 13.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; }
.mdl-migalhas a { color: var(--ink-2) !important; text-decoration: none; }
.mdl-migalhas a:hover { color: var(--accent) !important; }
.mdl-lead { font-size: 18px !important; color: var(--ink-2); max-width: 760px; text-align: left; margin-left: 0; }
.mdl-topo { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; margin-top: 10px; }
.mdl-topo .lp-kicker { margin: 0; font-size: 15px; }
.mdl-acoes { display: grid; gap: 8px; justify-items: start; margin-top: 18px; }
.mdl-acoes p { margin: 0; }
.mdl-fig { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
.mdl-fig img { width: 100%; height: auto; aspect-ratio: 900 / 560; object-fit: contain; display: block; border-radius: 10px; }
.mdl-fig img:not([src]) { visibility: hidden; }
.mdl-fig figcaption { margin-top: 8px; text-align: center; }
.mdl-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mdl-lista li { display: flex; gap: 10px; }
.mdl-lista svg { width: 22px; height: 22px; color: #1f9d6b; flex: none; margin-top: 2px; }
.mdl-como { background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; }
.mdl-estrutura { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--panel); }
.mdl-arvore { list-style: none; margin: 0; padding: 0; }
.mdl-arvore .mdl-arvore { padding-left: 22px; border-left: 2px solid var(--line); margin: 6px 0 6px 6px; }
.mdl-arvore > li { padding: 5px 0; }
.mdl-arvore.n1 > li > b { color: var(--accent); }
.mdl-nota { display: block; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.mdl-dicas { padding-left: 22px; display: grid; gap: 8px; margin: 0; }
.mdl-cta { background: var(--accent-soft); border-radius: 20px; padding: 28px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.mdl-cta h2 { margin: 0; }
.mdl-cta p { margin: 0; color: var(--ink-2); }
.mdl-cat h2 { font-size: 22px; }
.mdl-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.mdl-card { display: grid; gap: 6px; align-content: start; }
.mdl-card small { font-weight: 400; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.guia { max-width: 760px; }
.guia h2 { margin-top: 36px; }
.guia h3 { font-size: 19px; margin: 24px 0 6px; }
.guia ul, .guia ol { padding-left: 22px; display: grid; gap: 6px; }
.guia-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 10px; }
.guia-card { display: grid; gap: 8px; align-content: start; border: 1px solid var(--line); border-radius: 18px; padding: 22px; color: inherit; text-decoration: none; background: var(--panel); }
.guia-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.guia-card h2 { font-size: 20px !important; margin: 0 !important; }
.guia-card p { margin: 0; color: var(--ink-2); font-size: 15px !important; }
.guia-mais { color: var(--accent); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; font-size: 14.5px; }
.guia-mais svg { width: 16px; height: 16px; }
.guia-outros { padding-left: 22px; }
@media (max-width: 760px) {
  .mdl-topo { grid-template-columns: 1fr; gap: 24px; }
  .mdl-estrutura { padding: 14px; }
}
/* depois que a imagem carrega, a caixa segue o formato real do mapa (sem esticar nem sobrar espaço) */
.lp-uso-img img[src], .mdl-fig img[src] { aspect-ratio: auto; }
.mdl-topo.fig-larga { grid-template-columns: 1fr; }
.mdl-topo.fig-larga .mdl-fig { max-width: 1100px; }
