/* Swipe — estilos. Inter (400–650), tons quentes neutros, um azul de ação. */
:root {
  --bg: #f6f5f2; --lado: #efeee9; --card: #ffffff; --ink: #19191c; --ink-2: #66686e; --ink-3: #9b9da2;
  --line: rgb(25 25 28 / .08); --line-2: rgb(25 25 28 / .14); --hover: rgb(25 25 28 / .045); --sel: rgb(25 25 28 / .075);
  --accent: #2f5bff; --accent-ink: #fff; --chip: #e9e8e3; --danger: #c2341b; --laranja: #e59a2f;
  --anel: 0 0 0 1px var(--line); --shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(0 0 0 / .04), 0 4px 14px rgb(0 0 0 / .04);
  --pop: 0 0 0 1px var(--line), 0 20px 60px rgb(0 0 0 / .18);
  --r: 12px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --topo: 56px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-optical-sizing: auto; font-feature-settings: "cv11", "ss01";
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121315; --lado: #17181b; --card: #1c1d20; --ink: #ededeb; --ink-2: #a3a5ab; --ink-3: #6f7177;
    --line: rgb(255 255 255 / .08); --line-2: rgb(255 255 255 / .14); --hover: rgb(255 255 255 / .05); --sel: rgb(255 255 255 / .09);
    --chip: #26282c; --shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(0 0 0 / .3); --pop: 0 0 0 1px var(--line-2), 0 20px 60px rgb(0 0 0 / .5); }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; font-weight: 400; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img, video { display: block; max-width: 100%; }
svg { flex: none; }
.wrap { margin: 0 auto; padding: 0 16px; }

/* casca: sidebar + principal */
.casca { min-height: 100vh; }
@media (min-width: 900px) { .casca { display: grid; grid-template-columns: 236px minmax(0, 1fr); } }
.lado-nav { background: var(--lado); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 0 10px calc(10px + var(--safe-b)); overflow-y: auto; }
@media (min-width: 900px) { .lado-nav { position: sticky; top: 0; height: 100vh; } .veu { display: none; } }
@media (max-width: 899px) {
  .lado-nav { position: fixed; inset: 0 auto 0 0; width: min(288px, 84vw); z-index: 40; padding-top: var(--safe-t); transform: translateX(-102%); transition: transform .22s cubic-bezier(.2,.7,.2,1); }
  .lado-nav.aberto { transform: none; box-shadow: 0 0 40px rgb(0 0 0 / .2); }
  .veu { position: fixed; inset: 0; z-index: 39; background: rgb(0 0 0 / .3); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .veu.on { opacity: 1; pointer-events: auto; }
}
.lado-nav > .marca { height: var(--topo); padding: 0 8px; flex: none; }
.grupos { flex: 1; display: flex; flex-direction: column; gap: 20px; padding-top: 6px; }
.grupo { display: flex; flex-direction: column; gap: 1px; }
.grupo h3 { font-size: 11px; font-weight: 550; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 0 10px 6px; }
.item { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; font-weight: 450; color: var(--ink); text-align: left; width: 100%; transition: background .12s; }
.item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item small { color: var(--ink-3); font-size: 12px; font-weight: 450; font-variant-numeric: tabular-nums; }
.item svg { width: 16px; height: 16px; color: var(--ink-2); }
.item:hover { background: var(--hover); }
.item.on { background: var(--sel); font-weight: 550; }
.item.on small { color: var(--ink-2); }
.item .ponto { margin: 0 5px; }
.item.mais span { color: var(--ink-2); }
.item.mais:hover span { color: var(--ink); }
.filtro-nicho { margin: 0 0 4px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); padding: 0 10px; font-size: 13px; outline: none; }
.filtro-nicho:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(47 91 255 / .15); }
.nada { font-size: 12.5px; color: var(--ink-3); padding: 4px 10px; }
.nuvem { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 8px; }
.nuvem button { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--hover); color: var(--ink-2); }
.nuvem button:hover { color: var(--ink); }
.nuvem button.on { background: var(--ink); color: var(--bg); }
.rodape-lado { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding: 10px; border-radius: 8px; font-size: 12.5px; color: var(--ink-2); }
.rodape-lado span { display: flex; align-items: center; gap: 8px; }
.rodape-lado span::before { content: attr(data-ini); width: 22px; height: 22px; border-radius: 50%; background: var(--chip); color: var(--ink); display: grid; place-items: center; font-size: 11px; font-weight: 550; text-transform: uppercase; }
.rodape-lado button { color: var(--ink-3); font-size: 12.5px; }
.rodape-lado button:hover { color: var(--ink); }
.principal { min-width: 0; }

