/* Darpana — "A sua família no céu" (/app/familia/). Prefixo .fm- */
.fm-hero { text-align: center; padding: 6px 0 16px; position: relative; }
.fm-ceu-fundo { position: absolute; inset: -12px 0 0; width: 100%; height: calc(100% + 12px); pointer-events: none; opacity: .9; }
.fm-hero::before { content: ""; position: absolute; inset: -10px 8% auto; height: 130px; background: radial-gradient(closest-side, rgba(216,181,106,.17), transparent); pointer-events: none; }
.fm-hero > *:not(canvas) { position: relative; }
.fm-titulo { font-family: var(--display); font-size: clamp(30px, 8vw, 40px); line-height: 1.08; margin: 6px 0 10px; }
.fm-quem { color: var(--gold); }
.fm-lede { margin-inline: auto; }
.fm-h2 { font-family: var(--display); font-size: 28px; margin: 4px 0 6px; }
.fm-h3 { font-family: var(--display); font-size: 24px; margin: 4px 0 8px; }

.fm-form { display: grid; gap: 12px; }
.fm-linha { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.fm-campo { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.fm-campo[hidden] { display: none; }
.fm-campo i { font-style: normal; opacity: .75; }
.fm-campo input, .fm-campo select { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: 500 16px var(--body); color-scheme: dark; }
.fm-campo input:focus, .fm-campo select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216,181,106,.18); }
.fm-msg { color: var(--hot); min-height: 1em; margin: 0; }
.fm-btn-full { width: 100%; }
.fm-priv { margin: 0; text-align: center; }

.fm-previa, .fm-resultado, .fm-meus { margin-bottom: 18px; scroll-margin-top: 16px; }
.fm-resultado > * + * { margin-top: 16px; }
.fm-pre-lista { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fm-pre-lista li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; animation: fm-sobe .45s ease both; animation-delay: calc(var(--i) * 70ms); }
.fm-pre-lista span { color: var(--gold); }

/* novo link */
.fm-novo-link { border: 1px solid var(--gold); background: linear-gradient(160deg, rgba(216,181,106,.16), var(--surface)); text-align: center; animation: fm-pulso 2.4s ease-in-out 3; }

