/* ============================================================
   FOURX CUT — estúdio grafite
   Preto grafite em camadas, texto off-white e UM destaque (vermelho por padrão,
   escolhido por cada pessoa em Minha conta › Aparência). Tipografia: Unbounded
   (títulos, eco do "CUT" da logo) + Manrope (texto). Tudo mora nos tokens abaixo.
   ============================================================ */
@font-face { font-family: "CapInterBlack"; src: url("/fonts/Inter-Black.otf"); }
@font-face { font-family: "CapInterXB"; src: url("/fonts/Inter-ExtraBold.otf"); }
@font-face { font-family: "CapInterSB"; src: url("/fonts/Inter-SemiBold.otf"); }
@font-face { font-family: "CapCaladeaBI"; src: url("/fonts/Caladea-BoldItalic.ttf"); }
@font-face { font-family: "CapCaladea"; src: url("/fonts/Caladea-Regular.ttf"); }

:root {
  --bg: #0c0c0e;
  --bg-2: #111114;
  --panel: #141417;
  --panel-2: #1a1a1e;
  --panel-3: #222227;
  --line: rgba(255, 255, 255, .065);
  --line-2: rgba(255, 255, 255, .11);
  --text: #eeebe5;            /* off-white quente */
  --muted: #98958e;
  --faint: #5c5a56;
  --acc: #E5322D;             /* o JS troca pela cor escolhida */
  --acc-ink: #ffffff;
  --acc-soft: rgba(229, 50, 45, .14);
  --acc-glow: rgba(229, 50, 45, .38);
  --warn: #f5b13d;
  --err: #ff5a52;
  --ok: #3fd98a;
  --radius: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --side-w: 256px;
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Manrope", ui-sans-serif, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px -30px rgba(0, 0, 0, .7);
}
/* tons do fundo (Aparência) */
:root[data-base="preto"] { --bg: #050506; --bg-2: #0a0a0b; --panel: #0e0e10; --panel-2: #141416; --panel-3: #1b1b1e; }
:root[data-base="carvao"] { --bg: #110f0e; --bg-2: #161312; --panel: #1a1716; --panel-2: #211d1b; --panel-3: #2a2522;
  --text: #f1ebe3; --muted: #a39a90; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11"; }
/* atmosfera: brilho do destaque no alto + granulado de filme (desliga em Aparência) */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(1100px 620px at 82% -12%, var(--acc-soft), transparent 62%),
              radial-gradient(900px 600px at -8% 108%, rgba(255, 255, 255, .035), transparent 60%); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
:root[data-glow="0"] body::before { display: none; }
:root[data-grain="0"] body::after { display: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--acc); color: var(--acc-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
.display { font-family: var(--display); letter-spacing: -.035em; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .35s var(--ease); }
.app.rail { --side-w: 88px; }
.side { position: sticky; top: 0; height: 100vh; padding: 12px 0 12px 12px; z-index: 20; }
.side-in { height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .008)), var(--panel);
  border: 1px solid var(--line); border-radius: 26px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 14px 10px 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.brand svg.word { height: 22px; width: auto; display: block; }
.brand svg.mark { height: 30px; width: auto; display: none; }
.side-tog { width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted);
  display: grid; place-items: center; cursor: pointer; flex: none; transition: .2s var(--ease); }
.side-tog:hover { color: var(--text); border-color: var(--faint); }
.side-tog svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.nav { padding: 6px 10px 10px; overflow-y: auto; overflow-x: hidden; flex: 1; scrollbar-width: none; }
.nav-group { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 7px; white-space: nowrap; font-weight: 700; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; text-decoration: none; color: var(--muted);
  font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.nav a span { overflow: hidden; text-overflow: ellipsis; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.on { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset; }
.nav a.on svg { color: var(--acc); }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 50%; width: 4px; height: 18px; margin-top: -9px; border-radius: 0 4px 4px 0;
  background: var(--acc); box-shadow: 0 0 14px var(--acc-glow); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { padding: 10px; border-top: 1px solid var(--line); }
.engine-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.engine-card b { color: var(--text); font-weight: 700; display: block; font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 0 rgba(63, 217, 138, .5); animation: pulse 2.4s infinite; }
.dot.run { background: var(--acc); box-shadow: 0 0 0 0 var(--acc-glow); }
.dot.off { background: var(--err); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--acc-glow); } 70% { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }

/* barra recolhida: só ícones */
.app.rail .brand svg.word, .app.rail .nav a span, .app.rail .nav-group, .app.rail .engine-card .ec-txt { display: none; }
.app.rail .brand svg.mark { display: block; }
.app.rail .side-head { flex-direction: column; padding: 18px 10px 8px; gap: 14px; }
.app.rail .side-tog svg { transform: rotate(180deg); }
.app.rail .nav a { justify-content: center; padding: 11px; }
.app.rail .nav-group { height: 12px; padding: 0; }
.app.rail .engine-card { justify-content: center; padding: 12px; }

.main { min-width: 0; }
.top { height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 32px; position: sticky; top: 0; z-index: 10;
  background: linear-gradient(var(--bg) 30%, transparent); }
.top h1 { font-family: var(--display); font-size: 19px; margin: 0; font-weight: 400; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; font-weight: 800; font-size: 12px;
  overflow: hidden; border: 1px solid var(--line-2); cursor: pointer; transition: border-color .2s; }
.avatar:hover { border-color: var(--acc); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Dynamic Island: o estado da fila no meio da barra de cima */
.island { justify-self: center; display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px 0 12px; border-radius: 999px;
  background: #050506; border: 1px solid rgba(255, 255, 255, .08); color: #d9d6d0; font-size: 12.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .9); transition: width .4s var(--ease), padding .3s; white-space: nowrap; text-decoration: none; }
.island .ring { width: 18px; height: 18px; flex: none; }
.island .ring circle { fill: none; stroke-width: 3; }
.island .ring .bgc { stroke: rgba(255, 255, 255, .12); }
.island .ring .fg { stroke: var(--acc); stroke-linecap: round; transition: stroke-dashoffset .5s; transform: rotate(-90deg); transform-origin: 50% 50%; }
.island .sep { width: 1px; height: 14px; background: rgba(255, 255, 255, .14); }
.island .warn { color: var(--warn); }

.page { padding: 4px 32px 48px; max-width: 1360px; animation: rise .55s var(--ease) both; }
.narrow { max-width: 820px; margin: 0 auto; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.h2 { font-family: var(--display); font-size: 30px; font-weight: 400; letter-spacing: -.04em; margin: 0 0 8px; line-height: 1.08; }
.sub { color: var(--muted); margin: 0 0 24px; font-size: 14.5px; }

/* ---------- componentes ---------- */
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .022), rgba(255, 255, 255, .006)), var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.card .hint { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.btn { border: 1px solid var(--line-2); background: var(--panel-2); padding: 10px 16px; border-radius: 13px; cursor: pointer; display: inline-flex;
  align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; text-decoration: none; transition: transform .15s, border-color .2s, background .2s, box-shadow .2s; }
.btn:hover { border-color: var(--faint); background: var(--panel-3); }
.btn:active { transform: scale(.98); }
.btn.pri { background: var(--acc); color: var(--acc-ink); border-color: transparent; box-shadow: 0 10px 30px -10px var(--acc-glow), 0 1px 0 rgba(255, 255, 255, .25) inset; }
.btn.pri:hover { filter: brightness(1.08); background: var(--acc); }
.btn.light { background: var(--text); color: #0c0c0e; border-color: transparent; }
.btn.light:hover { background: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--err); }
.btn.round { border-radius: 999px; padding: 12px 20px; }
.btn.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn.block { width: 100%; justify-content: center; padding: 14px; border-radius: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn svg { width: 16px; height: 16px; }
.pill { border: 1px solid var(--line-2); background: transparent; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 12.5px; transition: .2s; }
.pill:hover { border-color: var(--faint); }
.pill.on { border-color: transparent; color: #0c0c0e; background: var(--text); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.input, select.input, textarea.input { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 13px; padding: 11px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
label.lbl { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 7px; font-weight: 700; letter-spacing: .01em; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; margin: 9px 0; }
.check input { accent-color: var(--acc); width: 16px; height: 16px; }
input[type=range] { accent-color: var(--acc); width: 100%; }
input[type=color] { width: 40px; height: 36px; border: 1px solid var(--line-2); border-radius: 10px; background: none; padding: 2px; cursor: pointer; }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 26px; text-align: center; cursor: pointer; color: var(--muted); transition: .2s; background: var(--bg-2); }
.drop:hover, .drop.over { border-color: var(--acc); color: var(--text); background: var(--acc-soft); }
.drop b { color: var(--text); display: block; margin-bottom: 3px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 11px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
.steps { display: flex; gap: 10px; align-items: center; color: var(--faint); font-size: 13px; margin-bottom: 20px; font-weight: 600; }
.steps .st { display: flex; gap: 8px; align-items: center; }
.steps .n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 11px; }
.steps .st.on { color: var(--text); }
.steps .st.on .n { background: var(--acc); color: var(--acc-ink); border-color: transparent; box-shadow: 0 0 16px var(--acc-glow); }
.steps .bar { width: 28px; height: 1px; background: var(--line-2); }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); font-weight: 700; }
.tag.ok { color: var(--ok); border-color: rgba(63, 217, 138, .3); }
.tag.warn { color: var(--warn); border-color: rgba(245, 177, 61, .3); }
.tag.err { color: var(--err); border-color: rgba(255, 90, 82, .3); }
.tag.run { color: var(--acc); border-color: var(--acc-soft); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.err-box { background: rgba(255, 90, 82, .07); border: 1px solid rgba(255, 90, 82, .3); color: #ffb9b4; padding: 12px 14px; border-radius: 13px; white-space: pre-wrap; font-size: 12.5px; max-height: 220px; overflow: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- HOME ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); min-height: 440px; border-radius: 30px; overflow: hidden;
  border: 1px solid var(--line); background:
    radial-gradient(520px 420px at 76% 46%, var(--acc-soft), transparent 70%),
    radial-gradient(800px 500px at 0% 100%, rgba(255, 255, 255, .03), transparent 70%),
    linear-gradient(140deg, var(--panel-2), var(--panel) 55%, var(--bg-2)); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, .06), transparent 30%) top / 100% 1px no-repeat; }
.hero-txt { padding: 44px 0 128px 44px; display: flex; flex-direction: column; justify-content: center; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: 18px; }
.eyebrow i { width: 26px; height: 1px; background: var(--acc); box-shadow: 0 0 10px var(--acc-glow); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.02; letter-spacing: -.05em; margin: 0 0 18px; }
.hero h1 em { font-style: normal; color: var(--acc); text-shadow: 0 0 42px var(--acc-glow); }
.hero p { color: var(--muted); font-size: 15px; max-width: 430px; margin: 0 0 26px; line-height: 1.6; }
.hero-art { position: relative; min-height: 340px; }
.hero-art canvas, .hero-art .mark-fallback { position: absolute; inset: 2% 0 22% 0; width: 100%; height: 76%; }
.hero-art canvas { inset: 0 0 96px 0; width: 100%; height: calc(100% - 96px); }
.mark-fallback { display: grid; place-items: center; color: var(--panel-3); }
.mark-fallback svg { width: 56%; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6)) drop-shadow(0 0 40px var(--acc-soft)); }
.hero-art::before { content: ""; position: absolute; left: 50%; top: 42%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .05); box-shadow: 0 0 0 60px rgba(255, 255, 255, .012), 0 0 0 140px rgba(255, 255, 255, .008); }
.hero-stats { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 16px 22px; border-radius: 22px; background: rgba(12, 12, 14, .55); border: 1px solid rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; border-left: 1px solid var(--line); text-decoration: none; }
.stat:first-child { border-left: 0; }
.stat b { font-family: var(--display); font-weight: 300; font-size: 34px; letter-spacing: -.05em; line-height: 1.05; }
.stat span { font-size: 11.5px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.stat span i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.stat.hot span i { background: var(--acc); box-shadow: 0 0 8px var(--acc-glow); }
.stat.warn span i { background: var(--warn); }
.stat.ok span i { background: var(--ok); }

.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 40px 0 16px; }
.sec-h h2 { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: -.04em; margin: 0; }
.sec-h p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ferramentas em destaque: imagem grande + cantinho recortado com a seta */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feat { position: relative; display: block; min-height: 400px; border-radius: 26px; overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); isolation: isolate;
  -webkit-mask: radial-gradient(circle at calc(100% - 30px) 30px, transparent 29px, #000 30px);
          mask: radial-gradient(circle at calc(100% - 30px) 30px, transparent 29px, #000 30px);
  transition: transform .45s var(--ease); animation: rise .6s var(--ease) both; }
.feat:nth-child(2) { animation-delay: .06s; } .feat:nth-child(3) { animation-delay: .12s; }
.feat:hover { transform: translateY(-4px); }
.feat .art { position: absolute; inset: 0; z-index: -1; background: center / cover no-repeat; transition: transform .8s var(--ease); }
.feat:hover .art { transform: scale(1.04); }
.feat .art.gen { background:
    radial-gradient(60% 50% at 70% 30%, var(--acc-soft), transparent 70%),
    radial-gradient(70% 60% at 20% 90%, rgba(255, 255, 255, .05), transparent 70%),
    linear-gradient(160deg, var(--panel-3), var(--panel) 60%); display: grid; place-items: center; }
.feat .art.gen svg { width: 42%; color: var(--text); opacity: .16; stroke-width: 1.1; transform: translateY(-14%); }
.feat::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 38%, rgba(8, 8, 10, .92)); }
.feat .meta { position: absolute; left: 22px; right: 22px; bottom: 20px; }
.feat .meta small { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .7); font-weight: 800; }
.feat .meta small svg { width: 14px; height: 14px; }
.feat .meta b { display: block; font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: -.045em; margin: 8px 0 6px; }
.feat .meta span { display: block; color: rgba(238, 235, 229, .68); font-size: 13px; line-height: 1.45; max-width: 290px; }
.arrow { position: absolute; top: 4px; right: 4px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; z-index: 3;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); transition: background .25s, color .25s, transform .35s var(--ease); }
.arrow svg { width: 18px; height: 18px; }
.feat-wrap { position: relative; }
.feat-wrap:hover .arrow { background: var(--acc); color: var(--acc-ink); transform: rotate(45deg); border-color: transparent; }
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.mini { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 22px; text-decoration: none; background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent), var(--panel);
  border: 1px solid var(--line); transition: border-color .25s, transform .35s var(--ease); min-height: 150px; }
