/* ============================================================
   profile.css — Perfil centralizado (estilo pôster).
   Capa de bolinhas (cor do tema) + avatar redondo central + nome
   + nível/título + status + ações + faixa de stats + bio + abas.
   Serve perfil global e de comunidade.
   ============================================================ */

.profile-screen { display: flex; flex-direction: column; }

/* ---------------- Cabeçalho pôster ---------------- */
.profile-poster {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 468px;            /* altura padrão do cabeçalho */
}
/* o miolo cresce e empurra os stats p/ a base */
.profile-poster__center { flex: 1; }
.profile-poster__cover {
  position: absolute; inset: 0;   /* cobre todo o cabeçalho (topo até os stats) */
  background-repeat: repeat;
}
.profile-poster__cover::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  /* vinheta p/ legibilidade do texto branco em capas claras OU escuras */
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.08) 28%, rgba(0,0,0,0.12) 60%, rgba(0,0,0,0.42) 100%);
}

/* slideshow de capas */
.cover-slides { overflow: hidden; isolation: isolate; }
.cover-slide {
  position: absolute; inset: 0; z-index: 0;
  will-change: opacity, transform, filter;
}
.cover-slide__img { position: absolute; inset: 0; background: center/cover no-repeat; }
/* a imagem que entra fica por cima (revelações: impacto/circular) */
.cover-slide.is-leaving { z-index: 1; }
.cover-slide.is-active { z-index: 2; }
/* capa única: sem intro/transição — imagem visível direto */
.cover-slides--single .cover-slide.is-active .cover-slide__img { animation: none !important; opacity: 1 !important; }
.cover-slides--single .cover-slide.is-active::before,
.cover-slides--single .cover-slide.is-active::after { animation: none !important; opacity: 0 !important; }
.cover-slides--single .cover-slide.is-active { animation: none !important; clip-path: none !important; opacity: 1 !important; transform: none !important; }
/* 1) Esmaecer */
.cover-slides.fx-fade .cover-slide { opacity: 0; transition: opacity .9s ease; }
.cover-slides.fx-fade .cover-slide.is-active { opacity: 1; }
/* 2) Deslizar */
.cover-slides.fx-slide .cover-slide { opacity: 0; transform: translateX(100%); transition: transform .9s cubic-bezier(.5,0,.2,1), opacity .9s ease; }
.cover-slides.fx-slide .cover-slide.is-active { opacity: 1; transform: translateX(0); }
.cover-slides.fx-slide .cover-slide.is-leaving { opacity: 1; transform: translateX(-100%); }
/* 3) Zoom */
.cover-slides.fx-zoom .cover-slide { opacity: 0; transform: scale(1.14); transition: transform .9s ease, opacity .9s ease; }
.cover-slides.fx-zoom .cover-slide.is-active { opacity: 1; transform: scale(1); }
.cover-slides.fx-zoom .cover-slide.is-leaving { opacity: 0; transform: scale(1.14); }
/* 4) Dissolver */
.cover-slides.fx-dissolve .cover-slide { opacity: 0; filter: blur(14px); transition: opacity .9s ease, filter .9s ease; }
.cover-slides.fx-dissolve .cover-slide.is-active { opacity: 1; filter: blur(0); }
.cover-slides.fx-dissolve .cover-slide.is-leaving { opacity: 0; filter: blur(14px); }

/* 5) Circular — íris crescendo do centro */
.cover-slides.fx-circle .cover-slide { opacity: 0; clip-path: circle(0% at 50% 50%); }
.cover-slides.fx-circle .cover-slide.is-active { opacity: 1; animation: circleIn .8s cubic-bezier(.4,0,.2,1) both; }
.cover-slides.fx-circle .cover-slide.is-leaving { opacity: 1; animation: circleOut .6s ease both; }
@keyframes circleIn { 0% { clip-path: circle(0% at 50% 50%); } 100% { clip-path: circle(150% at 50% 50%); } }
@keyframes circleOut { 0% { opacity: 1; } 100% { opacity: 0; } }