/* constelação */
.fm-res { position: relative; overflow: hidden; text-align: center; background: radial-gradient(120% 80% at 50% 30%, #1d1748, var(--surface) 70%); }
.fm-confete { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.fm-nome-grupo { color: var(--gold); }
.fm-const { width: 100%; max-width: 420px; height: auto; display: block; margin: 6px auto 4px; overflow: visible; }
.fm-anel { fill: none; stroke: rgba(216,181,106,.18); stroke-width: 1; stroke-dasharray: 2 5; }
.fm-anel-sig { fill: rgba(216,181,106,.38); font-size: 11px; text-anchor: middle; }
.fm-linha { stroke: var(--gold); stroke-width: .8; stroke-opacity: .55; stroke-dasharray: 1; stroke-dashoffset: 1; }
.fm-on .fm-linha { animation: fm-traco 1s ease forwards; animation-delay: var(--d); }
.fm-estrela { opacity: 0; transform-box: fill-box; transform-origin: center; }
.fm-on .fm-estrela { animation: fm-acende .7s cubic-bezier(.2,.9,.3,1.3) forwards; animation-delay: var(--d); }
.fm-nucleo { fill: #fff8e2; }
.fm-halo { animation: fm-cintila 3.2s ease-in-out infinite; animation-delay: var(--d); transform-origin: var(--x) var(--y); }
.fm-est-sig { fill: var(--gold); font-size: 13px; text-anchor: middle; }
.fm-est-nome { fill: var(--fg); font: 600 10.5px var(--body); text-anchor: middle; paint-order: stroke; stroke: #120e2b; stroke-width: 3px; }
.fm-eu .fm-nucleo { fill: var(--gold); }
.fm-eu .fm-est-nome { fill: var(--gold); }
.fm-legenda { margin: 4px 0 0; }
.fm-parcial { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--gold); color: var(--gold); font-size: 14px; }

/* chamar */
.fm-chamar { text-align: center; border: 1px solid rgba(216,181,106,.45); }
.fm-chamar .eyebrow { color: var(--gold); }
.fm-link input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line); background: transparent; color: var(--muted); font: 13px var(--body); text-overflow: ellipsis; margin: 8px 0 10px; }
.fm-acoes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fm-acoes .fm-wa { flex: 1 1 100%; }
.fm-acoes-fim { margin-top: 16px; }

/* elementos */
.fm-movido { font-size: 16px; }
.fm-barras { display: grid; gap: 12px; margin: 14px 0; }
.fm-barra-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
.fm-trilho { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.fm-trilho i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.fm-el-0 i { background: linear-gradient(90deg, #e9874f, #f3c06a); }
.fm-el-1 i { background: linear-gradient(90deg, #6f9a5e, #c9c07a); }
.fm-el-2 i { background: linear-gradient(90deg, #8fb6e8, #d9e7f7); }
.fm-el-3 i { background: linear-gradient(90deg, #5b6fd6, #9b84f2); }
.fm-dom p { margin: 6px 0; }

/* papéis */
.fm-papeis { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.fm-papeis li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); opacity: 0; }
.fm-on .fm-papeis li { animation: fm-sobe .5s ease forwards; animation-delay: calc(.3s + var(--i) * 90ms); }
.fm-papeis li.fm-eu-li { border-color: var(--gold); }
.fm-papel-ic { font-size: 22px; width: 34px; text-align: center; }
.fm-papel-txt { display: grid; gap: 2px; }
.fm-papel-txt small { color: var(--muted); font-size: 13px; }
.fm-vaga { margin: 12px 0 0; color: var(--gold); font-size: 14px; }

/* matriz */
.fm-destaques { display: grid; gap: 10px; margin: 8px 0 14px; }
.fm-dest { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); }
.fm-dest small { color: var(--muted); }
.fm-dest span { font-size: 13px; color: var(--muted); }
.fm-dest-ok { border-color: var(--gold); background: rgba(216,181,106,.08); }
.fm-dest-des { border-color: rgba(155,132,242,.5); background: rgba(155,132,242,.08); }
.fm-matriz-rolo { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px 8px; padding-bottom: 4px; }
.fm-matriz { border-collapse: separate; border-spacing: 3px; font-size: 12px; margin: 0 auto; }
.fm-matriz th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.fm-matriz thead th { font-size: 10.5px; padding: 0 2px; vertical-align: bottom; }
.fm-matriz thead th span { display: block; color: var(--gold); font-size: 13px; }
.fm-matriz tbody th { text-align: right; padding-right: 6px; font-size: 12px; }
.fm-matriz td { width: 30px; height: 28px; min-width: 28px; text-align: center; border-radius: 7px; font-weight: 700; }
.fm-cel { color: #120e2b; background: color-mix(in srgb, #d8b56a calc((var(--v) - 40) * 1.8%), #3a3270); opacity: 0; }
.fm-on .fm-cel { animation: fm-revela .4s ease forwards; animation-delay: calc(.4s + var(--k)); }
.fm-cel-baixa { color: var(--fg); }
.fm-cel-eu { color: var(--muted); }

/* trava, e-mail, lista */
.fm-trava { display: block; text-decoration: none; color: inherit; }
.fm-trava h3 { font-family: var(--display); font-size: 23px; margin: 4px 0 6px; }
.fm-lista { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.fm-lista a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--fg); transition: border-color .2s, transform .2s; }
.fm-lista a:hover { border-color: var(--gold); transform: translateY(-1px); }
.fm-lista small { color: var(--muted); grid-column: 1; }
.fm-lista span { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--gold); }
.fm-lista li { animation: fm-sobe .4s ease both; animation-delay: calc(var(--i) * 60ms); }

@keyframes fm-sobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fm-acende { 0% { opacity: 0; transform: scale(.2); } 60% { opacity: 1; transform: scale(1.25); } 100% { opacity: 1; transform: scale(1); } }
@keyframes fm-traco { to { stroke-dashoffset: 0; } }
@keyframes fm-cintila { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes fm-revela { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes fm-pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(216,181,106,0); } 50% { box-shadow: 0 0 24px 2px rgba(216,181,106,.35); } }

@media (prefers-reduced-motion: reduce) {
  .fm-app *, .fm-app *::before { animation: none !important; transition: none !important; }
  .fm-estrela, .fm-papeis li, .fm-cel { opacity: 1 !important; }
  .fm-linha { stroke-dashoffset: 0 !important; }
}
.fm-calmo .fm-estrela { opacity: 1; }
.fm-calmo .fm-linha { stroke-dashoffset: 0; }

/* Limite do grupo grátis (6 pessoas) */
.fm-trava-limite { text-align: center; margin-top: 16px; position: relative; overflow: hidden; }
.fm-trava-limite::before { content: ""; position: absolute; inset: -50% -20% auto; height: 80%; background: radial-gradient(closest-side, rgba(216,181,106,.16), transparent); pointer-events: none; }
.fm-trava-limite h3 { font-family: var(--display); font-size: 23px; margin: 4px 0 8px; }
.fm-trava-limite p { text-align: left; }
.fm-cadeado { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 8px; border-radius: 50%; font-size: 21px; background: radial-gradient(circle at 35% 30%, #fbe9b6, #d8b56a 55%, #8f6c2c); box-shadow: 0 0 0 4px rgba(216,181,106,.14), 0 0 26px rgba(216,181,106,.45); animation: fm-cad 3.2s ease-in-out infinite; }
@keyframes fm-cad { 50% { box-shadow: 0 0 0 6px rgba(216,181,106,.08), 0 0 38px rgba(216,181,106,.6); } }
@media (prefers-reduced-motion: reduce) { .fm-cadeado { animation: none; } }