/* topo */
.topo { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); padding-top: var(--safe-t); border-bottom: 1px solid var(--line); }
.topo .wrap { display: flex; align-items: center; gap: 10px; height: var(--topo); }
@media (min-width: 900px) { .topo .wrap { display: grid; grid-template-columns: 1fr minmax(0, 600px) 1fr; padding: 0 24px; } .topo .busca { grid-column: 2; } .topo #novo { grid-column: 3; justify-self: end; } }
.marca { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -.015em; font-size: 15px; }
.marca img { width: 24px; height: 24px; border-radius: 6px; }
.btn-menu { width: 36px; height: 36px; margin-left: -6px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--ink-2); }
.btn-menu svg { width: 20px; height: 20px; }
.busca { flex: 1; display: flex; align-items: center; gap: 9px; background: var(--card); box-shadow: var(--anel), 0 1px 2px rgb(0 0 0 / .03); border-radius: 10px; padding: 0 6px 0 12px; height: 36px; min-width: 0; color: var(--ink-3); text-align: left; font-size: 13.5px; transition: box-shadow .15s; }
.busca span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca svg { width: 15px; height: 15px; color: var(--ink-3); }
.busca:hover { box-shadow: 0 0 0 1px var(--line-2), 0 1px 3px rgb(0 0 0 / .05); }
kbd { font: 500 11px/1 Inter, ui-sans-serif, -apple-system, sans-serif; letter-spacing: .02em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px 2px; color: var(--ink-2); background: var(--bg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: filter .12s, background .12s; }
.btn-pri { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / .15), 0 1px 2px rgb(47 91 255 / .3); }
.btn-pri:hover { filter: brightness(1.06); }
.btn-sec { background: var(--card); box-shadow: var(--anel); }
.btn-sec:hover { background: var(--hover); }
.btn-perigo { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.btn svg { width: 16px; height: 16px; }
@media (min-width: 900px) { .so-celular, .btn-menu { display: none !important; } }
@media (max-width: 899px) { .so-desktop { display: none !important; } }
.fab { position: fixed; right: 18px; bottom: calc(20px + var(--safe-b)); z-index: 30; width: 54px; height: 54px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 8px 24px rgb(47 91 255 / .32), inset 0 1px 0 rgb(255 255 255 / .18); }
.fab svg { width: 22px; height: 22px; }

/* filtros ativos */
.ativos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px 16px 12px; min-height: 52px; }
@media (min-width: 900px) { .ativos { padding: 16px 24px 14px; } }
.chip { flex: none; height: 30px; padding: 0 11px; border-radius: 8px; background: var(--card); box-shadow: var(--anel); font-size: 13px; font-weight: 450; display: inline-flex; align-items: center; gap: 6px; }
.chip small { color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.ativos .chip { height: 28px; padding: 0 6px 0 10px; font-weight: 500; }
.ativos .chip span { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; opacity: .6; font-size: 10px; }
.ativos .chip:hover span { opacity: 1; background: rgb(255 255 255 / .15); }
.limpar { font-size: 12.5px; color: var(--ink-2); padding: 0 6px; }
.limpar:hover { color: var(--ink); }
.resumo { color: var(--ink-3); font-size: 12.5px; margin-left: auto; font-variant-numeric: tabular-nums; }
.ativos .resumo:first-child { margin-left: 0; }

/* grade */
.grade { columns: 2 150px; column-gap: 10px; padding: 0 16px 120px; }
@media (min-width: 700px) { .grade { columns: 4 220px; column-gap: 16px; } }
@media (min-width: 900px) { .grade { padding: 0 24px 80px; } }
.card { break-inside: avoid; margin-bottom: 10px; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: block; width: 100%; text-align: left; transition: box-shadow .18s, transform .18s; }
@media (min-width: 700px) { .card { margin-bottom: 16px; } }
@media (hover: hover) { .card:hover { box-shadow: 0 0 0 1px var(--line-2), 0 8px 28px rgb(0 0 0 / .08); transform: translateY(-1px); } }
.card .img { background: var(--chip); min-height: 80px; max-height: 460px; overflow: hidden; border-bottom: 1px solid var(--line); }
.card img { width: 100%; height: auto; object-fit: cover; object-position: top; }
.card .meta { padding: 9px 12px 11px; display: flex; flex-direction: column; gap: 1px; }
.card .t { font-size: 13px; font-weight: 550; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.005em; }
.card .s { font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.ponto { width: 6px; height: 6px; border-radius: 50%; background: var(--laranja); flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--laranja) 22%, transparent); }
.vazio { text-align: center; color: var(--ink-2); padding: 80px 24px; }
.vazio b { display: block; color: var(--ink); font-size: 16px; font-weight: 550; margin-bottom: 4px; }
.carregar { display: flex; justify-content: center; padding: 0 0 120px; }
.carregar:empty { display: none; }