/* 7) Cortina — dois painéis de veludo com pregas que abrem de verdade */
.cover-slides.fx-curtain .cover-slide { opacity: 0; }
.cover-slides.fx-curtain .cover-slide.is-active { opacity: 1; }
.cover-slides.fx-curtain .cover-slide.is-leaving { opacity: 1; }
/* a imagem nova só aparece quando a cortina já fechou (~40%) — troca escondida atrás do veludo */
.cover-slides.fx-curtain .cover-slide.is-active .cover-slide__img { animation: curtainImg 2s both; }
@keyframes curtainImg { 0%, 36% { opacity: 0; } 44%, 100% { opacity: 1; } }
/* painéis = tecido leve com pregas suaves na cor da paleta (sem sombra pesada) */
.cover-slides.fx-curtain .cover-slide.is-active::before,
.cover-slides.fx-curtain .cover-slide.is-active::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 52%; z-index: 3; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.05), rgba(0,0,0,0) 24%, rgba(0,0,0,.07)),
    repeating-linear-gradient(to right,
      var(--curtain-d, #7c1217) 0,
      var(--curtain-m, #a51c22) 13px,
      var(--curtain-l, #c83139) 22px,
      var(--curtain-m, #a51c22) 31px,
      var(--curtain-d, #7c1217) 44px);
}
/* dobra clara na borda interna (cobre o stop escuro do gradiente — sem linha escura no encontro) */
.cover-slides.fx-curtain .cover-slide.is-active::before { left: 0; animation: curtainCloseOpenL 2s cubic-bezier(.4,0,.2,1) both; box-shadow: inset -10px 0 14px -8px rgba(255,255,255,.22); }
.cover-slides.fx-curtain .cover-slide.is-active::after { right: 0; animation: curtainCloseOpenR 2s cubic-bezier(.4,0,.2,1) both; box-shadow: inset 10px 0 14px -8px rgba(255,255,255,.22); }
/* aberta(fora) -> FECHA no centro -> segura -> ABRE de novo (deslize limpo, sem distorcer pregas) */
@keyframes curtainCloseOpenL {
  0%       { transform: translateX(-102%); }
  38%, 62% { transform: translateX(0); }
  100%     { transform: translateX(-102%); }
}
@keyframes curtainCloseOpenR {
  0%       { transform: translateX(102%); }
  38%, 62% { transform: translateX(0); }
  100%     { transform: translateX(102%); }
}

@media (prefers-reduced-motion: reduce) {
  .cover-slide { transition: opacity .2s linear !important; animation: none !important; }
  .cover-slides.fx-curtain .cover-slide.is-active::before,
  .cover-slides.fx-curtain .cover-slide.is-active::after { animation: none !important; opacity: 0 !important; }
  /* sem cortina => imagem visível direto (não fica em branco) */
  .cover-slides.fx-curtain .cover-slide.is-active .cover-slide__img { animation: none !important; opacity: 1 !important; }
}

.profile-poster__topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-4);
}
.profile-poster__iconbtn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  backdrop-filter: blur(6px);
}
.profile-poster__iconbtn:hover { background: rgba(0,0,0,0.5); }
.profile-poster__status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: #fff; background: rgba(0,0,0,0.4);
  padding: 6px 12px; border-radius: var(--r-pill);
  backdrop-filter: blur(6px);
}
.profile-poster__statusdot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-mute); }
.profile-poster__status.is-online .profile-poster__statusdot { background: var(--ok); box-shadow: 0 0 0 3px rgba(54,211,153,0.25); }
.profile-poster__status.is-clickable { cursor: pointer; border: none; }
.profile-poster__status.is-clickable:hover { background: rgba(0,0,0,0.55); }

.profile-poster__center {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4) var(--s-5);
  text-align: center;
}
.profile-poster__avatarwrap { position: relative; display: inline-block; line-height: 0; }
.profile-poster__avatar {
  width: 116px; height: 116px;
  border: none;
  box-shadow: none;
  font-size: var(--fs-2xl);
}
/* ponto de status no canto sup-direito das ações (online = verde; offline some) */
.profile-poster__avstatus {
  position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px; border-radius: 50%;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  padding: 0; z-index: 2;
}
.profile-poster__avstatus.is-clickable { cursor: pointer; }
.profile-poster__avstatus.is-clickable:hover { transform: scale(1.12); }
.profile-poster__name {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);   /* leve, p/ ler em capa clara */
}
.profile-poster__handle { color: var(--text-dim); font-size: var(--fs-sm); margin-top: -4px; }