.mini:hover { border-color: var(--line-2); transform: translateY(-3px); }
.mini .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--panel-3); color: var(--text); transition: .25s; }
.mini:hover .ic { background: var(--acc); color: var(--acc-ink); box-shadow: 0 10px 24px -8px var(--acc-glow); }
.mini .ic svg { width: 21px; height: 21px; }
.mini b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.mini span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.mini .go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: 12px; font-weight: 700; }
.mini:hover .go { color: var(--text); }

/* ---------- ferramentas (formulário) ---------- */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tool { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; text-decoration: none; display: flex; flex-direction: column; gap: 10px; min-height: 150px; transition: .2s; }
.tool:hover { border-color: var(--acc); transform: translateY(-2px); }
.tool .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; }
.tool .ic svg { width: 22px; height: 22px; }
.tool b { font-size: 14.5px; }
.tool span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.models { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.model { border: 1px solid var(--line-2); border-radius: 16px; padding: 14px; cursor: pointer; transition: .2s; background: var(--bg-2); }
.model:hover { border-color: var(--faint); }
.model.on { border-color: var(--acc); background: var(--acc-soft); }
.model b { display: block; margin-bottom: 3px; }
.model span { color: var(--muted); font-size: 12.5px; }
.hl-styles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.hl-style { border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; cursor: pointer; text-align: center; font-size: 11px; color: var(--muted); }
.hl-style.on { border-color: var(--acc); color: var(--text); }
.hl-style canvas { width: 100%; border-radius: 7px; display: block; margin-bottom: 5px; background: #000; }

/* ---------- vídeos ---------- */
.vlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
.vcard { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: border-color .25s, transform .35s var(--ease); animation: rise .5s var(--ease) both; }
.vcard:hover { border-color: var(--line-2); transform: translateY(-3px); }
.vthumb { aspect-ratio: 16/10; background: #000 center/cover no-repeat; position: relative; }
.vthumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .5)); }
.vthumb .tag { position: absolute; top: 10px; left: 10px; z-index: 1; background: rgba(5, 5, 6, .78); border-color: rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px); display: inline-flex; align-items: center; gap: 6px; }
.vthumb .tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.vbody { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 6px; }
.vname { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog { height: 4px; background: var(--panel-3); border-radius: 4px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--acc); transition: width .4s; box-shadow: 0 0 12px var(--acc-glow); }
.empty { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 44px; text-align: center; color: var(--muted); background: var(--bg-2); }

