@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/outfit-latin-wght-normal.woff2") format("woff2-variations"); }
:root {
  --bg: #05070f; --card: #0d1220; --card2: #111830; --line: rgba(120, 160, 255, .12); --line2: rgba(96, 165, 250, .5);
  --text: #eef3ff; --muted: #8e9bbd; --blue: #3b82f6; --sky: #60a5fa; --ice: #bae6fd;
  --grad: linear-gradient(135deg, #7dd3fc 0%, #3b82f6 48%, #4f46e5 100%);
  --glow: 0 0 30px rgba(59, 130, 246, .4);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: "Outfit", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text); -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overflow-x: hidden; }
input, textarea, select { -webkit-user-select: text; user-select: text; }
a { color: var(--ice); } h1, h2, h3 { margin: 0; letter-spacing: -.02em; } p { line-height: 1.6; margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .error { color: #fca5a5; } .warn { color: #fde68a; }
.ico { width: 1em; height: 1em; flex: none; }
.wrap { width: 100%; max-width: 1260px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }

/* Céu (bem sutil) */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse at 50% -20%, #0b1838 0%, transparent 60%), var(--bg); }
.sky .glow { position: absolute; inset: -20%; filter: blur(40px); opacity: .7;
  background: radial-gradient(30% 25% at 85% 10%, rgba(59, 130, 246, .14), transparent 70%), radial-gradient(28% 25% at 8% 85%, rgba(79, 70, 229, .12), transparent 70%); }
.st { position: absolute; inset: 0; }
.st.a { background-image: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 130px 90px, #bae6fd, transparent),
  radial-gradient(1px 1px at 210px 170px, #fff, transparent), radial-gradient(1px 1px at 300px 50px, #93c5fd, transparent);
  background-size: 370px 270px; opacity: .35; animation: tw 7s ease-in-out infinite; }
.st.b { background-image: radial-gradient(1.5px 1.5px at 70px 130px, #fff, transparent), radial-gradient(1.5px 1.5px at 420px 310px, #dbeafe, transparent);
  background-size: 540px 390px; opacity: .3; animation: tw 11s ease-in-out infinite reverse; }
@keyframes tw { 0%, 100% { opacity: .15 } 50% { opacity: .45 } }
@media (prefers-reduced-motion: reduce) { .st { animation: none; } }

/* Topo */
.top { position: sticky; top: 0; z-index: 30; background: rgba(5, 7, 15, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(96, 165, 250, .5)); }
.wordmark { font-size: 21px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.wordmark b, .title b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav > a { color: var(--muted); text-decoration: none; font-size: 15px; } .nav > a:hover { color: var(--text); }
.nav form { margin: 0; }
.who { display: flex; align-items: center; gap: 9px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.who.sup { border-color: rgba(96, 165, 250, .45); box-shadow: 0 0 18px rgba(59, 130, 246, .2); }
.who.sup .uname { color: #e0f2fe; font-weight: 600; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--grad); }
.uname { font-size: 14px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join { color: #fff !important; background: var(--grad); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px !important; box-shadow: var(--glow); }
.link { background: none; border: 0; color: var(--muted); font: 15px "Outfit", sans-serif; cursor: pointer; padding: 0; } .link:hover { color: var(--text); }

main.wrap { position: relative; flex: 1; padding-top: 40px; padding-bottom: 64px; }
.foot { position: relative; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 30px; }
.foot-in span:last-child { color: #7aa7ff; }

/* Títulos */
.head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.head h1 { font-size: 34px; font-weight: 800; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--text); } .crumbs span { color: var(--text); } .crumbs i { font-style: normal; opacity: .5; }
.big { font-size: clamp(30px, 4.6vw, 50px); font-weight: 800; line-height: 1.05; }
.kicker { color: var(--sky); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.sub { margin: 8px 0 26px; font-size: 16px; } .desc { max-width: 760px; margin: -12px 0 26px; color: #c8d3ee; }

/* Grades e cartões */
.grid { display: grid; gap: 22px; }
.grid.sets { grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); }
.grid.sections { grid-template-columns: repeat(auto-fill, minmax(min(250px, 44vw), 1fr)); }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(min(180px, 30vw), 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  color: var(--text); text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--line2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5), var(--glow); }
.card .thumb { position: relative; aspect-ratio: 3 / 4; background: linear-gradient(160deg, #111a33, #070b16); overflow: hidden; }
.card .thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.card h3 { font-size: 18px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .muted { font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #b9c5e3; }
.tag.pub { background: rgba(34, 197, 94, .12); color: #bbf7d0; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; opacity: .35; } .ph .logo-mark { width: 64px; height: 64px; }
.locked { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #c7d2fe;
  background: radial-gradient(circle at 50% 40%, rgba(59, 130, 246, .12), transparent 60%), linear-gradient(160deg, #10172b, #080c18); }
.locked .ico { width: 34px; height: 34px; } .locked b { font-size: 13px; letter-spacing: .16em; }
.draft { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(5, 7, 15, .85); color: #fde68a; }
canvas.pimg { opacity: 0; transition: opacity .4s; } canvas.pimg.loaded { opacity: 1; }

/* Abas */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .06);
  color: #d5def5; text-decoration: none; font-weight: 600; font-size: 15px; transition: background .2s; }
.tab:hover { background: rgba(255, 255, 255, .1); } .tab.on { background: #fff; color: #05070f; }

/* Miniaturas */
.tile { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; background: #0b1120; cursor: zoom-in;
  outline: 1px solid var(--line); transition: outline-color .2s, transform .2s, box-shadow .2s; }
.tile:hover { outline-color: var(--line2); transform: translateY(-2px); box-shadow: var(--glow); }
.tile canvas, .atile canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.vbadge { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  background: rgba(5, 7, 15, .8); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(4px); }

/* Seção trancada */
.gate { max-width: 560px; margin: 30px auto; text-align: center; display: grid; justify-items: center; gap: 12px; }
.gate-ico { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: rgba(59, 130, 246, .12); color: var(--sky); font-size: 30px; box-shadow: var(--glow); }

/* Visualizador */
#viewer { position: fixed; inset: 0; z-index: 60; background: rgba(3, 4, 9, .97); display: flex; align-items: center; justify-content: center; }
#viewer[hidden] { display: none; }
.vstage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 64px 76px 24px; }
.vstage canvas, .vstage video { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 8px; background: #000; }
.vstage video { width: min(100%, 1400px); }
.vbar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; color: var(--muted); z-index: 2; }
#viewer button { background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: #fff; border-radius: 50%; cursor: pointer; }
.vx { width: 44px; height: 44px; font-size: 18px; }
.vp, .vn { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 30px; z-index: 2; } .vp { left: 14px; } .vn { right: 14px; }
body.noscroll { overflow: hidden; }

/* Botões e formulários */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none; color: #fff;
  font: 600 16px "Outfit", sans-serif; padding: 13px 26px; border-radius: 999px; background: var(--grad);
  box-shadow: 0 8px 28px rgba(37, 99, 235, .4), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgba(59, 130, 246, .6), inset 0 1px 0 rgba(255, 255, 255, .35); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .06); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font: 500 13.5px "Outfit", sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--line2); } .chip.danger:hover { border-color: #f87171; color: #fecaca; }
.glass { background: rgba(13, 18, 32, .78); border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 3vw, 28px); backdrop-filter: blur(14px); }
.glass h2 { font-size: 20px; margin-bottom: 14px; }
.center main { display: grid; place-items: center; }
.solo { max-width: 480px; width: 100%; text-align: center; display: grid; justify-items: center; gap: 14px; padding: 36px 30px; }
.solo h1 { font-size: 28px; } .title { font-size: 42px !important; font-weight: 700; }
.big-logo { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(186, 230, 253, .18), rgba(59, 130, 246, .1) 60%, transparent 70%); animation: float 6s ease-in-out infinite; }
.big-logo .logo-mark { width: 68px; height: 68px; } @keyframes float { 50% { transform: translateY(-6px) } }
.pill18 { font-weight: 800; font-size: 20px; padding: 5px 14px; border-radius: 10px; background: var(--grad); box-shadow: var(--glow); }
.empty { max-width: 460px; margin: 40px auto; text-align: center; display: grid; justify-items: center; gap: 12px; }

/* Painel */
.admin { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.admin > :only-child { grid-column: 1 / -1; }
.h2 { font-size: 20px; margin: 4px 0 14px; } .big + .admin, .okmsg + .admin { margin-top: 26px; } .okmsg { color: #bbf7d0; margin: -6px 0 18px; }
.form { display: grid; gap: 14px; } .form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input:not([type=checkbox]):not([type=file]), textarea, select { width: 100%; font: 15px "Outfit", sans-serif; color: var(--text); background: rgba(3, 6, 15, .8);
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.check { display: flex !important; align-items: center; gap: 10px; color: var(--text) !important; font-size: 15px !important; } .check input { width: 18px; height: 18px; accent-color: var(--blue); }
.form .btn { justify-self: start; }
.arow { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; color: var(--text); text-decoration: none; }
.arow:hover { border-color: var(--line2); } .arow > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.athumb { width: 48px; height: 64px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: #0b1120; } .athumb canvas { width: 100%; height: 100%; object-fit: cover; }
.athumb .logo-mark { width: 26px; opacity: .5; }
.secs { display: grid; gap: 14px; margin-bottom: 14px; }
.sec { display: grid; gap: 10px; padding: 18px; }
.sec-head { display: grid; grid-template-columns: 1fr minmax(0, 220px) auto; gap: 8px; align-items: center; margin: 0; }
.sec-head.inline { margin-bottom: 16px; padding: 14px; }
.sec-acts, .links { display: flex; gap: 8px; flex-wrap: wrap; } .sec-acts form, .links form { margin: 0; }
.links { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.add-sec { display: grid; grid-template-columns: 1fr minmax(0, 220px) auto; gap: 8px; padding: 14px; }
.sticky { position: sticky; top: 88px; display: grid; gap: 14px; }
.drop { position: relative; border: 2px dashed rgba(96, 165, 250, .35); border-radius: 14px; padding: 20px 16px; text-align: center; transition: background .2s, border-color .2s; margin: 0 0 4px; }
.drop.over { background: rgba(59, 130, 246, .1); border-color: var(--sky); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; } .drop label { cursor: pointer; font-size: 14px; color: var(--muted); } .drop label b { color: var(--text); }
.drop .bar { height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 12px 0 6px; }
.drop .bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
main > .drop { margin-bottom: 20px; }
.atile { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #0b1120; outline: 1px solid var(--line); }
.atile .st { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 10px; font-size: 26px; }
.atile .st b { font-size: 13px; color: #fde68a; } .atile.error .st b { color: #fca5a5; } .atile .st small { font-size: 11px; color: var(--muted); }
.atile .cov { position: absolute; top: 8px; left: 8px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--grad); }
.tacts { position: absolute; top: 6px; right: 6px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; } .atile:hover .tacts, .atile.error .tacts { opacity: 1; }
.tacts form { margin: 0; } .tacts button { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(5, 7, 15, .85); color: #fff; font-size: 15px; }
.tacts button:hover { background: var(--blue); } .tacts .del:hover { background: #dc2626; }

@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } .sticky { position: static; } }
@media (max-width: 640px) {
  .uname, .nav > a[href="/sets"] { display: none; } .nav { gap: 10px; } .wordmark { font-size: 18px; } .join { padding: 7px 11px; font-size: 13px !important; }
  .grid { gap: 14px; } .card h3 { font-size: 16px; } .tab { padding: 8px 14px; font-size: 14px; }
  .sec-head, .add-sec { grid-template-columns: 1fr; } .vstage { padding: 60px 8px 70px; } .vp, .vn { top: auto; bottom: 12px; transform: none; }
  .foot-in { flex-direction: column; } .tacts { opacity: 1; }
}
@media print { body * { display: none !important; } }