.profile-poster__badge { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: var(--s-1); flex-wrap: wrap; max-width: 100%; padding: 0 var(--s-4); }
.profile-poster__moretags {
  display: inline-grid; place-items: center;
  width: 28px; height: 24px; border-radius: var(--r-pill);
  background: rgba(0,0,0,0.55); color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.profile-poster__moretags:hover { background: rgba(0,0,0,0.75); transform: scale(1.08); box-shadow: 0 4px 14px rgba(0,0,0,0.55); }
.level-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  color: #fff; background: var(--ok);
  padding: 3px 10px; border-radius: var(--r-pill);
}
/* chip que vai trocando os cargos com fade */
.level-chip--cycle { background: var(--accent); }
.level-chip--cycle .cyc-label, .level-chip--cycle .cyc-ic {
  transition: opacity .2s ease, transform .2s ease;
}
.level-chip--cycle.is-swap .cyc-label, .level-chip--cycle.is-swap .cyc-ic {
  opacity: 0; transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
  .level-chip--cycle .cyc-label, .level-chip--cycle .cyc-ic { transition: none; }
}
.title-chip {
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  padding: 3px 14px; border-radius: var(--r-pill);
}

.profile-poster__actions {
  position: relative;
  display: flex; gap: var(--s-2); justify-content: center;
  margin-top: var(--s-3);
}
.profile-poster__actions .btn--icon { width: 44px; height: 40px; }
.profile-poster__actions .btn { box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
/* botões sobre a capa: vidro escuro p/ texto/ícone sempre legível (capa clara ou escura) */
.profile-poster__actions .btn--outline,
.profile-poster__actions .btn--ghost {
  background: rgba(0,0,0,0.42); color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);   /* sombra leve e suave */
}
.profile-poster__actions .btn--outline:hover,
.profile-poster__actions .btn--ghost:hover { background: rgba(0,0,0,0.58); color: #fff; }

/* estilo de referência: Seguir = pill branco (texto preto) · Mensagem = pill preto (texto branco) */
.profile-poster__actions .pa-follow,
.profile-poster__actions .pa-msg {
  height: 34px; min-height: 0;
  padding: 0 12px; gap: 6px;
  font-size: var(--fs-sm); font-weight: var(--fw-bold);
  border-radius: var(--r-pill);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: none;
}
.profile-poster__actions .pa-follow svg,
.profile-poster__actions .pa-msg svg { width: 16px; height: 16px; }
.profile-poster__actions .pa-follow { background: #fff; color: #111; border: none; }
.profile-poster__actions .pa-follow:hover { background: #f0f0f0; color: #111; }
.profile-poster__actions .pa-follow svg { color: #111; }
.profile-poster__actions .pa-msg { background: #111; color: #fff; border: 1px solid rgba(255,255,255,0.16); }
.profile-poster__actions .pa-msg:hover { background: #000; color: #fff; }
.profile-poster__actions .pa-msg svg { color: #fff; }

/* ---------------- Faixa de stats (translúcida sobre a capa) ---------------- */
.profile-poster__stats {
  position: relative; z-index: 2;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(0, 0, 0, 0.38);       /* escuro suave, sem desfoque */
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.profile-poster__stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--s-4) var(--s-2);
  border-left: 1px solid rgba(255,255,255,0.07);
  color: #fff;
}
.profile-poster__stat:first-child { border-left: none; }
.profile-poster__stat .profile-poster__statlabel { color: rgba(255,255,255,0.7); }
.profile-poster__stat.is-clickable { cursor: pointer; }
.profile-poster__stat.is-clickable:hover { background: rgba(255,255,255,0.08); }
.profile-poster__statnum { font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.profile-poster__statlabel { font-size: var(--fs-xs); color: var(--text-mute); }

/* ---------------- Bio ---------------- */
.profile-bio {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-5) var(--s-4) var(--s-3);
}
.profile-bio__head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.profile-bio__head strong { font-size: var(--fs-lg); }
.profile-bio__since { color: var(--text-mute); font-size: var(--fs-sm); }
.profile-bio--clickable { cursor: pointer; transition: background var(--t-fast); }
.profile-bio--clickable:hover { background: rgba(255,255,255,0.03); }
.profile-bio__arrow { color: var(--text-mute); }
.profile-bio--clickable:hover .profile-bio__arrow { color: var(--accent); }
.profile-bio__wrap { position: relative; --bio-fade: var(--bg); }
.profile-bio__text { color: var(--text-dim); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.profile-bio__text.is-clamped {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal;
}
.profile-bio__text--clamp3 {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal;
}
/* "ver mais" sobreposto no fim da 2ª linha, com fade pra esconder o texto sob ele */
.profile-bio__more {
  position: absolute; right: 0; bottom: 0;
  padding: 0 0 0 34px; border: 0; cursor: pointer;
  color: var(--accent); font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  background: linear-gradient(to right, transparent 0, var(--bio-fade) 30%);
}
/* expandido: vira link normal abaixo do texto */
.profile-bio__more.is-inline { position: static; padding: 2px 0 0; background: none; }
.profile-bio__empty {
  text-align: left; color: var(--text); font-weight: var(--fw-semibold);
}
.profile-bio__empty:hover { color: var(--accent); }
.profile-bio__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--s-2); }

/* ---------------- Abas ---------------- */
.profile-tabs-wrap { display: flex; flex-direction: column; }
.profile-tabs {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.profile-tabs__tab {
  flex: 1;
  padding: var(--s-4) var(--s-3);
  font-weight: var(--fw-bold);
  color: var(--text-mute);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.profile-tabs__tab.is-active { color: var(--text); background: var(--surface-2); }
.profile-tabs__panel { min-height: 300px; }

/* estado vazio com "planeta" */
.feed-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-3); padding: var(--s-8) var(--s-4); color: var(--text-mute);
}
.feed-empty__planet { width: 96px; height: 96px; opacity: 0.18; }

/* nível + conquistas */
.lvl-card { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.lvl-card__badge { position: relative; width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.lvl-card__num { position: absolute; bottom: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: var(--fw-bold); border: 2px solid var(--surface); }
.lvl-card__title { font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.lvl-card__sub { color: var(--text-mute); font-size: var(--fs-xs); margin-bottom: 6px; }
.lvl-card__track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.lvl-card__fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2, var(--accent))); border-radius: 999px; transition: width .4s ease; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--s-2); }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.ach__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--text-mute); }
.ach.is-earned .ach__icon { background: var(--accent-soft); color: var(--accent); }
.ach.is-locked { opacity: .55; }
.ach__label { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.ach__desc { color: var(--text-mute); font-size: 10px; line-height: 1.2; }

/* lista de salvos no perfil */
.profile-feed { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); }
.saved-row {
  display: flex; align-items: center; gap: var(--s-3); width: 100%; text-align: left;
  padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.saved-row:hover { border-color: var(--accent); }
.saved-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.saved-row__body strong { font-size: var(--fs-sm); }

.profile-screen { width: 100%; min-height: 100%; }
/* perfil global do Obliviny: tela própria, full-bleed */
.profile-screen--global { display: flex; flex-direction: column; flex: 1; }
.profile-screen--global .profile-tabs__panel { flex: 1; }
@media (max-width: 639px) {
  /* espaço p/ a barra de abas inferior não cobrir o conteúdo */
  .profile-screen { padding-bottom: calc(var(--bottomnav-h) + 16px); }
}
@media (max-width: 639px) {
  /* capa segue inset:0 (cobre todo o cabeçalho, igual ao desktop) */
  .profile-poster__avatar { width: 100px; height: 100px; }
  .profile-poster__name { font-size: var(--fs-xl); }
}

/* cor do perfil (fundo da área de bio/posts no perfil de comunidade) */
.profile-screen.has-panel-color { background: var(--panel-bg); }
.profile-screen.has-panel-color .profile-bio,
.profile-screen.has-panel-color .profile-tabs__panel { background: transparent; }
.profile-screen.has-panel-color .profile-bio__wrap { --bio-fade: var(--panel-bg); }
/* tudo translúcido sobre a cor do painel → combina com qualquer cor */
.profile-screen.has-panel-color .profile-poster__stats { background: rgba(0,0,0,0.20); }
.profile-screen.has-panel-color .profile-tabs { background: var(--panel-bg); border-color: rgba(255,255,255,0.12); }
.profile-screen.has-panel-color .profile-tabs__tab.is-active { background: rgba(255,255,255,0.14); }
.profile-screen.has-panel-color .profile-tabs__panel .card,
.profile-screen.has-panel-color .profile-tabs__panel .post {
  background: rgba(0,0,0,0.26);
  border-color: rgba(255,255,255,0.10);
  box-shadow: none;
}
.profile-screen.has-panel-color .camino-img,
.profile-screen.has-panel-color .camino-feature__media,
.profile-screen.has-panel-color .camino-mini__media { background: rgba(0,0,0,0.18); }
/* textos sobre painel colorido (escuro/médio): garantir contraste claro */
.profile-screen.has-panel-color .profile-tabs__panel .post__time,
.profile-screen.has-panel-color .profile-tabs__panel .camino-post__time,
.profile-screen.has-panel-color .profile-tabs__panel .camino-pbody__text,
.profile-screen.has-panel-color .profile-tabs__panel .u-muted,
.profile-screen.has-panel-color .profile-tabs__panel .post__action { color: rgba(255,255,255,0.82) !important; }
.profile-screen.has-panel-color .profile-tabs__panel .post__title-strong,
.profile-screen.has-panel-color .profile-tabs__panel .camino-post__title { color: #fff !important; }
/* painel CLARO inverte: textos escuros */
.profile-screen.panel-light .profile-tabs__panel .post__time,
.profile-screen.panel-light .profile-tabs__panel .camino-post__time,
.profile-screen.panel-light .profile-tabs__panel .camino-pbody__text,
.profile-screen.panel-light .profile-tabs__panel .u-muted,
.profile-screen.panel-light .profile-tabs__panel .post__action { color: rgba(0,0,0,0.6) !important; }
.profile-screen.panel-light .profile-tabs__panel .post__title-strong,
.profile-screen.panel-light .profile-tabs__panel .camino-post__title { color: #16181f !important; }

/* ---- painel CLARO: tudo em tom branco, texto escuro ---- */
.profile-screen.panel-light .profile-tabs { background: var(--panel-bg); border-color: rgba(0,0,0,0.08); }
.profile-screen.panel-light .profile-tabs__tab { color: rgba(0,0,0,0.55); }
.profile-screen.panel-light .profile-tabs__tab.is-active { color: #16181f; background: rgba(255,255,255,0.85); }
.profile-screen.panel-light .profile-poster__stats { background: rgba(255,255,255,0.35); }
.profile-screen.panel-light .profile-tabs__panel .card,
.profile-screen.panel-light .profile-tabs__panel .post {
  background: #fff; border-color: rgba(0,0,0,0.08);
}
.profile-screen.panel-light .profile-tabs__panel .post__title-strong,
.profile-screen.panel-light .profile-tabs__panel .camino-post__title { color: #16181f; }
.profile-screen.panel-light .profile-tabs__panel .camino-pbody__text { color: #3a3f4b; }
.profile-screen.panel-light .feed-empty { color: rgba(0,0,0,0.5); }
/* mídia clara */
.profile-screen.panel-light .camino-img,
.profile-screen.panel-light .camino-feature__media,
.profile-screen.panel-light .camino-mini__media { background: linear-gradient(135deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02)); }
.profile-screen.panel-light .camino-img svg.icon { color: rgba(0,0,0,0.4); }

/* seletor de cor do painel (no modal de edição) */
.panelcolor { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); }
.panelcolor__input { width: 28px; height: 28px; border: none; background: none; padding: 0; cursor: pointer; }

/* efeito vidro forte (editar tags) */
.scrim--glass { backdrop-filter: blur(16px) saturate(1.3) !important; -webkit-backdrop-filter: blur(16px) saturate(1.3) !important; align-items: center !important; padding: var(--s-5) !important; }
.scrim--glass .modal { width: min(440px, 100%); border-radius: var(--r-xl) !important; animation: pop var(--t-mid) !important; }
/* modal de todos os títulos/tags — sempre central, sem tocar bordas */
.scrim--centered { align-items: center !important; justify-content: center; padding: var(--s-5) !important; }
.scrim--centered .modal { width: min(440px, 100%); max-height: 80vh; border-radius: var(--r-xl) !important; animation: pop var(--t-mid) !important; }
.tags-modal__grid { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; }
.tags-modal__chip {
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--text-dim);
  font-weight: var(--fw-semibold); font-size: var(--fs-sm);
  white-space: nowrap;
}
.tags-modal__chip.is-active { background: var(--ok); color: #fff; }

/* cor de texto personalizada do perfil */
.profile-screen.has-text-color .profile-poster__name,
.profile-screen.has-text-color .profile-poster__handle,
.profile-screen.has-text-color .profile-bio strong,
.profile-screen.has-text-color .profile-bio__text,
.profile-screen.has-text-color .profile-bio__since,
.profile-screen.has-text-color .profile-poster__statnum,
.profile-screen.has-text-color .profile-poster__statlabel { color: var(--profile-text) !important; }

/* editor de cor por elemento do perfil */
.textcolors { display: flex; flex-direction: column; gap: 2px; }
.textcolors__row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); }
.textcolors__row:hover { background: var(--surface-2); }
.textcolors__label { font-weight: var(--fw-medium); }
/* swatch clicável (input de cor invisível por cima) */
.textcolors__sw {
  position: relative; width: 30px; height: 30px; border-radius: 8px; flex: none;
  border: 1px solid var(--border-strong); cursor: pointer; overflow: hidden;
  /* xadrez = "sem cor / padrão" */
  background-image: linear-gradient(45deg, var(--surface-3) 25%, transparent 25%, transparent 75%, var(--surface-3) 75%),
                    linear-gradient(45deg, var(--surface-3) 25%, transparent 25%, transparent 75%, var(--surface-3) 75%);
  background-size: 12px 12px; background-position: 0 0, 6px 6px;
}
.textcolors__sw.is-set { background-image: none; border-color: rgba(255,255,255,0.3); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.textcolors__pick { position: absolute; inset: 0; opacity: 0; cursor: pointer; border: none; padding: 0; }
.textcolors__clear { width: 28px; height: 28px; display: grid; place-items: center; color: var(--text-mute); border-radius: 50%; flex: none; }
.textcolors__clear:hover { background: var(--surface-3); color: var(--danger); }

/* ============================================================
   Editar perfil — tela cheia própria
   ============================================================ */
.editp { display: flex; flex-direction: column; min-height: 100%; max-width: 720px; margin: 0 auto; width: 100%; }
.editp__head {
  flex: none; display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(8px);
}
.editp__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.editp__top { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); border-bottom: 1px solid var(--border); }
.editp__avatar { width: 84px; flex: none; }
.editp__avatar .upload__preview { width: 84px; height: 84px; border-radius: 50%; }
.editp__rows { display: flex; flex-direction: column; }
.editp__row {
  display: flex; align-items: center; gap: var(--s-3); width: 100%;
  padding: var(--s-4); border-bottom: 1px solid var(--border);
  color: var(--text); font-weight: var(--fw-semibold);
}
.editp__row:hover { background: var(--surface-2); }
.editp__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.editp__chev { color: var(--text-mute); transition: transform var(--t-fast); }
.editp__section { padding: var(--s-4); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.editp__bio { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.editp__biolabel { font-weight: var(--fw-bold); color: var(--text-dim); }

/* ============================================================
   Editar perfil v2 (layout cards, fundo do tema)
   ============================================================ */
.editp2 { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow-y: auto; background: var(--bg); max-width: 720px; margin: 0 auto; width: 100%; }
.editp2__head {
  flex: none; display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  position: sticky; top: 0; z-index: var(--z-sticky); background: var(--bg);
}
.editp2__title { text-align: center; font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.editp2__center { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); padding: var(--s-4) 0 var(--s-5); }
.editp2__avatarbtn { position: relative; width: 88px; height: 88px; border-radius: 50%; flex: none; }
.editp2__avatar { width: 88px !important; height: 88px !important; aspect-ratio: 1/1; border-radius: 50%; background: var(--surface-3) center/cover; display: grid; place-items: center; font-size: var(--fs-xl); color: #fff; flex: none; }
.editp2__center { width: 100%; }
.editp2__pencil { position: absolute; right: 2px; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 2px solid var(--bg); display: grid; place-items: center; color: var(--text); }
/* caneta "escrevendo" — só a caneta se move (documento fica parado) */
@keyframes penWrite {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  22%      { transform: translate(-70px, 55px) rotate(-4deg); }
  48%      { transform: translate(55px, -40px) rotate(3deg); }
  74%      { transform: translate(-35px, 25px) rotate(-2deg); }
}
/* botão Editar: interior cinza + borda branca */
.btn--editpen { background: rgba(107,114,128,0.39); border: 1px solid #fff; color: #fff; height: auto; min-height: 0; padding: 8px 20px; font-size: 15px; gap: 6px; border-radius: var(--r-pill); line-height: 1; margin-top: -6px; }
.btn--editpen .icon { width: 17px; height: 17px; }
.btn--editpen:hover { background: rgba(107,114,128,0.52); }
.btn--editpen .ic-pen { transform-box: fill-box; transform-origin: left bottom; animation: penWrite 1.9s ease-in-out infinite; }
.btn--editpen:hover .ic-pen { animation-duration: 0.9s; }
@media (prefers-reduced-motion: reduce) { .btn--editpen .ic-pen { animation: none; } }
.editp2__editpic { color: var(--accent); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.editp2__fields { display: flex; flex-direction: column; gap: var(--s-4); padding: 0 var(--s-4) var(--s-7); }
.editp2__field { display: flex; flex-direction: column; gap: var(--s-2); }
.editp2__label { color: var(--text-mute); font-size: var(--fs-sm); padding-left: var(--s-1); }
.editp2__control .input, .editp2__control .textarea { background: var(--surface); border-radius: var(--r-lg); }
.editp2__control .input { position: relative; }
/* linha de navegação (mídia/fundo) como card */
.editp2__navrow {
  display: flex; align-items: center; gap: var(--s-3); width: 100%;
  padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface);
  color: var(--text); font-weight: var(--fw-semibold);
}
.editp2__navrow:hover { background: var(--surface-2); }
.editp2__navicon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-dim); flex: none; }
.editp2__navlabel { text-align: right; }
.editp2__field .textarea { min-height: 120px; }

/* criar publicação — tela cheia */
.cpost__body { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-3) var(--s-4) var(--s-7); }
.cpost__types { display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-1); }
.cpost__type {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 6px 12px; border-radius: var(--r-pill); white-space: nowrap;
  background: var(--surface); color: var(--text-dim); border: 1px solid var(--border);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
}
.cpost__type:hover { background: var(--surface-2); }
.cpost__type.is-active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.cpost__type .icon { width: 16px; height: 16px; }
.cpost__fields { display: flex; flex-direction: column; gap: var(--s-3); }
.cpost__field { display: flex; flex-direction: column; gap: var(--s-1); }
.cpost__label { color: var(--text-mute); font-size: var(--fs-sm); padding-left: var(--s-1); }
.cpost__field .input, .cpost__field .textarea { background: var(--surface); border-radius: var(--r-lg); }
.cpost__field .textarea { min-height: 120px; }
.cpost__hint { font-size: var(--fs-xs); color: var(--text-mute); line-height: 1.5; }
/* barra de formatação (abre ao clicar) */
.fmt-field { display: flex; flex-direction: column; gap: var(--s-2); }
.fmt-toggle { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-mute); font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.fmt-toggle:hover, .fmt-toggle.is-on { background: var(--accent); color: var(--on-accent); }
.fmt-bar { display: none; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-2); background: var(--surface-2); border-radius: var(--r-md); }
.fmt-bar.is-open { display: flex; animation: notif-in .16s ease both; }
.fmt-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface); color: var(--text); cursor: pointer; font-size: var(--fs-md); transition: background var(--t-fast); }
.fmt-btn:hover { background: var(--surface-3); }
.fmt-sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--border); }
.linkdlg { display: flex; flex-direction: column; gap: var(--s-3); min-width: min(360px, 80vw); }
.cpost-select { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%), linear-gradient(135deg, var(--text-mute) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.cpost__galthumb { position: relative; width: 72px; height: 96px; border-radius: var(--r-md); background: center/cover no-repeat var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); }
/* editor de pergunta do quiz */
.cpost-quizq { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); }
.cpost-quizq input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; cursor: pointer; }
/* tile de imagem de fundo da pergunta */
.cpost-quizq__bg {
  position: relative; width: 100%; aspect-ratio: 16/9; max-height: 160px;
  border-radius: var(--r-md); border: 1px dashed var(--border);
  background: center/cover no-repeat var(--surface-3); color: var(--text-mute);
  display: grid; place-items: center; cursor: pointer; overflow: hidden;
}
.cpost-quizq__bg.has-img { border-style: solid; color: #fff; }
.cpost-quizq__bglbl { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); padding: 6px 12px; border-radius: var(--r-pill); background: rgba(0,0,0,0.45); }
.cpost-quizq__bgrm { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cpost__galrm { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.cpost__galrm:hover { background: var(--danger); }
.cpost__preview { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
.cpost__previewlabel { color: var(--text-mute); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; }
/* overlay de pré-visualização (publicação como vista de fora + comentários) */
.cpost-preview {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: var(--bg); overflow-y: auto;
  display: flex; flex-direction: column;
  animation: notif-in 0.2s ease both;
}

/* color picker completo (SV + matiz + conta-gotas + RGB) */
.cp { display: flex; flex-direction: column; gap: var(--s-3); width: 100%; padding: var(--s-4); background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.cp__swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--s-2); }
.cp__sw { aspect-ratio: 1/1; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); cursor: pointer; }
.cp__sw.is-active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.cp__sw--custom { display: grid; place-items: center; background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.cp__sw--custom.is-active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.cp__panel { display: none; flex-direction: column; gap: var(--s-3); }
.cp__panel.is-open { display: flex; }
.cp__sv { position: relative; width: 100%; height: 200px; border-radius: var(--r-md); cursor: crosshair; touch-action: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.cp__svthumb { position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); transform: translate(-50%, -50%); pointer-events: none; }
.cp__huerow { display: flex; align-items: center; gap: var(--s-3); }
.cp__eye { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); flex: none; }
.cp__eye:hover { background: var(--surface-3); }
.cp__dot { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.cp__hue { -webkit-appearance: none; appearance: none; flex: 1; height: 12px; border-radius: 999px; background: linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00); outline: none; }
.cp__hue::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid rgba(0,0,0,.25); cursor: pointer; }
.cp__hue::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid rgba(0,0,0,.25); cursor: pointer; }
.cp__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.cp__numcell { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); }
.cp__numcell--hex { grid-column: 1 / -1; }
.cp__num { width: 100%; text-align: center; padding: var(--s-2); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-variant-numeric: tabular-nums; }
.cp__hex { text-transform: uppercase; letter-spacing: .04em; font-weight: var(--fw-semibold); }
.cp__numlbl { color: var(--text-mute); font-size: var(--fs-xs); }