/* ---------- revisão ---------- */
.review { display: grid; grid-template-columns: minmax(240px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.review > * { min-width: 0; }
.review .tabs { overflow-x: auto; scrollbar-width: none; }
.stage { position: sticky; top: 92px; }
.phone { position: relative; background: #000; border-radius: 26px; overflow: hidden; border: 1px solid var(--line-2); margin: 0 auto; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); }
.phone video.base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone .cap { position: absolute; left: 6%; right: 6%; text-align: center; pointer-events: none; line-height: 1.12; }
.phone .cap span { display: inline-block; margin: 0 .14em; transition: transform .08s; }
.phone .scene { position: absolute; inset: 0; background: #fff; color: #111; display: none; align-items: center; justify-content: center; padding: 10%; text-align: center; font-family: "CapInterBlack"; font-size: 7cqw; }
.phone .broll { position: absolute; left: 0; right: 0; top: 0; height: 50%; display: none; background: #000 center/cover no-repeat; }
.phone .ttl { position: absolute; left: 50%; top: 13%; transform: translateX(-50%); background: #fff; color: #111; font-family: "CapCaladea"; padding: .3em .6em; border-radius: .35em; max-width: 78%; text-align: center; font-size: 5.6cqw; display: none; }
.phone .hd { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-family: "CapInterBlack"; text-transform: uppercase; font-size: 4.8cqw; }
.player-ctl { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.player-ctl input { flex: 1; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 15px; margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 14px; color: var(--muted); cursor: pointer; border-radius: 11px; font-weight: 700; white-space: nowrap; transition: .2s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: #0c0c0e; background: var(--text); }
.words { line-height: 2.05; user-select: none; max-height: 52vh; overflow: auto; padding: 4px; }
.w { display: inline-block; padding: 0 3px; border-radius: 5px; cursor: pointer; margin: 0 1px; }
.w:hover { background: var(--panel-3); }
.w.cut { text-decoration: line-through; color: var(--faint); background: rgba(255, 90, 82, .07); }
.w.hl { color: var(--acc); font-weight: 800; }
.w.doubt { border-bottom: 2px dotted var(--warn); }
.w.now { background: var(--acc); color: var(--acc-ink); }
.w.filler::after, .w.retake::after, .w.off::after { font-size: 9px; vertical-align: super; margin-left: 1px; color: var(--err); }
.w.filler::after { content: "hm"; }
.w.retake::after { content: "rep"; }
.w.off::after { content: "fora"; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.bar-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 35%); padding: 20px 0 8px; display: flex; gap: 10px; justify-content: flex-end; z-index: 5; }
.list-item { display: flex; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 15px; margin-bottom: 8px; background: var(--bg-2); }
.list-item .thumb { width: 54px; height: 54px; border-radius: 11px; background: #000 center/cover; flex: none; }
.clip { border: 1px solid var(--line); border-radius: 16px; padding: 13px; margin-bottom: 10px; background: var(--bg-2); }
.clip.on { border-color: var(--acc); }
.score { font-family: var(--display); font-weight: 400; color: var(--acc); font-size: 20px; }

/* ---------- toast / login ---------- */
.toasts { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 80; align-items: center; }
.toast { background: #050506; border: 1px solid rgba(255, 255, 255, .1); padding: 11px 18px; border-radius: 999px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9);
  max-width: 440px; font-weight: 600; font-size: 13px; animation: drop .45s var(--ease) both; }
.toast.err { border-color: rgba(255, 90, 82, .5); color: #ffc3be; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); }
.auth-art { position: relative; overflow: hidden; margin: 12px 0 12px 12px; border-radius: 30px; border: 1px solid var(--line);
  background: radial-gradient(600px 500px at 55% 45%, var(--acc-soft), transparent 70%), linear-gradient(150deg, var(--panel-2), var(--bg)); }
.auth-art canvas, .auth-art .mark-fallback { position: absolute; inset: 6% 6% 18%; width: 88%; height: 76%; }
.auth-art .brand { position: absolute; left: 34px; top: 30px; }
.auth-art .brand svg.word { height: 24px; }
.auth-art .claim { position: absolute; left: 34px; bottom: 34px; right: 34px; }
.auth-art .claim h2 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.2vw, 44px); letter-spacing: -.05em; line-height: 1.04; margin: 0 0 10px; }
.auth-art .claim h2 em { font-style: normal; color: var(--acc); }
.auth-art .claim p { color: var(--muted); margin: 0; }
.auth-form { display: grid; place-items: center; padding: 28px; }
.auth-form .card { width: 100%; max-width: 400px; padding: 32px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 400px; padding: 30px; }
details.eng summary { cursor: pointer; }

/* ---------- Aparência ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; position: relative; transition: transform .2s; }
.swatch:hover { transform: scale(1.08); }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 3px var(--bg), 0 0 18px currentColor; }
.tones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tone { border-radius: 16px; border: 1px solid var(--line-2); padding: 12px; cursor: pointer; text-align: left; transition: .2s; }
.tone.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.tone i { display: flex; gap: 4px; margin-bottom: 10px; }
.tone i em { height: 26px; flex: 1; border-radius: 8px; }
.tone b { font-size: 13px; }
.tool-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tool-img { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-2); }
.tool-img .pv { aspect-ratio: 4/5; background: var(--panel-3) center/cover no-repeat; display: grid; place-items: center; color: var(--faint); }
.tool-img .pv svg { width: 36%; opacity: .5; }
.tool-img .bt { padding: 10px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- celular / tablet ---------- */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.menu-btn { display: none !important; }
@media (max-width: 1180px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento .feat-wrap:first-child { grid-column: span 2; }
  .minis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .app, .app.rail { grid-template-columns: 1fr; --side-w: 0px; }
  .side { position: fixed; inset: 0 auto 0 0; width: 86vw; max-width: 310px; z-index: 40; padding: 10px;
    transform: translateX(-108%); transition: transform .3s var(--ease); padding-top: calc(10px + env(safe-area-inset-top)); height: 100dvh; }
  .side.open { transform: none; }
  .side.open::after { content: ""; position: fixed; inset: 0 -100vw 0 100%; background: rgba(0, 0, 0, .5); }
  .app.rail .brand svg.word, .app.rail .nav a span, .app.rail .nav-group { display: initial; }
  .side-tog { display: none; }
  .top { padding: 0 14px; padding-top: env(safe-area-inset-top); height: calc(64px + env(safe-area-inset-top)); grid-template-columns: auto 1fr auto; gap: 10px; }
  .top h1 { font-size: 16px; }
  .island { justify-self: end; padding: 0 12px 0 10px; height: 34px; }
  .island .txt-long { display: none; }
  .menu-btn { display: inline-flex !important; }
  .page { padding: 4px 14px calc(28px + env(safe-area-inset-bottom)); }
  .h2 { font-size: 24px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-txt { padding: 28px 22px 8px; }
  .hero-art { min-height: 250px; order: -1; }
  .hero-art canvas, .hero-art .mark-fallback { inset: 0; width: 100%; height: 100%; }
  .hero-stats { position: relative; left: auto; right: auto; bottom: auto; margin: 6px 12px 12px; grid-template-columns: 1fr 1fr; gap: 12px 4px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat b { font-size: 28px; }
  .bento, .minis { grid-template-columns: 1fr; }
  .bento .feat-wrap:first-child { grid-column: auto; }
  .feat { min-height: 300px; }
  .tools { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool { min-height: 0; padding: 14px; }
  .tool span { display: none; }
  .vlist { grid-template-columns: 1fr 1fr; gap: 10px; }
  .review { grid-template-columns: 1fr; }
  .stage { position: static; }
  .phone { max-width: 260px !important; }
  .grid2, .grid3, .models, .tones { grid-template-columns: 1fr; }
  .hl-styles { grid-template-columns: repeat(3, 1fr); }
  .bar-actions { flex-wrap: wrap; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .bar-actions .btn { flex: 1; justify-content: center; }
  .bar-actions .grow { flex-basis: 100%; }
  .row .btn { white-space: normal; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 300px; margin: 10px; }
  .auth-art .claim h2 { font-size: 26px; }
  .login { padding-top: calc(20px + env(safe-area-inset-top)); }
  .toasts { top: calc(10px + env(safe-area-inset-top)); width: calc(100% - 28px); }
  .toast { max-width: none; }
  input, select, textarea { font-size: 16px !important; } /* evita o zoom automático do iPhone */
}
@media (max-width: 420px) { .vlist { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
:root[data-motion="0"] *, :root[data-motion="0"] *::before, :root[data-motion="0"] *::after { animation: none !important; transition: none !important; }

/* ---------- legenda ao vivo (libass no navegador) + editor de estilos ---------- */
.phone canvas.subs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
.phone .drag-pos { position: absolute; inset: 0; z-index: 7; display: none; cursor: crosshair; touch-action: none; }
.phone .drag-pos.on { display: block; }
.phone .drag-pos i { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  border: 2px solid var(--acc); box-shadow: 0 0 0 4px rgba(0, 0, 0, .35); pointer-events: none; }
.phone .drag-pos i::before, .phone .drag-pos i::after { content: ""; position: absolute; background: var(--acc); }
.phone .drag-pos i::before { left: 50%; top: -9px; bottom: -9px; width: 1px; }
.phone .drag-pos i::after { top: 50%; left: -9px; right: -9px; height: 1px; }
.sty-group + .sty-group { margin-top: 14px; }
.sty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.sty { position: relative; padding: 0; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #000; color: var(--text);
  cursor: pointer; display: flex; flex-direction: column; transition: border-color .2s; }
.sty video { width: 100%; aspect-ratio: 420 / 340; object-fit: cover; display: block; background: #39404d; }
.sty span { font-size: 11.5px; padding: 7px 8px 8px; background: var(--panel-2); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.sty:hover { border-color: var(--faint); }
.sty.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 10px 30px -14px var(--acc-glow); }
.sty.on span { color: var(--acc); }
details.acc { border-top: 1px solid var(--line); padding: 12px 0 4px; margin-top: 12px; }
details.acc summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 8px; }
details.acc summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
details.acc[open] summary::before { transform: rotate(90deg); }
details.acc input[type=range] { width: 100%; accent-color: var(--acc); }
.row.wrap { flex-wrap: wrap; gap: 14px; margin: 8px 0; }
label.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
label.sw input[type=color] { width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0; background: none; }
.font-btn { text-align: left; font-size: 18px; cursor: pointer; }
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px; width: min(560px, 100%); max-height: 86vh; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.font-list { overflow: auto; flex: 1; min-height: 200px; display: flex; flex-direction: column; gap: 4px; }
.font-item { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--bg-2); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.font-item span { font-size: 22px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.font-item small { color: var(--muted); }
.font-item i { font-style: normal; color: var(--muted); padding: 0 4px; }
.font-item i:hover { color: var(--err); }
.font-item:hover { border-color: var(--line-2); }
.font-item.on { border-color: var(--acc); }
