/* ===== Temas ===== */
:root, [data-theme="vice"] {
  --bg: #0b0710; --side: #100a17; --panel: #171021; --panel-2: #1f1530; --line: #2a1f3a;
  --text: #f3ecff; --muted: #9a8bb3; --dim: #6c5e84;
  --acc: #c04bff; --acc-2: #ff3d9a; --acc-ink: #fff;
  --acc-grad: linear-gradient(135deg, #8b3dff 0%, #c04bff 45%, #ff3d9a 100%);
  --glow: 0 0 24px #c04bff55; --ok: #3ee6a8; --err: #ff5c7a;
  --hero-font: 'Anton', Impact, sans-serif;
}
[data-theme="lime"] {
  --bg: #0b0c0e; --side: #0f1013; --panel: #15171b; --panel-2: #1c1f24; --line: #24272d;
  --text: #f2f4f7; --muted: #8b9099; --dim: #5d626b;
  --acc: #d6ff3d; --acc-2: #b8f000; --acc-ink: #0b0c0e;
  --acc-grad: linear-gradient(135deg, #e4ff6a, #c8f520);
  --glow: 0 0 18px #d6ff3d33; --ok: #d6ff3d; --err: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ===== Sidebar ===== */
#side { width: 232px; flex-shrink: 0; background: var(--side); border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; transition: width .2s; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--panel); flex: 1; margin-right: 6px; font-weight: 700; }
.logo { width: 24px; height: 24px; border-radius: 7px; background: var(--acc-grad); color: var(--acc-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; box-shadow: var(--glow); }
.icon { width: 32px; height: 32px; border-radius: 8px; color: var(--muted); border: 1px solid var(--line); }
#nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text); font-weight: 500; }
#nav a:hover, #nav a.on { background: var(--panel-2); }
.ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 12px; color: #fff; }
.ic-home { background: #3a3350; } .ic-gen { background: linear-gradient(135deg,#5b8cff,#8b3dff); }
.ic-el { background: linear-gradient(135deg,#2fb5ff,#5b6cff); } .ic-fav { background: linear-gradient(135deg,#ff3d9a,#ff7a59); }
.ic-show { background: #3a3350; }
.side-sec { margin: 18px 10px 6px; color: var(--dim); font-size: 12px; }
.new-project { text-align: left; padding: 7px 10px; color: var(--muted); border-radius: 8px; }
.new-project:hover { background: var(--panel-2); color: var(--text); }
.proj { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; overflow: hidden; }
.proj span { overflow: hidden; text-overflow: ellipsis; }
.proj:hover, .proj.on { background: var(--panel-2); }
.proj .th { width: 22px; height: 22px; border-radius: 5px; background: var(--panel-2) center/cover; flex-shrink: 0; }
body.collapsed #side { width: 64px; }
body.collapsed #side span, body.collapsed .side-sec, body.collapsed #projectList { display: none; }

/* ===== Topo ===== */
#app { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#top { height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); }
.tabs { grid-column: 2; display: flex; gap: 18px; font-size: 13px; font-weight: 600; }
.tabs a { color: var(--dim); } .tabs a.on { color: var(--text); }
.top-right { grid-column: 3; justify-self: end; display: flex; gap: 8px; align-items: center; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12px; color: var(--muted); }
.chip b { color: var(--text); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--acc-grad); color: var(--acc-ink); font-weight: 700; font-size: 12px; }
#view { flex: 1; overflow-y: auto; padding: 18px 18px 160px; }
h1.page { font-size: 16px; margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center; }

/* ===== Home ===== */
.hero { display: flex; flex-direction: column; align-items: center; padding: 40px 0 20px; }
.stack { position: relative; height: 150px; width: 420px; margin-bottom: 18px; }
.stack div { position: absolute; top: 20px; width: 170px; height: 115px; border-radius: 12px; background: var(--panel-2) center/cover; border: 1px solid var(--line); }
.stack div:nth-child(1) { left: 0; transform: rotate(-6deg); opacity: .7; }
.stack div:nth-child(3) { right: 0; transform: rotate(6deg); opacity: .7; }
.stack div:nth-child(2) { left: 115px; top: 0; width: 190px; height: 140px; z-index: 2; box-shadow: 0 10px 40px #0008, var(--glow); }
.hero h2 { font-family: var(--hero-font, Inter); font-weight: 800; font-size: 44px; letter-spacing: .01em; margin: 0; text-transform: uppercase; background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="lime"] .hero h2 { color: var(--text); background: none; -webkit-background-clip: initial; }
.hero p { color: var(--muted); margin: 6px 0 0; }
.home-slot { height: 120px; }
.row-title { font-weight: 600; margin: 28px 0 10px; }
.projects-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.pcard { width: 220px; flex-shrink: 0; cursor: pointer; }
.pcard .covers { height: 124px; border-radius: 12px; background: var(--panel); display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; overflow: hidden; border: 1px solid var(--line); }
.pcard .covers > * { background: var(--panel-2); width: 100%; height: 100%; object-fit: cover; }
.pcard .covers > :first-child { grid-row: span 2; }
.pcard.new .covers { display: grid; place-items: center; grid-template-columns: 1fr; font-size: 22px; color: var(--muted); }
.pcard b { display: block; margin-top: 7px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Galeria ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px; }
.tile { position: relative; background: var(--panel); aspect-ratio: var(--ar, 1); overflow: hidden; cursor: pointer; border-radius: 4px; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; top: 8px; left: 8px; background: #000a; backdrop-filter: blur(6px); border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.badge.new::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: var(--glow); }
.tile .acts { position: absolute; top: 6px; right: 6px; display: flex; flex-direction: column; gap: 4px; opacity: 0; transition: .15s; }
.tile:hover .acts { opacity: 1; }
.tile .acts button { width: 28px; height: 28px; border-radius: 8px; background: #000b; color: #fff; font-size: 13px; }
.tile .acts button.on { color: var(--acc-2); }
.tile .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; color: #fffc; pointer-events: none; }
.tile .state { height: 100%; display: grid; place-items: center; text-align: center; padding: 12px; color: var(--muted); font-size: 12px; }
.tile .state.err { color: var(--err); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--acc); animation: spin 1s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.tile .cost { position: absolute; bottom: 6px; left: 6px; font-size: 11px; background: #000a; padding: 2px 7px; border-radius: 999px; }
.toolbar { display: flex; gap: 6px; }
.tbtn { border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--muted); background: var(--panel); }
.tbtn:hover, .tbtn.on { color: var(--text); border-color: var(--acc); }
.empty { color: var(--muted); padding: 60px 0; text-align: center; }

/* ===== Compositor ===== */
#composer { position: fixed; left: calc(232px + (100vw - 232px) / 2); transform: translateX(-50%); bottom: 18px; display: flex; gap: 8px; align-items: stretch; width: min(820px, calc(100vw - 260px)); z-index: 20; transition: bottom .3s; }
body.collapsed #composer { left: calc(64px + (100vw - 64px) / 2); }
/* no Início o compositor fica embaixo, como nas outras telas */
.mode { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 5px; }
.mode button { color: var(--dim); font-size: 11px; border-radius: 9px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mode button.on { background: var(--panel-2); color: var(--text); }
.box { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; box-shadow: 0 10px 40px #0009; }
#prompt { background: none; border: 0; outline: none; resize: none; width: 100%; max-height: 160px; }
#prompt::placeholder { color: var(--dim); }
#attach { display: flex; gap: 6px; flex-wrap: wrap; }
#attach:empty { display: none; }
.att { position: relative; width: 44px; height: 44px; border-radius: 8px; background: center/cover; border: 1px solid var(--line); }
.att button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: #000; font-size: 10px; color: #fff; }
.att-tag { background: var(--panel-2); border-radius: 8px; padding: 0 8px; font-size: 12px; display: flex; align-items: center; color: var(--acc); }
.opts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.opt { padding: 4px 8px; border-radius: 7px; font-weight: 600; display: flex; gap: 5px; align-items: center; color: var(--text); }
.opt i { font-style: normal; color: var(--muted); font-size: 10px; }
.opt:hover { background: var(--panel-2); }
.opt.sq { width: 26px; height: 26px; justify-content: center; border: 1px solid var(--line); color: var(--muted); padding: 0; }
.count { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.count button { color: var(--muted); }
#generate { width: 88px; border-radius: 14px; background: var(--acc-grad); color: var(--acc-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; box-shadow: var(--glow); }
#generate b { font-size: 12px; letter-spacing: .04em; }
#generate:disabled { opacity: .5; }

/* ===== Popover ===== */
.pop { position: fixed; z-index: 50; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 60px #000c; padding: 6px; min-width: 160px; max-height: 420px; overflow-y: auto; }
.pop .search { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; outline: none; }
.pop .grp { color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 10px 8px 4px; }
.pop .it { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 7px 8px; border-radius: 8px; }
.pop .it:hover, .pop .it.on { background: var(--panel-2); }
.pop .av { width: 30px; height: 30px; border-radius: 8px; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.pop .meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.pop .meta span { background: var(--bg); color: var(--muted); font-size: 10px; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.pop .it b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.models-pop { width: 380px; max-height: 480px; }
.pop .av.logo { background: #d9d4e4 center/68% no-repeat; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 60; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; width: min(760px, 94vw); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.mhead { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; }
.mbody { display: grid; grid-template-columns: 170px 1fr; min-height: 380px; overflow: hidden; }
.mnav { border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.mnav button { text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--muted); }
.mnav button.on { background: var(--panel-2); color: var(--text); }
.mpane { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.inp { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; outline: none; width: 100%; }
.inp:focus { border-color: var(--acc); }
textarea.inp { font-family: ui-monospace, monospace; font-size: 12px; }
.btn { border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; font-weight: 600; background: var(--panel-2); align-self: flex-start; }
.btn.pri { background: var(--acc-grad); color: var(--acc-ink); border: 0; box-shadow: var(--glow); }
.btn.danger { color: var(--err); }
.pcard2 { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pill.ok { background: #3ee6a822; color: var(--ok); } .pill.no { background: #ff5c7a22; color: var(--err); }
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme { border: 2px solid var(--line); border-radius: 12px; padding: 12px; text-align: left; background: var(--bg); }
.theme.on { border-color: var(--acc); }
.theme .sw { height: 44px; border-radius: 8px; margin-bottom: 8px; }

/* Picker de elementos */
.picker { width: min(900px, 94vw); }
.ptabs { display: flex; gap: 4px; }
.ptabs button { padding: 5px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 13px; }
.ptabs button.on { background: var(--text); color: var(--bg); }
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ecard { cursor: pointer; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.ecard:hover { border-color: var(--acc); }
.ecard .im { aspect-ratio: 16/10; background: var(--panel-2) center/cover; }
.ecard .t { padding: 6px 8px; font-size: 11px; color: var(--muted); }
.ecard .t b { display: block; color: var(--text); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecard.add { display: grid; place-items: center; min-height: 130px; color: var(--muted); }

/* ===== Visualizador ===== */
.viewer { position: fixed; inset: 0; z-index: 70; background: #000e; display: grid; grid-template-columns: 1fr 340px; }
.viewer .stage { display: grid; place-items: center; padding: 30px; position: relative; min-height: 0; }
.viewer .stage img, .viewer .stage video { max-width: 100%; max-height: calc(100vh - 60px); border-radius: 8px; }
.viewer .close { position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; border-radius: 50%; background: #fff1; color: #fff; font-size: 16px; }
.viewer .nav { position: absolute; top: 50%; width: 40px; height: 40px; border-radius: 50%; background: #fff1; color: #fff; }
.viewer .prev { left: 14px; } .viewer .next { right: 14px; }
.viewer aside { background: var(--panel); border-left: 1px solid var(--line); padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.viewer h4 { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.viewer .prompt { background: var(--bg); padding: 10px; border-radius: 10px; white-space: pre-wrap; font-size: 13px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv span:nth-child(odd) { color: var(--muted); }
.kv span:nth-child(even) { text-align: right; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.vacts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vacts .btn { align-self: stretch; text-align: center; }

/* ===== Saldo / contas ===== */
.icon.flat { border: 0; width: 28px; height: 28px; font-size: 15px; }
.icon.flat.spin { animation: spin .8s linear infinite; }
.chip { display: flex; align-items: center; gap: 6px; }
.chip .bolt, .bal .bolt { color: var(--acc); text-shadow: var(--glow); }
.chip #spent { color: var(--dim); font-size: 11px; }
.chip.low { border-color: var(--err); }
.bal-pop { width: 320px; padding: 14px; }
.bal { display: flex; flex-direction: column; gap: 12px; }
.bal + .bal { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.bal-top { display: flex; align-items: baseline; gap: 8px; }
.bal .big { font-size: 22px; }
.bal-hint { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.btn.full { width: 100%; align-self: stretch; text-align: center; padding: 10px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }
.link { color: var(--acc); font-weight: 600; font-size: 13px; }
.link.danger { color: var(--err); }
.link.center { text-align: center; }
.acc { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.acc.connected { border-color: color-mix(in srgb, var(--acc) 55%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 15%, transparent); }
.acc-head { display: flex; align-items: center; gap: 8px; }
.tag { background: var(--acc-grad); color: var(--acc-ink); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.acc-status { margin-left: auto; font-size: 12px; font-weight: 600; }
.acc-status.ok { color: var(--ok); } .acc-status.no { color: var(--dim); }
.acc-feat { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.acc-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.acc-row.between { justify-content: space-between; }
.acc-ok { background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ok); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.acc-ok code { background: #0006; padding: 1px 6px; border-radius: 5px; color: var(--text); }
.adv summary { color: var(--dim); font-size: 12px; cursor: pointer; }
.seg { display: inline-flex; background: var(--panel-2); border-radius: 10px; padding: 3px; align-self: flex-start; }
.seg button { padding: 6px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--bg); color: var(--text); }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; }
.stepper button { border: 1px solid var(--line); border-radius: 10px; font-size: 18px; }
.stepper button:hover { border-color: var(--acc); }
.stepper input { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; text-align: center; font-size: 22px; font-weight: 700; padding: 8px; width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.box2 { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.box2 b { font-size: 20px; } .box2 small { color: var(--muted); }
.box2.hi { border-color: var(--acc); }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 13px; }
.check input { accent-color: var(--acc); }

.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.codebox { position: relative; background: #000; border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.codebox pre { margin: 0; flex: 1; white-space: pre-wrap; word-break: break-all; font: 12px/1.5 ui-monospace, Consolas, monospace; color: var(--text); }

/* ===== Espaço ===== */
#sideStore { margin-top: auto; padding: 12px 6px 4px; }
.store { display: flex; flex-direction: column; gap: 6px; }
.store-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.store.compact .store-top { font-size: 11px; }
.store-bar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.store-bar i { display: block; height: 100%; background: var(--acc-grad); border-radius: 999px; box-shadow: var(--glow); }
.store.full .store-bar i { background: var(--err); }
body.collapsed #sideStore { display: none; }

/* ===== Login ===== */
.auth { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% 0%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 60%),
              radial-gradient(900px 500px at 100% 100%, color-mix(in srgb, var(--acc-2) 18%, transparent), transparent 60%), var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px #000a; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.auth h1 { font-family: var(--hero-font, Inter); font-size: 30px; text-transform: uppercase; margin: 6px 0 0; letter-spacing: .01em; background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="lime"] .auth h1 { color: var(--text); background: none; }
.auth p { margin: 0; }
.auth form { display: flex; flex-direction: column; gap: 12px; }
.auth-msg { background: var(--panel-2); border-left: 3px solid var(--acc); padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.auth-alt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
body.signed-out #composer, body.signed-out #side, body.signed-out #app { visibility: hidden; }

#toast { position: fixed; bottom: 20px; right: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
#toast div { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--acc); padding: 10px 14px; border-radius: 10px; max-width: 340px; animation: in .2s; }
#toast div.err { border-left-color: var(--err); }
@keyframes in { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 760px) {
  #side { position: fixed; z-index: 30; height: 100%; width: 64px; }
  #side span, .side-sec, #projectList { display: none; }
  #app { margin-left: 64px; }
  #composer, body.collapsed #composer { left: calc(64px + (100vw - 64px) / 2); width: calc(100vw - 80px); }
  body.home #composer { top: auto; bottom: 12px; }
  .mode { display: none; }
  .viewer { grid-template-columns: 1fr; overflow-y: auto; }
  .mbody { grid-template-columns: 1fr; } .mnav { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero h2 { font-size: 30px; } .stack { transform: scale(.75); }
}

/* ===== Banner do Início ===== */
.banner { position: relative; border-radius: 18px; overflow: hidden; height: clamp(200px, 30vw, 340px); border: 1px solid var(--line); box-shadow: 0 20px 60px #0008; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 35%; }
.banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 92%, transparent) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 38%, transparent 65%); }
.banner-txt { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 0 clamp(18px, 4vw, 48px); max-width: 520px; }
.banner-txt h2 { font-family: var(--hero-font, Inter); font-size: clamp(30px, 4.4vw, 56px); line-height: .95; margin: 0; text-transform: uppercase; background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="lime"] .banner-txt h2 { color: var(--text); background: none; }
.banner-txt p { margin: 0; color: var(--text); opacity: .85; }
.l-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }

/* ===== Login com vídeo ===== */
.auth { overflow: hidden; }
.auth-bg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; z-index: 0; }
.auth-shade { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse at center, #0b071088 0%, #0b0710dd 70%), linear-gradient(180deg, color-mix(in srgb, var(--acc) 14%, transparent), transparent 40%, color-mix(in srgb, var(--acc-2) 12%, transparent)); }
.auth-card { position: relative; z-index: 1; background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(14px); }
.auth-back { position: absolute; top: 18px; left: 18px; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .auth-bg { display: none; } .auth { background: #0b0710 url('/assets/login-bg.jpg') center/cover; } }

/* ===== Página de apresentação ===== */
.landing { position: fixed; inset: 0; z-index: 90; overflow-y: auto; overflow-x: hidden; background: var(--bg); scroll-behavior: smooth; --ez: cubic-bezier(.22, 1, .36, 1); }
.landing svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lx-progress { position: sticky; top: 0; height: 0; z-index: 7; }
.lx-progress i { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--acc-grad); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px #ff3d9a99; }

/* nav */
.l-nav { position: sticky; top: 0; z-index: 6; display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 4vw, 48px); transition: padding .5s var(--ez), background .5s var(--ez), border-color .5s; border-bottom: 1px solid transparent; }
.lx-nav.small { padding-top: 10px; padding-bottom: 10px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px) saturate(1.4); border-color: color-mix(in srgb, var(--line) 70%, transparent); }
.lx-logo img { height: 34px; transition: transform .4s var(--ez), height .5s var(--ez); }
.lx-nav.small .lx-logo img { height: 28px; }
.lx-logo:hover img { transform: scale(1.05) rotate(-1deg); }
.l-nav nav { display: flex; gap: 22px; align-items: center; }
.l-nav nav a { position: relative; color: #e9e0f7cc; font-size: 14px; font-weight: 500; transition: color .3s; }
.l-nav nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--acc-grad); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ez); }
.l-nav nav a:hover { color: #fff; }
.l-nav nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.lx-link { color: #fff; font-weight: 600; padding: 8px 12px; border-radius: 10px; transition: background .3s, color .3s; }
.lx-link:hover { background: #ffffff14; }

/* botões: luz que segue o mouse + varredura de brilho + levantar */
.lx-btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; gap: 10px; transition: transform .45s var(--ez), box-shadow .45s var(--ez), background .3s, border-color .3s; }
.lx-btn > span, .lx-btn > svg { position: relative; z-index: 2; }
.lx-btn svg { transition: transform .45s var(--ez); }
.lx-btn::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), #ffffff40, transparent 60%); opacity: 0; transition: opacity .35s; }
.lx-btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: 1; background: linear-gradient(100deg, transparent, #ffffff66, transparent); transform: skewX(-20deg) translateX(0); }
.lx-btn:hover { transform: translateY(-2px); }
.lx-btn.pri:hover, .btn.pri.lx-btn:hover { box-shadow: 0 10px 34px -6px #ff3d9acc, 0 0 0 1px #ffffff22 inset; }
.lx-btn:hover::before { opacity: 1; }
.lx-btn:hover::after { animation: lx-sweep .9s var(--ez); }
.lx-btn:hover svg { transform: translateX(4px); }
.lx-btn:active { transform: translateY(0) scale(.97); transition-duration: .12s; }
.lx-ghost:hover { background: #ffffff24; border-color: #ffffff66; }
@keyframes lx-sweep { to { transform: skewX(-20deg) translateX(420%); } }

/* hero */
.l-hero { position: relative; min-height: 100vh; margin-top: -71px; display: flex; align-items: center; overflow: hidden; }
.lx-hero-media { position: absolute; inset: -4% 0 0; will-change: transform; transform: scale(1.06); }
.lx-hero-media picture, .lx-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.landing:not(.ready) .lx-hero-media img { transform: scale(1.12); filter: blur(8px) brightness(.6); }
.lx-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; opacity: 0; transition: opacity .8s; }
.lx-hero-video.on { opacity: 1; }
.lx-hero-media img { transition: transform 2.4s var(--ez), filter 1.6s var(--ez); }
.l-hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, #0b0710f5 0%, #0b0710b8 32%, transparent 62%), linear-gradient(0deg, var(--bg) 0%, transparent 28%), linear-gradient(180deg, #0b0710aa 0%, transparent 18%); }
.lx-grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .08; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.l-hero-txt { position: relative; z-index: 2; max-width: 640px; padding: 90px clamp(16px, 5vw, 72px) 0; display: flex; flex-direction: column; gap: 18px; will-change: transform, opacity; }
.lx-in { display: inline-block; opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 1s var(--ez), transform 1.1s var(--ez), filter 1s var(--ez); transition-delay: var(--d, 0s); }
.landing.ready .lx-in { opacity: 1; transform: none; filter: none; }
.lx-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffd9ec; background: #ffffff10; border: 1px solid #ffffff26; backdrop-filter: blur(10px); }
.lx-pill i { width: 8px; height: 8px; border-radius: 50%; background: #ff3d9a; box-shadow: 0 0 0 0 #ff3d9a; animation: lx-pulse 2s infinite; }
@keyframes lx-pulse { 70% { box-shadow: 0 0 0 10px #ff3d9a00; } 100% { box-shadow: 0 0 0 0 #ff3d9a00; } }

/* título com varredura de luz */
.lx-title { font-family: var(--hero-font, Inter); font-size: clamp(58px, 10vw, 136px); line-height: .88; margin: 0; text-transform: uppercase; letter-spacing: .005em; display: flex; flex-direction: column; filter: drop-shadow(0 8px 34px #ff3d9a55); }
.lx-title.sm { font-size: clamp(40px, 6vw, 84px); align-items: center; }
.lx-line { display: block; overflow: hidden; padding-bottom: .04em; will-change: transform; }
.lx-line > span { display: inline-block; background: linear-gradient(110deg, #ffb36b 0%, #ff3d9a 38%, #c04bff 62%, #ffb36b 100%) 0 0 / 100% 100%, linear-gradient(110deg, transparent 40%, #fff 50%, transparent 60%) -150% 0 / 60% 100% no-repeat;
  background-blend-mode: overlay, normal; -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-title .lx-in { transform: translateY(105%); filter: none; }
.landing.ready .lx-title .lx-in { transform: none; }
.lx-title .lx-line > span { position: relative; }
.lx-title .lx-line > span { background-image: linear-gradient(110deg, transparent 0%, transparent 42%, #ffffffee 50%, transparent 58%, transparent 100%), linear-gradient(110deg, #ffb36b 0%, #ff3d9a 38%, #c04bff 70%, #8b3dff 100%);
  background-size: 250% 100%, 100% 100%; background-repeat: no-repeat; background-position: 160% 0, 0 0; animation: lx-light 5.5s var(--ez) infinite; animation-delay: 1.6s; }
.lx-title .lx-line:nth-child(2) > span { animation-delay: 1.85s; }
@keyframes lx-light { 0% { background-position: 160% 0, 0 0; } 45%, 100% { background-position: -60% 0, 0 0; } }
.l-hero p { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; color: #f3ecffdd; margin: 0; max-width: 520px; }
.l-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.btn.big { padding: 15px 26px; font-size: 16px; border-radius: 14px; }
.btn.ghost { background: #ffffff14; border-color: #ffffff33; backdrop-filter: blur(8px); }
.lx-trust { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #d9cdeecc; margin-top: 6px; }
.lx-trust b { color: #fff; }
.lx-trust em { width: 4px; height: 4px; border-radius: 50%; background: #ffffff55; }
.lx-scroll { position: absolute; z-index: 2; left: 50%; bottom: 28px; width: 26px; height: 42px; margin-left: -13px; border-radius: 14px; border: 2px solid #ffffff55; transition: border-color .3s, transform .4s var(--ez); }
.lx-scroll:hover { border-color: #fff; transform: translateY(3px); }
.lx-scroll i { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: lx-wheel 1.8s var(--ez) infinite; }
@keyframes lx-wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* faixa de modelos */
.lx-models { padding: 26px 0; border-block: 1px solid var(--line); background: linear-gradient(180deg, transparent, #c04bff0d, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.lx-marquee { will-change: transform; }
.lx-models { overflow: hidden; }
.lx-marquee + .lx-marquee { margin-top: 12px; }
.lx-track { display: flex; width: max-content; gap: 14px; animation: lx-mq 46s linear infinite; }
.lx-marquee.r .lx-track { animation-direction: reverse; animation-duration: 54s; }
.lx-models:hover .lx-track { animation-play-state: paused; }
.lx-track span { display: inline-flex; align-items: center; gap: 14px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; font-size: 15px; white-space: nowrap; color: #e9e0f7; transition: border-color .3s, color .3s, transform .4s var(--ez), box-shadow .3s; }
.lx-track span:hover { border-color: var(--acc); color: #fff; transform: translateY(-2px); box-shadow: var(--glow); }
.lx-track i { font-style: normal; color: var(--acc-2); font-size: 11px; }
@keyframes lx-mq { to { transform: translateX(-50%); } }

/* frase que acende com o scroll */
.lx-statement { max-width: 1100px; margin: 0 auto; padding: clamp(80px, 14vw, 160px) clamp(16px, 5vw, 72px); }
.lx-words { margin: 0; font-size: clamp(28px, 4.2vw, 56px); line-height: 1.18; font-weight: 700; letter-spacing: -.02em; }
.lx-words span { color: #ffffff1f; transition: color .5s var(--ez), text-shadow .5s; }
.lx-words span.on { color: #fff; }
.lx-words span.hl.on { background: linear-gradient(110deg, #ffb36b, #ff3d9a 45%, #c04bff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* seções */
.l-sec { padding: clamp(64px, 9vw, 120px) clamp(16px, 5vw, 72px); max-width: 1220px; margin: 0 auto; }
.lx-head { margin-bottom: clamp(28px, 4vw, 48px); max-width: 760px; }
.lx-kick { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--acc-2); margin-bottom: 14px; }
.lx-head h2, .l-final h2 { font-family: var(--hero-font, Inter); text-transform: uppercase; font-size: clamp(38px, 5.4vw, 72px); line-height: .95; margin: 0; color: #fff; }
.lx-head h2 span { background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-head p { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 16px 0 0; }
.rv { opacity: 0; transform: translateY(40px) scale(.98); filter: blur(4px); transition: opacity .9s var(--ez), transform 1s var(--ez), filter .9s var(--ez); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; filter: none; }

/* passos */
.lx-steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lx-steps-line { position: absolute; left: 36px; right: 36px; top: 46px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.lx-steps-line i { position: absolute; inset: 0; background: var(--acc-grad); transform-origin: 0 50%; transform: scaleX(0); }
.lx-step, .lx-card, .lx-plan { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 26px;
  transition: opacity .9s var(--ez), transform .6s var(--ez), filter .9s var(--ez), border-color .4s, box-shadow .5s var(--ez); }
.lx-step::before, .lx-card::before, .lx-plan::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), #c04bff26, transparent 60%); opacity: 0; transition: opacity .4s; }
.lx-card.in { transform: translate3d(0, var(--py, 0px), 0); }
.lx-step.in:hover, .lx-card.in:hover, .lx-plan.in:hover { transform: translate3d(0, calc(var(--py, 0px) - 6px), 0); border-color: color-mix(in srgb, var(--acc) 55%, var(--line)); box-shadow: 0 24px 60px -24px #c04bff88; }
.lx-step:hover::before, .lx-card:hover::before, .lx-plan:hover::before { opacity: 1; }
.lx-step b { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--acc-grad); color: var(--acc-ink); margin-bottom: 18px; font-size: 15px; box-shadow: var(--glow); transition: transform .5s var(--ez); }
.lx-step:hover b { transform: rotate(-8deg) scale(1.08); }
.lx-step h3, .lx-card h3, .l-plan h3 { position: relative; margin: 0 0 8px; font-size: 19px; }
.lx-step p, .lx-card p { position: relative; margin: 0; color: var(--muted); line-height: 1.55; }

/* vitrine */
.lx-show { padding: 0 clamp(16px, 5vw, 72px); --vk: 0; }
.lx-show-in { transform: scale(calc(.86 + var(--vk) * .14)) translateY(calc((1 - var(--vk)) * 60px)); transform-origin: 50% 0; will-change: transform; }
.lx-show .lx-tile { border-radius: calc(36px - var(--vk) * 14px); }
.lx-show-in { max-width: 1220px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: 270px 220px; gap: 16px; perspective: 1200px; }
.lx-tile { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); transform-style: preserve-3d; }
.lx-tile.big { grid-row: span 2; }
.lx-tile.tilt.in { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ez), box-shadow .5s; }
.lx-tile.tilt:hover { box-shadow: 0 30px 80px -30px #ff3d9a99; }
.lx-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ez); }
.lx-tile:hover img { transform: scale(1.07); }
.lx-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; background: linear-gradient(0deg, #0b0710ee, transparent); transform: translateY(10px); opacity: .9; transition: transform .5s var(--ez), opacity .5s; }
.lx-tile:hover .lx-cap { transform: none; opacity: 1; }
.lx-cap span { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--acc-2); }
.lx-cap b { font-size: 17px; }
.lx-stat { display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; background: radial-gradient(120% 120% at 0% 0%, #c04bff33, transparent 60%), var(--panel); }
.lx-stat.alt { background: radial-gradient(120% 120% at 100% 0%, #ff3d9a33, transparent 60%), var(--panel); }
.lx-show-in .lx-tile:nth-child(2) { grid-column: span 2; }
.lx-stat b { font-family: var(--hero-font, Inter); font-size: clamp(48px, 6vw, 76px); line-height: 1; background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-stat span { color: var(--muted); margin-top: 6px; }

/* recursos */
.lx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lx-card i { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; margin-bottom: 18px; font-size: 22px; color: #fff; background: linear-gradient(135deg, #c04bff40, #ff3d9a26); border: 1px solid #ffffff1f; transition: transform .5s var(--ez), background .4s; }
.lx-card:hover i { transform: translateY(-3px) scale(1.06); background: var(--acc-grad); }

/* histórias */
.lx-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lx-flow span { flex: 1 1 auto; justify-content: center; }
.lx-flow span { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ez), transform .7s var(--ez), border-color .3s, box-shadow .3s, background .3s; transition-delay: calc(var(--i) * 90ms); }
.lx-flow.in span { opacity: 1; transform: none; }
.lx-flow span:hover { border-color: var(--acc); box-shadow: var(--glow); background: var(--panel-2); transform: translateY(-3px); transition-delay: 0s; }
.lx-flow em { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--acc-grad); color: var(--acc-ink); font-size: 12px; }
.lx-flow > i { flex: 0 0 14px; width: 14px; height: 2px; background: linear-gradient(90deg, var(--acc), var(--acc-2)); border-radius: 2px; opacity: .6; }

/* planos */
.l-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 320px)); gap: 18px; }
.lx-plan { display: flex; flex-direction: column; gap: 6px; padding: 28px; }
.l-plan.hi { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 30px 80px -40px #c04bffcc; }
.lx-badge { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--acc-grad); color: var(--acc-ink); }
.l-gb { position: relative; font-size: 46px; font-weight: 800; line-height: 1; margin-top: 8px; }
.l-price { position: relative; font-size: 28px; font-weight: 700; margin: 14px 0; }
.l-price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.lx-plan .btn { position: relative; margin-top: auto; justify-content: center; }
.l-note { margin-top: 22px; max-width: 640px; }

/* final */
.l-final { position: relative; overflow: visible; text-align: center; padding: clamp(90px, 12vw, 160px) 16px; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.lx-final-glow { position: absolute; left: 50%; top: 50%; width: min(760px, 90vw); aspect-ratio: 1.6; transform: translate(-50%, -50%); background: conic-gradient(from 0deg, #8b3dff, #ff3d9a, #ffb36b, #c04bff, #8b3dff); filter: blur(120px); opacity: .22; animation: lx-spin 18s linear infinite; pointer-events: none; }
@keyframes lx-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.l-final h2 { position: relative; }
.l-final .lx-title .lx-line > span { animation-delay: .4s; }
.lx-foot { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--dim); font-size: 13px; padding: 26px; border-top: 1px solid var(--line); }
.lx-foot img { height: 22px; opacity: .7; transition: opacity .3s; }
.lx-foot img:hover { opacity: 1; }

@media (max-width: 900px) {
  .lx-steps, .lx-grid { grid-template-columns: 1fr 1fr; }
  .lx-steps-line { display: none; }
}
@media (max-width: 760px) {
  .l-nav nav a { display: none; }
  .l-nav nav { gap: 6px; }
  .l-hero { align-items: flex-end; padding-bottom: 90px; }
  .l-hero::after { background: linear-gradient(0deg, #0b0710f7 0%, #0b0710b8 48%, transparent 78%); }
  .l-hero { padding-bottom: 44px; }
  .l-hero-txt { padding-top: 0; gap: 14px; }
  .lx-pill { font-size: 10px; letter-spacing: .1em; white-space: nowrap; }
  .lx-title { font-size: clamp(64px, 19vw, 96px); }
  .l-hero p { font-size: 15px; }
  .l-cta { flex-wrap: nowrap; }
  .l-cta .btn.big { flex: 1; justify-content: center; padding: 13px 14px; font-size: 15px; white-space: nowrap; }
  .lx-scroll { display: none; }
  .lx-trust { font-size: 12px; gap: 8px; }
  .lx-nav .lx-logo img { height: 28px; }
  .lx-steps, .lx-grid { grid-template-columns: 1fr; }
  .lx-show-in { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 200px 160px; }
  .lx-tile.big { grid-column: span 2; grid-row: auto; }
  .lx-show-in .lx-tile:nth-child(2) { grid-column: span 2; }
  .lx-flow > i { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .landing *, .landing *::before, .landing *::after { animation: none !important; transition-duration: .01ms !important; }
  .rv, .lx-in, .lx-flow span { opacity: 1 !important; transform: none !important; filter: none !important; }
  .lx-words span { color: #fff; }
}


/* ===== Demo das Histórias (presa na tela, guiada pelo scroll) ===== */
.lx-story { position: relative; height: 580vh; --sp: 0; --p: 0; margin-top: clamp(40px, 6vw, 80px); background: linear-gradient(180deg, #f6eee4 0%, #fbf5ee 100%); color: #1a1024; border-radius: 40px 40px 0 0; box-shadow: 0 -30px 80px -40px #ff3d9a66; }
.lx-story::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(60% 40% at 85% 10%, #ff3d9a22, transparent 70%), radial-gradient(50% 35% at 0% 60%, #c04bff1f, transparent 70%); }
.lx-story::after { content: ''; position: absolute; left: 0; right: 0; bottom: -40px; height: 40px; background: inherit; border-radius: 0 0 40px 40px; }
.lx-new { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 5px 14px 5px 5px; border-radius: 999px; background: #1a1024; color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 10px 30px -10px #c04bffaa; }
.lx-new i { font-style: normal; padding: 4px 10px; border-radius: 999px; background: var(--acc-grad); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; animation: lx-newglow 2.4s ease-in-out infinite; }
@keyframes lx-newglow { 50% { box-shadow: 0 0 18px #ff3d9a; } }
.lx-story .lx-kick { color: #c0267a; display: block; }
.lx-story-h { color: #1a1024; }
.lx-story .lx-story-steps li { color: #8d7f9e; }
.lx-story .lx-story-steps li em { border-color: #1a102422; }
.lx-story .lx-story-steps li.on { color: #1a1024; background: #fff; box-shadow: 0 8px 24px -12px #1a102455; }
.lx-story .lx-story-steps li.done { color: #5d4f6e; }
.lx-story .lx-story-cap { color: #5d4f6e; }
.lx-story .lx-story-win { color: var(--text); box-shadow: 0 50px 120px -40px #1a1024aa, 0 0 0 1px #ffffff10 inset; }
.lx-story-pin { position: sticky; top: 0; z-index: 1; height: 100vh; display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; max-width: 1280px; margin: 0 auto; padding: 80px clamp(16px, 5vw, 72px) 40px; }
.lx-story-h { font-family: var(--hero-font, Inter); text-transform: uppercase; font-size: clamp(36px, 4.4vw, 60px); line-height: .95; margin: 0 0 28px; }
.lx-story-h span { background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-story-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lx-story-steps li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--dim); font-weight: 700; transition: color .4s, background .4s; overflow: hidden; }
.lx-story-steps li em { font-style: normal; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; transition: background .4s, color .4s, border-color .4s, transform .5s var(--ez); }
.lx-story-steps li i { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--acc-grad); transform-origin: 0 50%; transform: scaleX(var(--f, 0)); }
.lx-story-steps li.on { color: #fff; background: var(--panel); }
.lx-story-steps li.on em { background: var(--acc-grad); color: var(--acc-ink); border-color: transparent; transform: scale(1.1); }
.lx-story-steps li.done { color: var(--muted); }
.lx-story-steps li.done em { background: color-mix(in srgb, var(--acc) 30%, transparent); color: #fff; border-color: transparent; }
.lx-story-cap { min-height: 3.2em; margin: 20px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.lx-story-win { position: relative; height: min(68vh, 600px); border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel), var(--bg)); box-shadow: 0 50px 120px -40px #c04bff66, 0 0 0 1px #ffffff08 inset; overflow: hidden; display: flex; flex-direction: column;
  transform: perspective(1400px) rotateX(calc((1 - min(1, var(--p) * 14)) * 8deg)) scale(calc(.94 + min(1, var(--p) * 14) * .06)); transition: transform .2s linear; }
.lx-win-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.lx-win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .lx-win-bar i:nth-child(2) { background: #febc2e; } .lx-win-bar i:nth-child(3) { background: #28c840; }
.lx-win-bar span { margin-left: 10px; }
.lx-win-tabs { display: flex; gap: 6px; padding: 10px 14px; overflow: hidden; border-bottom: 1px solid var(--line); }
.lx-win-tabs b { flex: 1; text-align: center; white-space: nowrap; font-size: 11px; padding: 7px 6px; border-radius: 8px; color: var(--dim); transition: background .4s, color .4s; }
.lx-win-tabs b.on { background: var(--acc-grad); color: var(--acc-ink); }
.lx-win-body { position: relative; flex: 1; }
.lx-sc { position: absolute; inset: 0; padding: clamp(16px, 2.4vw, 28px); opacity: 0; transform: translateY(24px) scale(.98); filter: blur(6px); transition: opacity .55s var(--ez), transform .7s var(--ez), filter .55s var(--ez); pointer-events: none; }
.lx-sc.on { opacity: 1; transform: none; filter: none; }

/* 1 roteiro */
.lx-type { font: 500 clamp(13px, 1.2vw, 16px)/1.7 ui-monospace, 'JetBrains Mono', Consolas, monospace; color: #e9e0f7; }
.lx-type p { margin: 0 0 6px; min-height: 1.7em; }
.lx-type p:nth-child(1), .lx-type p:nth-child(5) { color: var(--acc-2); font-weight: 700; margin-top: 8px; }
.lx-cursor { display: inline-block; width: 9px; height: 18px; background: var(--acc); animation: lx-blink 1s steps(1) infinite; }
@keyframes lx-blink { 50% { opacity: 0; } }

/* 2 elenco */
.lx-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; height: 100%; align-content: center; }
.lx-pc { --show: clamp(0, calc((var(--sp) * 5 - var(--i)) ), 1); opacity: var(--show); transform: translateY(calc((1 - var(--show)) * 40px)) scale(calc(.85 + var(--show) * .15)); border-radius: 16px; border: 1px solid var(--line); background: var(--panel-2); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lx-av { position: relative; width: 100%; aspect-ratio: 16/10; border-radius: 12px; background: #ece5dc center/cover no-repeat; }
.lx-pc b { font-size: 14px; }
.lx-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; padding: 3px 9px 3px 4px; border-radius: 999px; font: 700 11px/1.2 ui-monospace, 'JetBrains Mono', Consolas, monospace; font-style: normal; color: #ffd6ec; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--acc-grad) border-box; border: 1px solid transparent; box-shadow: 0 4px 14px -6px #ff3d9a88; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lx-tag::before { content: '@'; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--acc-grad); color: #fff; font-size: 10px; margin-right: 4px; }
.lx-pc { align-items: flex-start; } .lx-pc b { padding: 0 2px; }

/* 3 cenários */
.lx-places { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; height: 100%; }
.lx-pl { background-size: cover; background-position: center; --show: clamp(0, calc(var(--sp) * 5 - var(--i)), 1); position: relative; border-radius: 16px; overflow: hidden; opacity: var(--show); transform: scale(calc(.8 + var(--show) * .2)); clip-path: inset(calc((1 - var(--show)) * 50%) round 16px); }
.lx-pl::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #0b0710aa, transparent 60%); }
.lx-pl span { position: absolute; left: 14px; bottom: 12px; z-index: 1; font-weight: 800; font-size: 15px; }

/* 4 elementos */
.lx-objs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-content: center; height: 100%; }
.lx-ob { --show: clamp(0, calc(var(--sp) * 7 - var(--i)), 1); display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel-2); opacity: var(--show); transform: translateY(calc((1 - var(--show)) * 24px)) scale(calc(.9 + var(--show) * .1)); }
.lx-ob-img { position: relative; aspect-ratio: 16/10; border-radius: 11px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(120% 100% at 50% 0%, #c04bff33, transparent 70%), #ffffff08; }
.lx-ob-img span { font-size: clamp(26px, 3vw, 38px); filter: drop-shadow(0 6px 10px #0007); }
.lx-ob-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #ece5dc; }
.lx-ob b { font-size: 13px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-ob .lx-tag, .lx-pc .lx-tag { margin: 0 4px; }

/* 5 storyboard */
.lx-strips { display: flex; flex-direction: column; gap: 12px; height: 100%; justify-content: center; }
.lx-strip { display: grid; grid-template-columns: 30px repeat(3, 1fr); gap: 10px; align-items: center; }
.lx-strip small { color: var(--acc-2); font-weight: 800; }
.lx-panel { --show: clamp(0, calc(var(--sp) * 10 - var(--q)), 1); aspect-ratio: 16/9; border-radius: 10px; border: 1px solid var(--line); background-color: #2a1f3a; background-repeat: no-repeat; opacity: calc(.15 + var(--show) * .85); clip-path: inset(0 calc((1 - var(--show)) * 100%) 0 0 round 10px); }

/* 6 cliente: PDF + WhatsApp + carimbo */
.lx-client { height: 100%; display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.lx-pdfv { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: #2b2233; border: 1px solid var(--line); min-width: 0; }
.lx-pdfv-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; font-size: 11px; color: var(--muted); background: #1e1726; }
.lx-pdfv-bar b { color: #fff; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-pdfv-pages { position: relative; flex: 1; display: grid; place-items: center; padding: 14px; overflow: hidden; }
.lx-pdfv-pages img { position: absolute; left: 14px; right: 14px; top: 14px; width: calc(100% - 28px); aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; box-shadow: 0 18px 40px -16px #000c;
  transform: translateY(calc((var(--n) - var(--pg, 0)) * 106%)); will-change: transform; }
.lx-pdfv-pages::after { content: ''; position: absolute; right: 4px; top: calc(10px + var(--pg, 0) / 3 * (100% - 60px)); width: 4px; height: 40px; border-radius: 4px; background: #ffffff55; }
.lx-stamp { position: absolute; z-index: 2; padding: 10px 22px; border: 3px solid #3ee6a8; color: #3ee6a8; border-radius: 12px; font-weight: 900; font-size: clamp(18px, 2.2vw, 28px); text-transform: uppercase; letter-spacing: .08em; background: #0b0710d9; box-shadow: 0 0 40px #3ee6a855;
  opacity: 0; transform: rotate(-12deg) scale(2.4); transition: opacity .35s, transform .55s cubic-bezier(.2, 1.6, .4, 1); }
.lx-client.s4 .lx-stamp { opacity: 1; transform: rotate(-12deg) scale(1); }
.lx-wa { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #0b141a; min-width: 0; }
.lx-wa-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #202c33; }
.lx-wa-head i { font-style: normal; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #25d366; color: #0b141a; font-weight: 800; font-size: 13px; }
.lx-wa-head b { display: block; font-size: 13px; color: #e9edef; } .lx-wa-head small { font-size: 11px; color: #8696a0; }
.lx-wa-chat { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px; background: radial-gradient(circle at 20% 20%, #ffffff06 1px, transparent 1px) 0 0 / 14px 14px, #0b141a; }
.lx-msg { position: relative; max-width: 88%; padding: 7px 10px 18px; border-radius: 10px; font-size: 12.5px; line-height: 1.4; color: #e9edef; opacity: 0; transform: translateY(14px) scale(.96); transform-origin: bottom; transition: opacity .4s, transform .5s var(--ez); }
.lx-msg em { position: absolute; right: 8px; bottom: 3px; font-style: normal; font-size: 10px; color: #8696a0; }
.lx-msg.out { align-self: flex-end; background: #005c4b; border-top-right-radius: 3px; } .lx-msg.out em { color: #53bdeb; }
.lx-msg.in { align-self: flex-start; background: #202c33; border-top-left-radius: 3px; }
.lx-file { display: flex; align-items: center; gap: 8px; padding: 7px; margin-bottom: 6px; border-radius: 8px; background: #00000033; }
.lx-file i { font-style: normal; display: grid; place-items: center; width: 30px; height: 36px; border-radius: 4px; background: #e2534b; color: #fff; font-size: 9px; font-weight: 800; }
.lx-file span { display: flex; flex-direction: column; font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lx-file small { color: #8696a0; font-size: 10px; }
.lx-typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #202c33; opacity: 0; transform: scale(.8); transition: opacity .3s, transform .3s; }
.lx-typing i { width: 6px; height: 6px; border-radius: 50%; background: #8696a0; animation: lx-dots 1.2s infinite; } .lx-typing i:nth-child(2) { animation-delay: .15s; } .lx-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes lx-dots { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.lx-client.s1 .m1, .lx-client.s3 .m2 { opacity: 1; transform: none; }
.lx-client.s2 .lx-typing { opacity: 1; transform: none; }
.lx-client:not(.s2) .lx-typing { position: absolute; }

/* 7 vídeo: player em pé + linha do tempo */
.lx-vid { position: absolute; inset: clamp(16px, 2.4vw, 28px); display: grid; grid-template-columns: auto 1fr; grid-template-rows: minmax(0, 1fr); gap: 18px; --vt: 0; }
.lx-phone { position: relative; height: 100%; max-height: 100%; aspect-ratio: 9/16; align-self: center; border-radius: 22px; overflow: hidden; background: #000; border: 3px solid #2a2234; box-shadow: 0 30px 60px -20px #000, 0 0 0 1px #ffffff14; }
.lx-phone .lx-demo-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lx-phone .lx-tc { position: absolute; right: 8px; top: 8px; font: 700 11px ui-monospace, monospace; background: #0b0710aa; padding: 3px 7px; border-radius: 6px; }
.lx-phone-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 3px; border-radius: 3px; background: #ffffff33; overflow: hidden; }
.lx-phone-bar i { display: block; height: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(var(--vt)); }
.lx-vtl { display: flex; flex-direction: column; gap: 10px; min-width: 0; justify-content: center; }
.lx-vtl-h { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lx-vclip { position: relative; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); overflow: hidden; transition: border-color .4s, box-shadow .4s, transform .4s var(--ez); --k: 0; }
.lx-vclip.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 14px 34px -16px #c04bffaa; transform: translateX(4px); }
.lx-vclip-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; margin-bottom: 8px; white-space: nowrap; } .lx-vclip-top b { overflow: hidden; text-overflow: ellipsis; } .lx-vclip-top span { font-size: 10.5px; } .lx-vclip-top span { color: var(--muted); font-family: ui-monospace, monospace; }
.lx-vthumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.lx-vthumbs img { width: 100%; aspect-ratio: 4/3; object-position: 50% 30%; object-fit: cover; border-radius: 6px; }
.lx-vprog { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--acc-grad); transform-origin: 0 50%; transform: scaleX(var(--k)); }
.lx-vchips { display: flex; flex-wrap: wrap; gap: 6px; } .lx-vchips span { font-size: 10.5px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .lx-story { height: auto; } .lx-story-pin { position: relative; height: auto; } }


/* ===== Calculadora de economia ===== */
.lx-calc { display: grid; grid-template-columns: 1fr 1.1fr; gap: 10px; padding: 10px; border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel), var(--bg)); box-shadow: 0 40px 100px -50px #c04bff99; }
.lx-calc-in, .lx-calc-out { padding: clamp(18px, 2.6vw, 30px); border-radius: 20px; display: flex; flex-direction: column; gap: 18px; }
.lx-calc-out { background: radial-gradient(120% 90% at 100% 0%, #ff3d9a22, transparent 60%), var(--panel-2); gap: 16px; }
.lx-calc-step { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #fff; }
.lx-calc-step i { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--acc-grad); color: var(--acc-ink); font-size: 12px; }
.lx-calc-step + .lx-range, .lx-calc-step + .lx-seg { margin-top: -6px; }
.lx-calc-in .lx-calc-step:not(:first-child) { margin-top: 10px; }
.lx-range { display: flex; flex-direction: column; gap: 12px; font-weight: 600; }
.lx-range span { display: flex; justify-content: space-between; align-items: baseline; color: #d9cdee; }
.lx-range b { font-size: 24px; background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-range input { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; outline: none; cursor: pointer; background: linear-gradient(90deg, #c04bff, #ff3d9a) 0 0 / var(--v, 0%) 100% no-repeat, var(--line); }
.lx-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid #ff3d9a; transition: transform .25s var(--ez), box-shadow .25s; }
.lx-range input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid #ff3d9a; }
.lx-range input:hover::-webkit-slider-thumb { transform: scale(1.15); box-shadow: 0 0 0 8px #ff3d9a33; }
.lx-range input:active::-webkit-slider-thumb { transform: scale(1.25); box-shadow: 0 0 0 12px #ff3d9a33; }
.lx-range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px #ff3d9a55; }
.lx-seg { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.lx-seg button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); transition: background .35s var(--ez), color .3s, transform .3s var(--ez); }
.lx-seg button small { font-size: 11px; font-weight: 500; opacity: .8; }
.lx-seg button:hover { color: #fff; background: #ffffff0c; }
.lx-seg button.on { background: var(--acc-grad); color: var(--acc-ink); box-shadow: var(--glow); }
.lx-seg button:active { transform: scale(.96); }
.lx-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 10px; }
.lx-vs-col { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); min-width: 0; }
.lx-vs-col span { font-size: 12px; font-weight: 700; color: var(--muted); }
.lx-vs-col b { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.1; transition: color .3s; }
.lx-vs-col small { font-size: 11px; color: var(--dim); }
.lx-vs-col.them b { color: #b9adc9; text-decoration: line-through; text-decoration-color: #ff5c7a; text-decoration-thickness: 2px; }
.lx-vs-col.us { border-color: color-mix(in srgb, var(--acc) 60%, var(--line)); background: color-mix(in srgb, var(--acc) 8%, var(--bg)); }
.lx-vs-col.us b { color: #fff; }
.lx-vs-x { align-self: center; font-weight: 800; font-size: 12px; color: var(--dim); text-transform: uppercase; }
.lx-save-box { padding: 18px; border-radius: 18px; background: linear-gradient(135deg, #3ee6a81a, #3ee6a805); border: 1px solid #3ee6a84d; }
.lx-save-box > span { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #3ee6a8; }
.lx-total { font-family: var(--hero-font, Inter); font-size: clamp(52px, 6vw, 82px); line-height: 1; margin: 6px 0; color: #3ee6a8; }
.lx-total b { font-weight: 400; color: #fff; }
.lx-total small { font-family: Inter, sans-serif; font-size: 16px; color: var(--muted); margin-left: 6px; }
.lx-save-meta { font-size: 14px; color: #d9cdee; } .lx-save-meta em { font-style: normal; font-weight: 800; color: #3ee6a8; } .lx-save-meta b { color: #fff; }
.lx-meter { margin-top: 12px; height: 8px; border-radius: 99px; background: #ff5c7a33; overflow: hidden; }
.lx-meter i { display: block; height: 100%; border-radius: inherit; background: var(--acc-grad); transform-origin: 0 50%; transition: transform .6s var(--ez); }
.lx-calc.loss .lx-save-box { opacity: .55; }
.lx-calc-out .btn { align-self: flex-start; }
/* nova calculadora: entrada + economia à esquerda, comparação à direita; no celular: entrada, economia, comparação */
/* desktop: entrada em cima (largura toda); economia à esquerda e comparação à direita; nota embaixo */
.lx-calc { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-areas: "in in" "save cmp" "note note"; align-items: stretch; gap: 12px; padding: 12px; }
.lx-calc-in { grid-area: in; gap: 18px; background: var(--panel-2); border: 1px solid var(--line); }
.lx-ranges { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; }
.lx-range span { align-items: flex-end; }
.lx-range em { display: flex; flex-direction: column; gap: 2px; font-style: normal; color: #fff; font-size: 15px; }
.lx-range em small { font-size: 12px; font-weight: 500; color: var(--muted); }
.lx-range b { font-size: 30px; line-height: 1; }
.lx-calc > .lx-save-box { grid-area: save; margin: 0; padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; justify-content: center; gap: 10px; border-radius: 20px; }
.lx-calc > .lx-save-box .btn { align-self: flex-start; margin-top: 14px; }
.lx-calc-cmp { grid-area: cmp; padding: clamp(18px, 2.6vw, 28px); border-radius: 20px; display: flex; flex-direction: column; gap: 16px; background: radial-gradient(120% 90% at 100% 0%, #ff3d9a22, transparent 60%), var(--panel-2); border: 1px solid var(--line); }
.lx-cmp-pick { display: grid; grid-template-columns: 1fr; gap: 10px; }
.lx-plan-pick { flex-direction: row !important; align-items: center; gap: 10px !important; }
.lx-plan-pick select { flex: 1; min-width: 0; }
.lx-plan-pick { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lx-plan-pick select { width: 100%; height: 48px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: #fff; font: 600 14px Inter, sans-serif; cursor: pointer; }
.lx-cmp-pick .lx-seg { height: 48px; padding: 4px; }
.lx-cmp-pick .lx-seg button { padding: 6px; font-size: 13px; justify-content: center; }
.lx-calc-note { grid-area: note; padding: 4px 8px 2px; color: var(--muted); }
.lx-calc-note summary { cursor: pointer; font-size: 13px; font-weight: 700; width: max-content; }
.lx-calc-note summary:hover { color: #fff; }
.lx-calc-note p { margin: 8px 0 0; font-size: 12px; line-height: 1.6; max-width: 900px; }
.lx-use { display: flex; flex-direction: column; gap: 10px; }
.lx-use-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 700; color: var(--muted); }
.lx-use-head b { font-size: 18px; color: #fff; }
.lx-use .lx-meter { margin-top: 0; background: #ff5c7a40; }
.lx-use-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lx-use-grid > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); min-width: 0; }
.lx-use-grid small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lx-use-grid b { font-size: 20px; color: #fff; }
.lx-use-grid em { font-style: normal; font-size: 12px; color: var(--dim); }
.lx-use-grid .bad { border-color: #ff5c7a4d; background: #ff5c7a12; }
.lx-use-grid .bad b { color: #ff8aa0; }
.lx-use-hub { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; color: #d9cdee; background: #3ee6a814; border: 1px solid #3ee6a840; }
.lx-use-hub b { color: #3ee6a8; }
.lx-seg[hidden] { display: none; }
/* quantidade de planos */
.lx-packs { align-self: flex-start; white-space: nowrap; max-width: 100%; margin: 4px 0 2px; padding: 4px 10px; border-radius: 99px; font-size: 13px !important; font-weight: 700; color: #fff !important; background: #ffffff14; border: 1px solid var(--line); }
.lx-packs b { font-size: 15px !important; text-decoration: none !important; color: #fff !important; }
.lx-packs.multi { background: #ff5c7a; border-color: #ff5c7a; box-shadow: 0 6px 22px -6px #ff5c7acc; animation: lx-pulse 1.8s ease-in-out infinite; }
.lx-packs.multi b { font-size: 18px !important; }
@keyframes lx-pulse { 50% { transform: scale(1.06); box-shadow: 0 8px 30px -4px #ff5c7a; } }
/* paga sem usar em destaque */
.lx-use-grid .bad b { font-size: 26px; }
.lx-use-grid .bad small { color: #ff8aa0; }
.lx-use-grid .bad.pop b { animation: lx-pop .45s var(--ez); }
@keyframes lx-pop { 40% { transform: scale(1.12); } }
/* hover dos cartões da calculadora, igual aos cartões do site */
.lx-hov { position: relative; overflow: hidden; transition: transform .5s var(--ez), border-color .4s, box-shadow .5s var(--ez); }
.lx-hov::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), #c04bff2e, transparent 60%); opacity: 0; transition: opacity .4s; }
.lx-hov:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--acc) 55%, var(--line)); box-shadow: 0 20px 50px -24px #c04bff88; }
.lx-hov:hover::before { opacity: 1; }
.lx-use-grid .bad.lx-hov:hover { border-color: #ff5c7a; box-shadow: 0 20px 50px -24px #ff5c7acc; }
.lx-use-grid .bad.lx-hov::before { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), #ff5c7a33, transparent 60%); }
.lx-use-hub.lx-hov:hover { border-color: #3ee6a8; box-shadow: 0 20px 50px -24px #3ee6a899; }
.lx-calc > .lx-save-box { transition: transform .5s var(--ez), box-shadow .5s var(--ez); }
.lx-calc > .lx-save-box:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 24px 60px -24px #3ee6a880; }
@media (prefers-reduced-motion: reduce) { .lx-packs.multi, .lx-use-grid .bad.pop b { animation: none; } .lx-hov:hover, .lx-calc > .lx-save-box:hover { transform: none; } }
.lx-save-hub strong { font-size: 1.25em; letter-spacing: .06em; background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-calc.loss .lx-save-box { opacity: 1; background: #ff5c7a14; border-color: #ff5c7a4d; }
.lx-calc.loss .lx-save-box > span, .lx-calc.loss .lx-total { color: #ff8aa0; }
.lx-calc-note { font-size: 12px; line-height: 1.5; }

/* ===== Final centralizado ===== */
.lx-final-in { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; max-width: 720px; }
.lx-final-in p { margin: 0; color: var(--muted); font-size: 17px; }
.lx-final .lx-title.sm { align-items: center; text-align: center; }
.lx-final .btn { align-self: center; }

.lx-btn, .lx-link { transition: translate .5s var(--ez), transform .45s var(--ez), box-shadow .45s var(--ez), background .3s, border-color .3s; }

@media (max-width: 900px) {
  .lx-calc { grid-template-columns: 1fr; grid-template-areas: "in" "save" "cmp" "note"; }
  .lx-cmp-pick { grid-template-columns: 1fr; }
  .lx-objs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .lx-ranges { grid-template-columns: 1fr; gap: 22px; }
  .lx-calc { padding: 8px; gap: 8px; border-radius: 22px; }
  .lx-calc-in, .lx-calc-cmp, .lx-calc > .lx-save-box { padding: 18px; }
  .lx-calc > .lx-save-box .btn { align-self: stretch; justify-content: center; }
  .lx-plan-pick { flex-direction: column !important; align-items: stretch; gap: 6px !important; }
}
@media (max-width: 480px) { .lx-vs { grid-template-columns: 1fr 1fr; gap: 8px; } .lx-vs-x { display: none; } .lx-vs-col { padding: 12px; } .lx-use-grid b { font-size: 18px; } .lx-use-grid .bad b { font-size: 22px; } }


/* ===== Transição de fumaça e final escuro ===== */
#calculadora { --dz: 0; opacity: calc(1 - var(--dz) * .92); filter: blur(calc(var(--dz) * 10px)) saturate(calc(1 + var(--dz) * .6)); transform: translateY(calc(var(--dz) * -70px)) scale(calc(1 - var(--dz) * .05)); transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - var(--dz) * 140%), transparent calc(130% - var(--dz) * 140%)); mask-image: linear-gradient(180deg, #000 calc(100% - var(--dz) * 140%), transparent calc(130% - var(--dz) * 140%)); will-change: opacity, filter, transform; }
.lx-ink { position: relative; z-index: 1; height: 42vh; margin-top: -12vh; pointer-events: none; overflow: visible; --ik: 0; }
.lx-smoke { position: absolute; inset: -30vh 0 0; width: 100%; height: calc(100% + 30vh); -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%); mask-image: linear-gradient(180deg, transparent 0%, #000 30%); }
.lx-ink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 35%; background: linear-gradient(180deg, transparent, #050308 85%); }
.lx-dark { position: relative; background: #050308; margin-top: -1px; }
.lx-dark::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5; background: radial-gradient(60% 40% at 50% 0%, #c8102e14, transparent 70%); }
.lx-center .lx-head { margin-left: auto; margin-right: auto; text-align: center; }
.lx-dark #planos { padding-top: clamp(24px, 4vw, 48px); --rz: 0; opacity: calc(1 - var(--rz) * .95); filter: blur(calc(var(--rz) * 12px)); transform: translateY(calc(var(--rz) * 70px)) scale(calc(1 - var(--rz) * .03)); transform-origin: 50% 0; will-change: opacity, filter, transform; }
.lx-center .lx-plans { justify-content: center; }
.lx-center .l-note { margin-left: auto; margin-right: auto; text-align: center; }
.lx-center .lx-head h2 span { position: relative; }

/* ===== Hovers nos botões do app ===== */
.btn { transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s, background .25s, border-color .25s, filter .25s; }
.btn:not(:disabled):hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--acc) 50%, var(--line)); background: color-mix(in srgb, var(--panel-2) 80%, var(--acc) 8%); }
.btn.pri:not(:disabled):hover { background: var(--acc-grad); filter: brightness(1.1) saturate(1.1); box-shadow: 0 8px 26px -6px color-mix(in srgb, var(--acc-2) 70%, transparent); }
.btn:not(:disabled):active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.icon { transition: background .25s, color .25s, border-color .25s, transform .3s cubic-bezier(.22,1,.36,1); }
.icon:hover { background: var(--panel-2); color: var(--text); border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); }
.icon:active { transform: scale(.94); }
#nav a, .proj, .new-project { transition: background .25s, color .25s, transform .3s cubic-bezier(.22,1,.36,1); }
#nav a:hover { transform: translateX(2px); }
.chip { transition: border-color .25s, color .25s; } .chip:hover { border-color: var(--acc); color: var(--text); }

/* ===== Logo oficial ===== */
.brand { background: none; padding: 4px 6px; }
.brand-full { height: 30px; width: auto; display: block; }
.brand-icon { display: none; height: 28px; width: 28px; object-fit: contain; }
body.collapsed .brand-full { display: none; }
body.collapsed .brand-icon { display: block; }
body.collapsed .brand { justify-content: center; margin-right: 0; }
.auth-brand img { height: 34px; width: auto; display: block; }
.l-nav .auth-brand img { height: 30px; }
@media (max-width: 760px) { .brand-full { display: none; } .brand-icon { display: block; } }
.pop .meta span.price-ok { color: var(--ok); }

/* =====================================================================
   v4 — botões dos cards, seleção, elementos e animações
   ===================================================================== */
:root { --ease: cubic-bezier(.22, 1, .36, 1); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* entrada suave dos cards */
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.grid .tile { animation: rise .45s var(--ease) both; animation-delay: calc(min(var(--i, 0), 18) * 25ms); }
.tile img, .tile video { transition: transform .5s var(--ease), filter .3s; }
.tile:hover img, .tile:hover video { transform: scale(1.035); }
.tile { transition: box-shadow .25s, transform .25s var(--ease); }
.tile.leaving { animation: none; transition: opacity .25s, transform .25s var(--ease); opacity: 0; transform: scale(.92); }

/* pílula de ações (vidro + destaque do tema) */
.tile .acts { top: 8px; right: 8px; gap: 2px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, #0b0710 62%, transparent);
  backdrop-filter: blur(10px) saturate(1.4); border: 1px solid #ffffff1a; box-shadow: 0 8px 24px #0007; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .25s var(--ease); }
.tile:hover .acts, .tile:focus-within .acts { opacity: 1; transform: none; }
.tile .acts .ab { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #f3ecffd9; background: none;
  opacity: 0; transform: translateX(4px); transition: background .15s, color .15s, transform .25s var(--ease), opacity .25s; }
.tile:hover .acts .ab { opacity: 1; transform: none; }
.tile:hover .acts .ab:nth-child(2) { transition-delay: 30ms; } .tile:hover .acts .ab:nth-child(3) { transition-delay: 60ms; }
.tile:hover .acts .ab:nth-child(4) { transition-delay: 90ms; } .tile:hover .acts .ab:nth-child(5) { transition-delay: 120ms; }
.ab svg { width: 17px; height: 17px; }
.ab:hover { background: color-mix(in srgb, var(--acc) 28%, transparent); color: #fff; transform: scale(1.08) !important; }
.ab:active { transform: scale(.92) !important; }
.ab.danger:hover { background: color-mix(in srgb, var(--err) 30%, transparent); color: #ffd0d8; }
.ab.fav.on { color: var(--acc-2); }
.ab.fav.on svg { fill: currentColor; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--acc-2) 70%, transparent)); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.ab.pop svg { animation: pop .35s var(--ease); }

/* dica ao passar o mouse */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(4px, -50%); white-space: nowrap;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px;
  pointer-events: none; opacity: 0; transition: opacity .15s, transform .2s var(--ease); box-shadow: 0 6px 18px #0008; z-index: 5; }
[data-tip]:hover::after { opacity: 1; transform: translate(0, -50%); }
.selbar [data-tip]::after { right: auto; left: 50%; top: auto; bottom: calc(100% + 10px); transform: translate(-50%, 4px); }
.selbar [data-tip]:hover::after { transform: translate(-50%, 0); }

/* círculo de seleção */
.tcheck { position: absolute; top: 8px; left: 8px; z-index: 3; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid #ffffffb0; background: #0006; backdrop-filter: blur(4px); color: transparent; opacity: 0; transform: scale(.8);
  transition: opacity .2s, transform .25s var(--ease), background .15s, border-color .15s; }
.tcheck svg { width: 14px; height: 14px; stroke-width: 3; }
.tile:hover .tcheck, body.selecting .tcheck { opacity: 1; transform: none; }
.tile:hover .badge, body.selecting .tile .badge { opacity: 0; }
.badge { transition: opacity .2s; }
.tile.sel .tcheck { background: var(--acc-grad); border-color: transparent; color: var(--acc-ink); box-shadow: var(--glow); }
.tile.sel { box-shadow: 0 0 0 2px var(--acc), var(--glow); transform: scale(.97); border-radius: 10px; }
.tile.sel img, .tile.sel video { filter: brightness(.8); }
body.selecting .tile[data-id] { cursor: pointer; }

/* barra da seleção */
.selbar { position: fixed; left: 50%; bottom: 112px; z-index: 40; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(14px) saturate(1.4); border: 1px solid var(--line);
  box-shadow: 0 16px 50px #000b, var(--glow); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: transform .35s var(--ease), opacity .25s; }
.selbar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.sel-count { font-size: 13px; color: var(--muted); margin-right: 8px; white-space: nowrap; }
.sel-count b { color: var(--text); font-size: 15px; }
.sb { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 13px; transition: background .15s, transform .15s var(--ease); }
.sb:hover { background: var(--panel-2); } .sb:active { transform: scale(.95); }
.sb.danger { background: color-mix(in srgb, var(--err) 18%, transparent); color: #ffb3c0; }
.sb.danger:hover { background: color-mix(in srgb, var(--err) 32%, transparent); color: #fff; }
.sb.ghost { color: var(--muted); }
.pop .ii { width: 16px; height: 16px; color: var(--muted); }

/* botões e modais */
.btn.danger-fill { background: var(--err); color: #fff; border: 0; }
.btn.danger-fill:hover { filter: brightness(1.1); }
@keyframes popin { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.modal:not(.hidden) .modal-card.pop-in { animation: popin .28s var(--ease); }

/* novo projeto na lateral */
.np-form { display: flex; gap: 6px; padding: 4px 6px 8px; animation: popin .25s var(--ease); }
.np-form .inp { padding: 7px 9px; font-size: 13px; }
.np-form .btn { padding: 6px 10px; }

/* ===== Elementos (referência: categorias à esquerda, busca, cards com @tag) ===== */
.picker { width: min(980px, 95vw); }
.picker .mpane { min-height: 440px; }
.el-layout { display: grid; grid-template-columns: 170px 1fr; gap: 18px; }
.el-layout.page { grid-template-columns: 200px 1fr; }
.el-side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; align-self: start; }
.el-cat { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 13px; transition: background .15s, color .15s; }
.el-cat svg { width: 17px; height: 17px; }
.el-cat em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--dim); background: var(--bg); padding: 1px 7px; border-radius: 999px; }
.el-cat:hover { background: var(--panel-2); color: var(--text); }
.el-cat.on { background: var(--panel-2); color: var(--text); box-shadow: inset 2px 0 0 var(--acc); }
.el-cat.on svg { color: var(--acc); }
.el-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.el-search { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; transition: border-color .15s, box-shadow .15s; }
.el-search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.el-search svg { color: var(--dim); width: 16px; height: 16px; }
.el-search input { flex: 1; background: none; border: 0; outline: none; padding: 10px 0; }
.el-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.el-card { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); cursor: pointer;
  animation: rise .45s var(--ease) both; animation-delay: var(--d, 0ms); transition: transform .25s var(--ease), border-color .2s, box-shadow .25s; }
.el-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--acc) 60%, transparent); box-shadow: 0 12px 30px #0009, var(--glow); }
.el-card.leaving { transition: opacity .2s, transform .2s; opacity: 0; transform: scale(.9); animation: none; }
.el-art { aspect-ratio: 16/10; display: grid; gap: 2px; background: var(--panel-2); overflow: hidden; }
.el-art i { background: center/cover; transition: transform .5s var(--ease); }
.el-card:hover .el-art i { transform: scale(1.06); }
.el-art.grid2 { grid-template-columns: 1fr 1fr; }
.el-art.grid3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; } .el-art.grid3 i:first-child { grid-row: span 2; }
.el-art.grid4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.el-meta { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.el-meta span { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-meta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-meta b.clamp { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 500; font-size: 12px; }
.el-acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: #0b0710b0; backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .25s var(--ease); }
.el-card:hover .el-acts { opacity: 1; transform: none; }
.el-acts .ab { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #f3ecffd9; }
.el-acts [data-tip]::after { right: auto; left: 50%; top: calc(100% + 8px); transform: translate(-50%, -4px); }
.el-acts [data-tip]:hover::after { transform: translate(-50%, 0); }
.el-add { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 150px; color: var(--muted); border-style: dashed; background: transparent; }
.el-add:hover { color: var(--text); }
.el-plus { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--panel-2); transition: background .2s, transform .3s var(--ease), color .2s; }
.el-add:hover .el-plus { background: var(--acc-grad); color: var(--acc-ink); transform: rotate(90deg); box-shadow: var(--glow); }

/* criar elemento: área de soltar e categorias */
.drop { display: block; border: 2px dashed var(--line); border-radius: 14px; padding: 18px; cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 7%, transparent); }
.drop-empty { display: grid; place-items: center; gap: 6px; text-align: center; padding: 10px 0; }
.drop.has .drop-empty { display: none; }
.drop-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.drop-thumbs:empty { display: none; }
.drop-thumbs .dt { position: relative; aspect-ratio: 1; border-radius: 10px; background: center/cover; animation: popin .3s var(--ease); }
.drop-thumbs .dt button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: #000b; color: #fff; display: grid; place-items: center; }
.drop-thumbs .dt button svg { width: 12px; height: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13px; transition: all .2s var(--ease); }
.chip-btn svg { width: 15px; height: 15px; }
.chip-btn.on { background: var(--acc-grad); color: var(--acc-ink); border-color: transparent; box-shadow: var(--glow); }

@media (max-width: 760px) {
  .el-layout, .el-layout.page { grid-template-columns: 1fr; }
  .el-side { flex-direction: row; overflow-x: auto; position: static; }
  .el-cat em { display: none; }
  .selbar { bottom: 96px; max-width: calc(100vw - 24px); overflow-x: auto; }
  .sb span { display: none; }
  .tile .acts, .tile .acts .ab, .tcheck { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ===== Modos de visualização: Grade · Galeria · Lista ===== */
.viewsw { display: inline-flex; gap: 2px; padding: 3px; margin-left: 4px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.viewsw button { width: 30px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--dim); transition: background .15s, color .15s; }
.viewsw button svg { width: 16px; height: 16px; }
.viewsw button:hover { color: var(--text); }
.viewsw button.on { background: var(--panel-2); color: var(--acc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 35%, transparent); }
.viewsw [data-tip]::after { right: auto; left: 50%; top: calc(100% + 8px); transform: translate(-50%, -4px); }
.viewsw [data-tip]:hover::after { transform: translate(-50%, 0); }

/* Grade: quadrados iguais, denso */
.grid.gsquare { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.grid.gsquare .tile { aspect-ratio: 1; border-radius: 10px; }

/* Galeria: mosaico, formato original, maior */
.grid.gmasonry { display: block; columns: 4 260px; column-gap: 12px; }
.grid.gmasonry .tile { break-inside: avoid; margin-bottom: 12px; border-radius: 14px; width: 100%; display: block; }
.grid.gmasonry .tile:hover { box-shadow: 0 14px 40px #000a; }
.grid.gmasonry .tile .cost { opacity: 0; transition: opacity .2s; }
.grid.gmasonry .tile:hover .cost { opacity: 1; }

/* Lista: uma linha por geração */
.grid.glist { display: flex; flex-direction: column; gap: 6px; }
.tile.lrow { aspect-ratio: auto; display: grid; grid-template-columns: 34px 64px minmax(0, 1fr) 70px 80px 70px 110px auto; align-items: center; gap: 14px;
  padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); overflow: visible; }
.tile.lrow:hover { border-color: color-mix(in srgb, var(--acc) 45%, transparent); background: color-mix(in srgb, var(--panel-2) 70%, var(--panel)); }
.tile.lrow img, .tile.lrow video { transform: none !important; }
.lrow .tcheck { position: static; opacity: 1; transform: none; border-color: var(--line); }
.lrow.sel .tcheck { border-color: transparent; }
.lr-thumb { position: relative; width: 64px; height: 64px; border-radius: 9px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; }
.lr-thumb img, .lr-thumb video { width: 100%; height: 100%; object-fit: cover; }
.lr-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fffc; font-size: 14px; pointer-events: none; }
.lr-err { color: var(--err); font-weight: 800; font-size: 20px; }
.spinner.sm { width: 20px; height: 20px; border-width: 2px; margin: 0; }
.lr-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lr-prompt { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-errtxt { color: var(--err); font-style: normal; }
.lr-col { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lr-date { color: var(--dim); }
.tile.lrow .acts.lr-acts { position: static; flex-direction: row; opacity: 1; transform: none; background: none; border: 0; box-shadow: none; backdrop-filter: none; padding: 0; }
.tile.lrow .acts.lr-acts .ab { opacity: .75; transform: none; }
.tile.lrow:hover .acts.lr-acts .ab { opacity: 1; }
.lr-acts [data-tip]::after { right: auto; left: 50%; top: auto; bottom: calc(100% + 8px); transform: translate(-50%, 4px); }
.lr-acts [data-tip]:hover::after { transform: translate(-50%, 0); }
.tile.lrow.sel { transform: none; box-shadow: 0 0 0 2px var(--acc); }

@media (max-width: 900px) {
  .tile.lrow { grid-template-columns: 30px 56px minmax(0, 1fr) auto; }
  .tile.lrow .lr-col { display: none; }
  .lr-thumb { width: 56px; height: 56px; }
  .grid.gmasonry { columns: 2 150px; }
}

/* ===== Economia ===== */
.ic-save { background: linear-gradient(135deg, #3ee6a8, #2fb5ff); font-weight: 800; }
.sv-loading { display: grid; place-items: center; padding: 80px 0; }
.sv-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 22px 24px; border-radius: 18px;
  background: radial-gradient(600px 200px at 0% 0%, color-mix(in srgb, var(--ok) 18%, transparent), transparent 70%), var(--panel); border: 1px solid var(--line); animation: rise .45s var(--ease) both; }
.sv-hero.neutral { background: var(--panel); }
.sv-hero h2 { margin: 6px 0 4px; font-size: clamp(24px, 3vw, 36px); font-weight: 800; }
.sv-hero h2 em { font-style: normal; color: var(--ok); text-shadow: 0 0 24px color-mix(in srgb, var(--ok) 45%, transparent); }
.sv-hero p { margin: 0; }
.sv-filters { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.sv-explain { color: var(--muted); max-width: 820px; margin: 16px 2px; font-size: 14px; }
.sv-explain b { color: var(--text); }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.sv-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; animation: rise .45s var(--ease) both; animation-delay: var(--d); }
.sv-head { display: flex; justify-content: space-between; align-items: baseline; }
.sv-head b { font-size: 16px; }
.sv-head span { font-size: 12px; }
.sv-big { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.sv-big b { font-size: 32px; font-weight: 800; letter-spacing: -.01em; }
.sv-big.up b { color: var(--ok); }
.sv-big.down b { color: #ffb36b; }
.sv-rows { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; font-size: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.sv-rows span { color: var(--muted); }
.sv-rows b { text-align: right; font-weight: 600; }
.sv-rows .sub { font-size: 12px; color: var(--dim); font-weight: 500; }
.sv-rows .warn { color: #ffb36b; }
.sv-rows em { font-style: normal; color: var(--dim); font-weight: 500; font-size: 12px; cursor: help; }
.sv-h3 { margin: 28px 2px 10px; font-size: 15px; }
.sv-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.sv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sv-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.sv-table td { padding: 10px 14px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); white-space: nowrap; }
.sv-table tr:last-child td { border-bottom: 0; }
.sv-table tr:hover td { background: color-mix(in srgb, var(--panel-2) 50%, transparent); }
.sv-table small { font-size: 11px; opacity: .9; margin-left: 4px; }
.sv-table .up, .sv-legend .up { color: var(--ok); }
.sv-table .down, .sv-legend .down { color: #ffb36b; }
.sv-legend { font-size: 12px; margin: 8px 2px 0; }
.sv-obs { margin-top: 26px; padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--line); background: color-mix(in srgb, var(--panel) 60%, transparent); font-size: 13px; }
.sv-obs p { margin: 6px 0 0; }
.sv-obs .muted { font-size: 12px; }
@media (max-width: 760px) { .sv-filters { align-items: stretch; width: 100%; } .sv-filters .seg { overflow-x: auto; } }

/* ===== Google Flow ===== */
.ic-flow { background: linear-gradient(135deg, #4285f4, #34a853 45%, #fbbc05 70%, #ea4335); font-size: 10px; }
.nav-free { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); padding: 1px 7px; border-radius: 999px; }
body.collapsed .nav-free { display: none; }
.fl-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding: 24px; border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(500px 220px at 100% 0%, #4285f433, transparent 70%), radial-gradient(500px 220px at 0% 100%, #34a85326, transparent 70%), var(--panel); animation: rise .45s var(--ease) both; }
.fl-hero h1 { margin: 6px 0; font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.01em; }
.fl-hero p { margin: 0; max-width: 560px; }
.fl-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.fl-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0; margin: 14px 0 18px; }
.fl-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.fl-steps b { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--acc-grad); color: var(--acc-ink); font-size: 12px; flex-shrink: 0; }
.fl-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.fl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fl-head h3 { margin: 0; font-size: 15px; }
.seg.sm button { padding: 4px 10px; font-size: 12px; }
.inp.sm { padding: 5px 8px; font-size: 12px; width: auto; }
.fl-editor { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 12px; }
.fl-editor textarea { font-family: inherit; font-size: 14px; resize: vertical; min-height: 110px; }
.fl-list { display: flex; flex-direction: column; gap: 8px; }
.fl-card { padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); animation: rise .4s var(--ease) both; animation-delay: var(--d); transition: border-color .2s, transform .2s var(--ease); }
.fl-card:hover { border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.fl-card.usado { opacity: .78; }
.fl-card.leaving { opacity: 0; transform: scale(.96); transition: .2s; }
.fl-card-top { display: flex; align-items: center; gap: 8px; }
.fl-card-top b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-tag { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.fl-tag.usado { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.fl-date { margin-left: auto; font-size: 11px; }
.fl-text { margin: 8px 0 10px; font-size: 13px; line-height: 1.5; color: var(--text); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.fl-text em { font-style: normal; color: var(--acc); font-weight: 600; }
.fl-acts { display: flex; gap: 4px; }
.fl-acts .sb { height: 32px; font-size: 12px; }
.fl-acts .fl-copy { background: color-mix(in srgb, var(--acc) 16%, transparent); color: var(--text); }
.fl-acts .fl-copy:hover { background: color-mix(in srgb, var(--acc) 28%, transparent); }
.fl-acts .sb.ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.fl-acts [data-tip]::after { right: auto; left: 50%; top: auto; bottom: calc(100% + 8px); transform: translate(-50%, 4px); }
.fl-acts [data-tip]:hover::after { transform: translate(-50%, 0); }
.fl-drop { margin-bottom: 10px; }
.fl-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.drop-thumbs .dt video { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
@media (max-width: 980px) { .fl-cols { grid-template-columns: 1fr; } .fl-steps { grid-template-columns: 1fr 1fr; } }

/* ===== Histórias (aba Google Flow) ===== */
.fl-steps.six { grid-template-columns: repeat(6, 1fr); }
.st-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.st-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); animation: rise .4s var(--ease) both; animation-delay: var(--d); transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; }
.st-card:hover { border-color: color-mix(in srgb, var(--acc) 55%, transparent); transform: translateY(-2px); box-shadow: 0 12px 30px #0008; }
.st-card .muted { font-size: 12px; }
.st-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.st-top b { font-size: 15px; }
.st-prog { display: flex; gap: 4px; margin-top: 6px; }
.st-prog i { flex: 1; height: 4px; border-radius: 4px; background: var(--panel-2); }
.st-prog i.on { background: var(--acc-grad); }
.fl-tag.warn { color: #ffb36b; background: #ffb36b1f; }

.st-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.st-title { flex: 1; min-width: 220px; background: none; border: 1px solid transparent; border-radius: 10px; padding: 6px 10px; font-size: 22px; font-weight: 800; color: var(--text); outline: none; }
.st-title:hover, .st-title:focus { border-color: var(--line); background: var(--panel); }
.st-head-r { display: flex; gap: 6px; align-items: center; }
.st-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.st-tabs button { flex: 1; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; transition: background .2s, color .2s; }
.st-tabs button:hover { color: var(--text); }
.st-tabs button.on { background: var(--acc-grad); color: var(--acc-ink); box-shadow: var(--glow); }
.st-tabs button.locked { opacity: .55; }
.st-body { animation: popin .3s var(--ease); }
.st-lead { margin: 0 0 14px; max-width: 860px; font-size: 14px; }
.st-note { padding: 12px 14px; border-radius: 12px; border-left: 3px solid #ffb36b; background: #ffb36b14; margin-bottom: 14px; font-size: 14px; }
.st-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.st-script { font-family: inherit; font-size: 15px; line-height: 1.6; min-height: 320px; resize: vertical; }
textarea.inp { font-family: inherit; }
.st-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

/* Elenco */
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cast-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); animation: rise .4s var(--ease) both; }
.cast-img { position: relative; aspect-ratio: 16/9; background: var(--panel-2) center/cover; display: grid; place-items: center; }
.cast-img.empty span { color: var(--dim); font-size: 12px; }
.cast-ok { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 85%, #000); color: #031; }
.cast-meta { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 2px; }
.cast-meta .muted { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.cast-meta b em { font-style: normal; color: var(--acc); font-weight: 600; font-size: 12px; }
.cast-meta p { margin: 4px 0 0; font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cast-card .fl-acts { padding: 8px 10px 12px; }
.fl-acts.wrap { flex-wrap: wrap; }
.cast-add { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 220px; border-style: dashed; color: var(--muted); background: transparent; }
.cast-add:hover .el-plus { background: var(--acc-grad); color: var(--acc-ink); transform: rotate(90deg); box-shadow: var(--glow); }

/* Storyboard */
.sb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.sb-strip { padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); animation: rise .4s var(--ease) both; animation-delay: var(--d); }
.sb-strip.outdated { border-color: #ffb36b66; }
.sb-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sb-h b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-code { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.sb-panels { display: grid; gap: 4px; background: #fff; padding: 4px; border-radius: 8px; }
.sb-panels.row { grid-template-columns: repeat(3, 1fr); }
.sb-panels.row .sb-panel { aspect-ratio: 9/16; }
.sb-panels.col { grid-template-rows: repeat(3, auto); }
.sb-panels.col .sb-panel { aspect-ratio: 16/9; }
.sb-panel { position: relative; background-color: #eee; background-repeat: no-repeat; border: 1.5px solid #111; display: grid; place-items: center; overflow: hidden; }
.sb-panel.empty { background: repeating-linear-gradient(45deg, #f4f4f4, #f4f4f4 8px, #ececec 8px, #ececec 16px); }
.sb-panel.empty span { color: #555; font-size: 10px; line-height: 1.35; padding: 6px; text-align: center; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.sb-panel .spinner { border-color: #ccc; border-top-color: var(--acc); }
.sb-n { position: absolute; bottom: 3px; left: 3px; font-style: normal; font-size: 9px; font-weight: 800; color: #111; background: #fffd; padding: 1px 5px; border-radius: 4px; }
.sb-cap { margin: 8px 2px; font-size: 12px; color: var(--muted); }

/* Cliente */
.cl-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: start; }
.cl-card { padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.cl-card h3 { margin: 0; font-size: 20px; }
.cl-card p { margin: 0; }
.cl-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-hist { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; padding-top: 10px; border-top: 1px solid var(--line); }

/* Vídeo */
.vs-list { display: flex; flex-direction: column; gap: 12px; }
.vs-card { padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); animation: rise .4s var(--ease) both; }
.vs-card.done { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.vs-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.vs-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.vs-prompt { margin: 0; white-space: pre-wrap; font: 12px/1.55 ui-monospace, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; max-height: 220px; overflow: auto; color: var(--text); }
.vs-refs { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.vs-ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
.vs-ref { display: flex; flex-direction: column; gap: 4px; text-align: left; border-radius: 8px; padding: 4px; border: 1px solid var(--line); background: var(--bg); transition: border-color .2s; }
.vs-ref:hover { border-color: var(--acc); }
.vs-ref { cursor: grab; }
.vs-ref:active { cursor: grabbing; }
.vs-ref img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--panel-2); -webkit-user-drag: element; }
.vs-ref span { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-video { width: 100%; border-radius: 10px; grid-column: 1 / -1; max-height: 360px; background: #000; }
.vs-card .fl-acts { margin-top: 10px; }
.vs-card .fl-acts .sb span { margin-left: 4px; }
@media (max-width: 980px) { .st-grid2, .cl-grid, .vs-body { grid-template-columns: 1fr; } .sb-list { grid-template-columns: 1fr; } .fl-steps.six { grid-template-columns: 1fr 1fr; } }

/* ================= Responsivo: celular e tablet ================= */
.menu-btn, .side-shade { display: none; }
@media (max-width: 1100px) and (min-width: 761px) { /* tablet: menu mais estreito */
  #side { width: 200px; }
  #composer { left: calc(200px + (100vw - 200px) / 2); width: calc(100vw - 224px); }
  body.collapsed #composer { left: calc(64px + (100vw - 64px) / 2); width: calc(100vw - 88px); }
}
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  /* menu lateral vira gaveta com nomes */
  #side { position: fixed; z-index: 60; top: 0; left: 0; height: 100%; width: min(280px, 82vw); transform: translateX(-104%); transition: transform .35s cubic-bezier(.22,1,.36,1); box-shadow: 20px 0 60px #0009; }
  body.nav-open #side { transform: none; }
  #side span, .side-sec, #projectList { display: revert; }
  #side .brand-full { display: block; } #side .brand-icon { display: none; }
  #collapse { display: none; }
  .side-shade { display: block; position: fixed; inset: 0; z-index: 55; background: #0008; backdrop-filter: blur(2px); }
  .side-shade[hidden] { display: none; }
  #app { margin-left: 0; width: 100%; }
  /* topo */
  #top { grid-template-columns: auto 1fr auto; gap: 8px; padding: 0 10px; height: 52px; }
  .menu-btn { display: grid; place-items: center; grid-column: 1; width: 40px; height: 40px; font-size: 20px; border: 0; }
  .tabs { grid-column: 2; justify-self: start; }
  .top-right { gap: 6px; }
  #spendChip { white-space: nowrap; padding: 5px 10px; }
  #spendChip #spent { display: none; }
  #refreshBal { display: none; }
  #view { padding: 12px 12px 190px; }
  /* compositor ocupa a largura toda, embaixo */
  #composer, body.collapsed #composer { left: 8px; right: 8px; width: auto; transform: none; bottom: 8px; gap: 6px; }
  body.home #composer { bottom: 8px; }
  .mode { display: flex; flex-direction: column; padding: 4px; }
  .mode button { padding: 5px 6px; font-size: 10px; }
  .box { padding: 8px 10px; gap: 6px; }
  .opts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .opts::-webkit-scrollbar { display: none; }
  .opt { white-space: nowrap; flex-shrink: 0; }
  #generate { width: 64px; font-size: 10px; }
  /* janelas e popovers cabem na tela */
  .modal-card { width: calc(100vw - 16px) !important; max-height: calc(100dvh - 16px); overflow-y: auto; }
  .pop { max-width: calc(100vw - 16px); left: 8px !important; right: 8px; }
  /* Histórias */
  .st-head { flex-wrap: wrap; gap: 8px; }
  .st-head .st-title { order: 2; flex: 1 1 100%; font-size: 20px; }
  .st-head-r { flex-wrap: wrap; gap: 6px; }
  .st-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .st-tabs::-webkit-scrollbar { display: none; }
  .st-tabs button { flex-shrink: 0; white-space: nowrap; }
  .cast-grid { grid-template-columns: 1fr 1fr; }
  .sb-list { grid-template-columns: 1fr !important; }
  .fl-hero { padding: 16px; }
  .fl-steps, .fl-steps.six { grid-template-columns: 1fr 1fr; }
  .vs-ref-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .vs-prompt { max-height: 220px; font-size: 11.5px; }
  .acc-row.between { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 420px) {
  .cast-grid { grid-template-columns: 1fr; }
  .tabs { display: none; }
}

@media (max-width: 760px) {
  /* cabeçalho das páginas: título em cima, filtros embaixo com rolagem lateral */
  h1.page { flex-wrap: wrap; gap: 10px; }
  h1.page > span:first-child { flex: 1 1 100%; font-size: 18px; }
  h1.page .toolbar { flex: 1 1 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  h1.page .toolbar::-webkit-scrollbar { display: none; }
  h1.page .toolbar > * { flex-shrink: 0; }
  h1.page .toolbar input.tbtn { width: auto !important; flex: 1 0 140px; }
  /* ações das imagens: fila compacta embaixo (no celular não existe "passar o mouse") */
  .tile .acts { top: auto; bottom: 6px; right: 6px; left: 6px; flex-direction: row; justify-content: flex-end; gap: 2px; padding: 3px; }
  .tile .acts .ab, .tile .acts button { width: 28px; height: 28px; }
  .tile .meta, .tile .tinfo { padding-bottom: 40px; }
}
@media (hover: none) {
  .tile .acts, .tile .acts .ab, .tcheck { opacity: 1; transform: none; }
}

.nav-free { white-space: nowrap; }
@media (max-width: 1100px) and (min-width: 761px) { .nav-free { font-size: 9px; padding: 2px 5px; } }

/* ===== Demo de Histórias no celular: cabeçalho compacto, janela ocupando o resto da tela ===== */
.lx-story-now { display: none; }
@media (max-width: 900px) {
  .lx-story { height: 620vh; border-radius: 28px 28px 0 0; }
  .lx-story-pin { display: flex; flex-direction: column; align-items: stretch; gap: 10px; height: 100vh; height: 100svh; padding: 64px 14px 14px; max-width: none; }
  .lx-story-side { flex: 0 0 auto; min-width: 0; }
  .lx-new { margin-bottom: 8px; font-size: 10.5px; padding-right: 10px; }
  .lx-new i { font-size: 9px; padding: 3px 8px; }
  .lx-story .lx-kick { display: none; }
  .lx-story-h { font-size: clamp(26px, 8vw, 34px); margin: 0 0 10px; }
  /* as 7 etapas viram uma barra segmentada + "2/7 · Elenco" */
  .lx-story-steps { flex-direction: row; gap: 4px; }
  .lx-story-steps li { flex: 1; height: 4px; padding: 0; border-radius: 4px; background: #1a102422; }
  .lx-story-steps li em, .lx-story-steps li span { display: none !important; }
  .lx-story-steps li i { height: 100%; border-radius: 4px; }
  .lx-story .lx-story-steps li.on, .lx-story .lx-story-steps li.done { background: #1a102422; box-shadow: none; }
  .lx-story .lx-story-steps li.done i { transform: scaleX(1); }
  .lx-story-now { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; color: #1a1024; }
  .lx-story-now b { font-size: 12px; font-weight: 800; color: #c0267a; letter-spacing: .06em; }
  .lx-story-now span { font-size: 17px; font-weight: 800; }
  .lx-story-cap { min-height: 2.8em; margin: 4px 0 0; font-size: 13px; line-height: 1.45; }
  .lx-story-win { flex: 1 1 auto; height: auto; min-height: 0; border-radius: 18px; transform: none; }
  .lx-win-bar { padding: 9px 12px; }
  .lx-win-tabs { display: none; }
  .lx-sc { padding: 12px; }
  .lx-type { font-size: 12.5px; }
  .lx-cards { grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
  .lx-pc { padding: 8px; gap: 4px; }
  .lx-places { gap: 8px; }
  .lx-objs { grid-template-columns: repeat(2, 1fr); gap: 8px; align-content: start; }
  .lx-ob { padding: 6px 6px 8px; gap: 5px; }
  .lx-ob b { font-size: 12px; }
  .lx-strip { grid-template-columns: 22px repeat(3, 1fr); gap: 6px; }
  /* cliente: PDF em cima, conversa embaixo */
  .lx-client { grid-template-columns: 1fr; grid-template-rows: 1fr 1.05fr; gap: 8px; }
  .lx-pdfv { display: flex; }
  .lx-pdfv-pages { padding: 8px; }
  .lx-pdfv-pages img { left: 8px; right: 8px; top: 8px; width: calc(100% - 16px); }
  .lx-wa-chat { padding: 8px; gap: 6px; }
  .lx-msg { font-size: 12px; }
  /* vídeo: celular no centro, linha do tempo embaixo */
  .lx-vid { inset: 12px; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }
  .lx-phone { justify-self: center; }
  .lx-vtl { flex-direction: row; gap: 8px; }
  .lx-vtl-h, .lx-vchips { display: none; }
  .lx-vclip { flex: 1; padding: 7px; }
  .lx-vclip-top { font-size: 10.5px; margin-bottom: 5px; } .lx-vclip-top span { display: none; }
  .lx-vthumbs img { aspect-ratio: 1; }
  .lx-vclip.on { transform: translateY(-2px); }
}