/* editor de capa (galeria + ordem + transição) */
.coveredit__body { display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-4) var(--s-4) var(--s-7); }
/* seletor de transição em lista vertical (todas visíveis) */
.coverfx { display: flex; flex-direction: column; gap: var(--s-2); }
/* grid compacto de transições (tiles) */
.coverfx--grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.coverfx__tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: var(--s-3) var(--s-2); border-radius: var(--r-md);
  background: var(--surface); color: var(--text-mute); font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  border: 1px solid var(--border); cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.coverfx__tile:hover { color: var(--text); transform: translateY(-1px); }
.coverfx__tile.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.coveredit__count { color: var(--text-mute); font-size: var(--fs-xs); font-weight: var(--fw-medium); }

/* compositor da primeira mensagem (DM) */
.firstmsg { display: flex; flex-direction: column; gap: var(--s-3); min-width: 280px; }
.firstmsg__to { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.firstmsg textarea { min-height: 90px; }
.coveredit__prevhost { width: 100%; }
.coverprev { position: relative; width: 100%; height: 160px; border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); background: var(--surface-2); }
.coverprev--empty { display: grid; place-items: center; color: var(--text-mute); font-size: var(--fs-sm); }
.coveredit__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.coverthumb {
  position: relative; aspect-ratio: 1/1; border-radius: var(--r-md);
  background: var(--surface-3) center/cover no-repeat; cursor: grab; touch-action: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}