/* folha (adicionar, detalhe) */
.fundo { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .45); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 760px) { .fundo { align-items: center; padding: 24px; } }
.folha { background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; border-radius: 20px 20px 0 0; overflow: auto; padding: 18px 16px calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
@media (min-width: 760px) { .folha { border-radius: 20px; } }
.folha.larga { max-width: 1180px; }
.folha h2 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fechar { width: 32px; height: 32px; border-radius: 8px; background: var(--hover); color: var(--ink-2); font-size: 15px; flex: none; }
.fechar:hover { background: var(--sel); color: var(--ink); }
.abas { display: flex; background: var(--chip); border-radius: 999px; padding: 3px; margin-bottom: 16px; }
.abas button { flex: 1; height: 34px; border-radius: 999px; font-weight: 500; font-size: 13.5px; }
.abas button.on { background: var(--card); box-shadow: var(--shadow); }
label.campo { display: block; margin-bottom: 14px; }
label.campo > span { display: block; font-size: 11.5px; font-weight: 550; color: var(--ink-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.entrada { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; outline: none; font-size: 16px; }
.entrada:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(47 91 255 / .15); }
textarea.entrada { min-height: 76px; resize: vertical; }
.opcoes { display: flex; flex-wrap: wrap; gap: 6px; }
.soltar { border: 1.5px dashed color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 16px; padding: 22px 16px; text-align: center; color: var(--ink-2); margin-bottom: 16px; }
.soltar.sobre { border-color: var(--accent); color: var(--accent); }
.previas { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; }
.previas div { aspect-ratio: 3/4; border-radius: 10px; background: var(--chip) center/cover; position: relative; overflow: hidden; }
.previas div span { position: absolute; inset: auto 0 0; font-size: 10.5px; background: rgb(0 0 0/.55); color: #fff; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha { display: flex; gap: 8px; align-items: center; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; }
.acoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; position: sticky; bottom: calc(-24px - var(--safe-b)); background: var(--bg); padding: 10px 0 0; }
.progresso { height: 4px; background: var(--chip); border-radius: 4px; overflow: hidden; margin: 8px 0; }
.progresso i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.aviso { font-size: 13.5px; color: var(--ink-2); margin: 6px 0 10px; }
.aviso.erro { color: var(--danger); }

/* detalhe */
.det { display: grid; gap: 20px; }
@media (min-width: 900px) { .det { grid-template-columns: 1.5fr 1fr; align-items: start; } .det .lado { position: sticky; top: 0; } }
.midias { display: flex; flex-direction: column; gap: 12px; }
.midias figure { background: var(--card); border-radius: 12px; overflow: hidden; }
.midias figcaption { font-size: 12px; color: var(--ink-2); padding: 6px 10px; }
.info dt { font-size: 11px; font-weight: 550; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; margin-top: 14px; }
.info dd { margin-top: 3px; overflow-wrap: anywhere; }
.info a { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.tags span { font-size: 12.5px; background: var(--chip); border-radius: 999px; padding: 3px 9px; }
.ficha { background: var(--card); border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.ficha h4 { font-size: 13px; margin: 10px 0 4px; }
.ficha h4:first-child { margin-top: 0; }
.ficha ul { padding-left: 18px; font-size: 14px; }
.botoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* entrar */
.entrar { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.entrar form { width: 100%; max-width: 360px; }
.entrar .marca { justify-content: center; font-size: 24px; margin-bottom: 22px; }
.entrar .marca img { width: 40px; height: 40px; border-radius: 11px; }
.entrar .btn { width: 100%; height: 44px; margin-top: 4px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 80; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

/* paleta de comandos */
.paleta-fundo { position: fixed; inset: 0; z-index: 70; background: rgb(20 20 22 / .28); display: flex; justify-content: center; align-items: flex-start; padding: 14vh 16px 16px; animation: aparece .12s ease-out; }
@keyframes aparece { from { opacity: 0; } }
.paleta { width: 100%; max-width: 600px; background: var(--card); border-radius: 14px; box-shadow: var(--pop); overflow: hidden; display: flex; flex-direction: column; max-height: 66vh; animation: sobe .16s cubic-bezier(.2,.7,.2,1); }
@keyframes sobe { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.paleta-busca { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; height: 52px; border-bottom: 1px solid var(--line); flex: none; }
.paleta-busca svg { width: 17px; height: 17px; color: var(--ink-3); }
.paleta-busca input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15.5px; }
.paleta-busca input::placeholder { color: var(--ink-3); }
.paleta-x { font-size: 13px; color: var(--ink-2); padding: 6px; }
@media (min-width: 900px) { .paleta-x { display: none; } }
.paleta-lista { overflow-y: auto; padding: 6px; flex: 1; }
.paleta-lista h4 { font-size: 11px; font-weight: 550; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 10px 10px 4px; }
.pi { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 6px 10px; border-radius: 8px; min-height: 40px; }
.pi.sel { background: var(--sel); }
.pi-ic { width: 26px; height: 26px; border-radius: 7px; box-shadow: var(--anel); background: var(--card); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.pi-ic svg { width: 14px; height: 14px; }
.pi-ic .ponto { box-shadow: none; }
.pi-img { width: 30px; height: 38px; border-radius: 5px; background: var(--chip); overflow: hidden; flex: none; box-shadow: var(--anel); }
.pi-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pi-txt { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 8px; }
.pi-txt b { font-weight: 450; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-txt small { color: var(--ink-3); font-size: 12px; display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; flex: none; max-width: 45%; }
.pi.sel .pi-txt b { font-weight: 500; }
.pi-volta { color: var(--ink-3); opacity: 0; display: grid; }
.pi-volta svg { width: 14px; height: 14px; }
.pi.sel .pi-volta { opacity: 1; }
.pi-nada { color: var(--ink-2); padding: 28px; text-align: center; }
.paleta-dica { display: flex; gap: 16px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); flex: none; background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.paleta-dica span { display: flex; align-items: center; gap: 4px; }
.paleta-dica kbd { padding: 2px 4px 1px; font-size: 10.5px; }
@media (max-width: 699px) {
  .paleta-fundo { padding: 0; background: var(--bg); animation: none; }
  .paleta { max-width: none; max-height: none; height: 100%; border-radius: 0; box-shadow: none; background: var(--bg); padding-top: var(--safe-t); animation: none; }
  .pi { min-height: 48px; }
  .pi-txt { flex-direction: column; align-items: stretch; gap: 0; }
  .pi-txt small { margin-left: 0; max-width: none; }
}
.ativos .chip span svg { width: 11px; height: 11px; }
@media (max-width: 899px) { .paleta-busca input, .filtro-nicho { font-size: 16px; } }