.coverthumb.is-dragging { opacity: .65; cursor: grabbing; transform: scale(.96); transition: transform .1s ease; box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.coverthumb__ord { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: var(--fs-xs); font-weight: var(--fw-bold); display: grid; place-items: center; }
.coverthumb__rm { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.coverthumb__rm:hover { background: var(--danger); }
.coverthumb--add { display: grid; place-items: center; background: var(--surface-2); color: var(--text-dim); cursor: pointer; border: 1px dashed var(--border); }
.coverthumb--add:hover { background: var(--surface-3); color: var(--text); }

/* telas cheias separadas: Imagem e Plano de fundo */
.bgscreen__body { display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-4) var(--s-4) var(--s-7); }
.bgscreen__preview { height: 150px; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }

/* pré-visualização do perfil no modal */
.editp2-preview { max-height: 70vh; overflow-y: auto; border-radius: var(--r-lg); }
.scrim--centered .modal:has(.editp2-preview) { width: min(420px, 100%); }
.editp2-preview .profile-poster { min-height: 360px; }

/* swatch de cor personalizada (com lápis) */
.swatch--custom { position: relative; display: grid; place-items: center; color: #fff; background: var(--surface-3); overflow: hidden; }
.swatch--custom svg.icon { width: 16px; height: 16px; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.swatch__free-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; border: none; padding: 0; }

/* modo prévia do perfil — badge flutuante no canto */
.preview-badge {
  position: fixed; left: 50%; bottom: var(--s-5); transform: translateX(-50%);
  z-index: var(--z-modal);
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent);
  font-weight: var(--fw-bold); font-size: var(--fs-sm);
  box-shadow: var(--shadow-pop);
  animation: notif-in 0.25s ease both;
}
.preview-badge:hover { filter: brightness(1.08); }
.pview__tag { flex: none; font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .06em; color: #fff; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: var(--r-pill); backdrop-filter: blur(6px); }
/* prévia é totalmente navegável (visitante de si mesmo); edição/post já não aparecem */
