/* ============================================================================
   R377 — MASSA DESIGN SYSTEM v1 · identidade visual internacional MassaCoin
   Camada ADITIVA carregada por último. Só apresentação: nenhuma rota, função, texto, dado, API,
   permissão ou regra de negócio é alterada. Sem textos fixos (compatível com todos os idiomas, inclusive RTL).
   Assinatura: azul-marinho #0b1f46 + dourado #d4af37 · cada módulo tem uma cor de acento própria.
   Acessibilidade WCAG 2.2 AA: foco visível, movimento reduzido, alvos ≥ 44 px nos botões principais, contraste conferido.
   ========================================================================== */
:root{
  --mc-navy:#0b1f46; --mc-navy-2:#12306a; --mc-navy-3:#1d4ba0; --mc-gold:#d4af37; --mc-gold-2:#f1d77a; --mc-gold-ink:#7a5c00;
  --mc-ink:#1A1D20; --mc-mute:#59616A; --mc-line:#E3E8EF; --mc-page:#F6F8FB; --mc-card:#FFFFFF;
  --mc-radius:16px; --mc-radius-sm:12px;
  --mc-shadow:0 1px 2px rgba(11,31,70,.06),0 6px 18px rgba(11,31,70,.07);
  --mc-shadow-hover:0 2px 4px rgba(11,31,70,.08),0 14px 30px rgba(11,31,70,.13);
  --mc-mod:#d4af37;
  --mc-ease:cubic-bezier(.2,.7,.2,1);
}
/* ---------- Personalidade por módulo (cor de acento; texto sempre navy/branco para manter contraste) ---------- */
.hub-section[data-sec="feed"]{--mc-mod:#d4af37}
.hub-section[data-sec="turismo"]{--mc-mod:#0369a1}
.hub-section[data-sec="marketplace"]{--mc-mod:#0f766e}
.hub-section[data-sec="carteira"]{--mc-mod:#b8901f}
.hub-section[data-sec="votacoes"]{--mc-mod:#be123c}
.hub-section[data-sec="impacto"]{--mc-mod:#15803d}
.hub-section[data-sec="empreendedor"]{--mc-mod:#c2410c}
.hub-section[data-sec="oportunidades"]{--mc-mod:#4338ca}
.hub-section[data-sec="recompensas"],.hub-section[data-sec="resgates"]{--mc-mod:#b45309}
.hub-section[data-sec="eventos"]{--mc-mod:#7c3aed}
.hub-section[data-sec="esportes"]{--mc-mod:#4d7c0f}
.hub-section[data-sec="chat"]{--mc-mod:#2563eb}
.hub-section[data-sec="perfil"],.hub-section[data-sec="conta"]{--mc-mod:#12306a}
.hub-section[data-sec="clube"]{--mc-mod:#6d28d9}
body.sx-body[data-section="feed"]{--mc-mod:#d4af37}
body.sx-body[data-section="carteira"]{--mc-mod:#b8901f}
body.sx-body[data-section="marketplace"]{--mc-mod:#0f766e}
body.sx-body[data-section="eventos"]{--mc-mod:#7c3aed}
body.sx-body[data-section="chat"]{--mc-mod:#2563eb}
body.sx-body[data-section="perfil"]{--mc-mod:#12306a}
/* névoa de cor do módulo no topo de cada área */
html body .hub-section[data-sec]{background-image:linear-gradient(180deg,color-mix(in srgb,var(--mc-mod) 9%,transparent) 0,transparent 260px);background-repeat:no-repeat}

/* ---------- Topo do app: faixa azul-marinho, marca dourada, filete do módulo ---------- */
html body .sx-top.sx-top,html body.sx-body .sx-top.sx-top{background:linear-gradient(135deg,var(--mc-navy) 0%,var(--mc-navy-2) 100%)!important;background-image:linear-gradient(135deg,var(--mc-navy) 0%,var(--mc-navy-2) 100%)!important;border-bottom:0;box-shadow:0 3px 0 0 var(--mc-mod),0 8px 20px rgba(11,31,70,.18)}
html body .sx-top.sx-top .sx-brand,html body .sx-top.sx-top .sx-brand *,html body .sx-top.sx-top .sx-top__title,html body .sx-top.sx-top .brand__name{color:var(--mc-gold-2)!important;text-shadow:none!important;letter-spacing:.04em}
html body .sx-top.sx-top button,html body .sx-top.sx-top svg,html body .sx-top.sx-top .sx-bell{color:#fff!important}
/* páginas avulsas: mesmo cabeçalho (antes: degradê azul sem identidade) */
html body header.subheader{background:linear-gradient(135deg,var(--mc-navy) 0%,var(--mc-navy-2) 100%)!important;background-image:linear-gradient(135deg,var(--mc-navy) 0%,var(--mc-navy-2) 100%)!important;border-bottom:0;box-shadow:0 3px 0 0 var(--mc-gold),0 8px 20px rgba(11,31,70,.16);color:#fff!important}
html body header.subheader .subheader__title{color:var(--mc-gold-2)!important;letter-spacing:.02em}
html body header.subheader .subheader__sub{color:rgba(255,255,255,.86)!important}
html body header.subheader .subheader__back,html body header.subheader a,html body header.subheader button{color:#fff}

/* cabeçalho com botão extra (ex.: Pitches): quebra de linha em vez de partir a palavra do título */
html body header.subheader{flex-wrap:wrap;row-gap:8px}
html body header.subheader>div:not([class]){flex:1 1 120px;min-width:0}
html body header.subheader .subheader__title{overflow-wrap:break-word;word-break:normal;hyphens:manual}
/* contraste: texto branco sobre o verde do WhatsApp dava 1,98:1 → texto escuro (AA) */
html body .ct-wa__btn{color:#06240f!important}

/* ---------- Abas e chips (todas as áreas): pílula navy no ativo + filete do módulo ---------- */
html body .hub-subtabs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:6px 4px 10px;-webkit-overflow-scrolling:touch}
html body .hub-subtabs::-webkit-scrollbar{display:none}
html body .hub-subtab,html body .hub-chip,html body .ar-tab{flex:0 0 auto;min-height:40px;padding:8px 16px;border-radius:999px;font-weight:700;letter-spacing:.01em;transition:background-color .18s var(--mc-ease),color .18s var(--mc-ease),box-shadow .18s var(--mc-ease)}
html body .hub-subtab.is-active:not(#mc),html body .hub-chip.is-active:not(#mc),html body .ar-tab.is-active:not(#mc){background:var(--mc-navy)!important;background-image:none!important;color:#fff!important;border:1px solid var(--mc-navy)!important;box-shadow:inset 0 -3px 0 0 var(--mc-mod),0 4px 12px rgba(11,31,70,.22)}
html body .hub-subtab:not(.is-active):hover{background:#EEF2F8}

/* ---------- Cartões: raio, borda e elevação consistentes + acento do módulo ---------- */
html body .post-card,html body .plaque,html body .feed-card,html body .card,html body .highlight-card,html body .statement-row,html body .pm-card,html body .op-card,html body .ad-board,html body .vf-card,html body .pc-card,html body .dl-card,html body .du-card{
  border-radius:var(--mc-radius);border:1px solid var(--mc-line);box-shadow:var(--mc-shadow)}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  html body .post-card,html body .card,html body .feed-card,html body .highlight-card,html body .op-card,html body .pm-card,html body .vf-card,html body .du-card{transition:box-shadow .2s var(--mc-ease),transform .2s var(--mc-ease)}
  html body .post-card:hover,html body .card:hover,html body .feed-card:hover,html body .highlight-card:hover,html body .op-card:hover,html body .pm-card:hover,html body .vf-card:hover,html body .du-card:hover{box-shadow:var(--mc-shadow-hover);transform:translateY(-2px)}
}
/* publicações: avatar com anel dourado, nome em marinho, barra de ações em pílulas leves */
html body .post-card__avatar{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--mc-gold)}
html body .post-card__name{color:var(--mc-navy);font-weight:800}
html body .post-bar{gap:2px}
html body .post-bar__b{border-radius:999px;transition:background-color .15s var(--mc-ease),transform .15s var(--mc-ease)}
html body .post-bar__b:active{transform:scale(.94)}
html body .post-media{border-radius:0 0 var(--mc-radius-sm) var(--mc-radius-sm)}

/* ---------- Títulos ---------- */
html body .section-heading{color:var(--mc-navy);letter-spacing:-.005em}
html body .section-heading::after{content:"";display:block;width:36px;height:3px;margin-top:6px;border-radius:2px;background:linear-gradient(90deg,var(--mc-gold),var(--mc-gold-2))}
h1,h2,h3{text-wrap:balance}
html body .hub-section .subheader__title,html body .hub-section .hub-head__title{color:var(--mc-navy)}

/* ---------- Carteira: cartão de saldo premium (valores informativos; sem alterar números) ---------- */
html body .mc-balance.mc-balance--hub:not(#mc){background:linear-gradient(135deg,var(--mc-navy) 0%,var(--mc-navy-2) 60%,#1b3f86 100%)!important;border:1px solid var(--mc-gold);box-shadow:0 10px 28px rgba(11,31,70,.28);border-radius:20px}
html body .mc-balance--hub:not(#mc) .mc-balance__label{color:rgba(255,255,255,.9)!important;-webkit-text-fill-color:rgba(255,255,255,.9)!important;letter-spacing:.06em;text-transform:uppercase;font-size:.72rem;font-weight:700}
html body .mc-balance--hub:not(#mc) .mc-balance__value,html body .mc-balance--hub:not(#mc) .mc-balance__value *{color:var(--mc-gold-2)!important;-webkit-text-fill-color:var(--mc-gold-2)!important;font-variant-numeric:tabular-nums}
html body .mc-balance__value,html body .statement-row__amount,[data-balance]{font-variant-numeric:tabular-nums}

/* ---------- Aviso de verificação (KYC): mais compacto e com CTA dourado ---------- */
html body .kyc-banner{border:1px solid var(--mc-line);border-inline-start:4px solid var(--mc-gold);border-radius:var(--mc-radius);box-shadow:var(--mc-shadow)}
html body .kyc-banner__cta,html body a.kyc-banner__cta#kycBannerCta{background:linear-gradient(180deg,var(--mc-gold-2),var(--mc-gold))!important;color:var(--mc-navy)!important;font-weight:800;min-height:44px;box-shadow:0 3px 10px rgba(122,92,0,.28)}
html body a.kyc-banner__cta#kycBannerCta :is(svg,i,b,span){color:var(--mc-navy)!important}
html body .kyc-banner__chip{background:#FFF7DB;color:#5a4300;border:1px solid #ecd48a}
html body .kyc-banner__icon{background:#FFF7DB;border-color:#ecd48a}

/* compactação: o aviso ocupava ~340 px do celular antes do conteúdo; o texto completo segue disponível (3 linhas + página de verificação) */
html body .kyc-banner{padding:12px 14px;gap:10px;margin-block:8px}
html body .kyc-banner__text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
html body .kyc-banner__row{gap:10px}
/* feed: respiro consistente entre os blocos empilhados */
html body #sub-feed-principal>*+*{margin-top:12px}
html body #sub-feed-principal>[hidden]{margin-top:0}

/* ---------- Botões principais ---------- */
html body .btn-primary,html body .mc-btn--primary,html body .post-btn--gold,html body .home-signup,html body #sxWelcomeCta,html body button[type=submit].pc-btn{min-height:44px;border-radius:var(--mc-radius-sm);box-shadow:0 2px 8px rgba(11,31,70,.18);font-weight:800;letter-spacing:.01em;transition:transform .12s var(--mc-ease),box-shadow .18s var(--mc-ease),filter .18s var(--mc-ease)}
html body .btn-primary:hover,html body .mc-btn--primary:hover{filter:brightness(1.06);box-shadow:0 6px 16px rgba(11,31,70,.24)}
html body .btn-primary:active,html body .mc-btn--primary:active,html body .post-btn--gold:active{transform:scale(.98)}
html body .btn-primary[disabled],html body .mc-btn--primary[disabled]{filter:grayscale(.4);opacity:.6;cursor:not-allowed}

/* ---------- Formulários: campos legíveis e consistentes ---------- */
html body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),html body select,html body textarea{border:1.5px solid #CBD3DF;border-radius:var(--mc-radius-sm);background:#fff;color:var(--mc-ink);min-height:44px;transition:border-color .15s var(--mc-ease),box-shadow .15s var(--mc-ease)}
html body input::placeholder,html body textarea::placeholder{color:#6B7480;opacity:1}
html body input:not([type=checkbox]):not([type=radio]):focus,html body select:focus,html body textarea:focus{border-color:var(--mc-navy-3);box-shadow:0 0 0 3px rgba(29,75,160,.18);outline:none}
html body input:focus-visible,html body select:focus-visible,html body textarea:focus-visible{outline:3px solid var(--mc-navy);outline-offset:1px;box-shadow:0 0 0 6px rgba(241,215,122,.85)}
html body label{font-weight:700;color:var(--mc-ink)}

/* ---------- Janelas e painéis (modais/gavetas): cantos e sombra de app premium ---------- */
html body [role="dialog"],html body .sheet,html body .install-sheet,html body dialog{border-radius:20px}
html body .sheet-backdrop,html body .ac-overlay{backdrop-filter:blur(2px)}

/* ---------- Barra inferior ---------- */
html body .footer-nav .footer-nav__item.is-active{box-shadow:inset 0 3px 0 0 var(--mc-gold)!important}
html body .footer-nav{box-shadow:0 -1px 0 var(--mc-line),0 10px 30px rgba(11,31,70,.14)}

/* ---------- Estados vazios e carregamento ---------- */
html body .empty,html body .mc-empty,html body .eh-empty{color:var(--mc-mute);text-align:center;padding:28px 16px}
@keyframes mcShimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}
html body .skeleton,html body .mc-skeleton{background:linear-gradient(90deg,#EEF2F8 25%,#F8FAFD 37%,#EEF2F8 63%);background-size:200% 100%;animation:mcShimmer 1.4s ease-in-out infinite;border-radius:var(--mc-radius-sm)}

/* ---------- Telas grandes: fundo com assinatura nas laterais (conteúdo central inalterado) ---------- */
@media (min-width:1024px){
  html body.sx-body{background-image:radial-gradient(900px 500px at 0% 0%,rgba(18,48,106,.10),transparent 70%),radial-gradient(900px 500px at 100% 100%,rgba(212,175,55,.12),transparent 70%)!important;background-attachment:fixed}
}

/* ---------- Acessibilidade WCAG 2.2 ---------- */
a:focus-visible,button:focus-visible,summary:focus-visible,[role="button"]:focus-visible,[tabindex]:not([tabindex="-1"]):focus-visible{outline:3px solid var(--mc-navy);outline-offset:2px;box-shadow:0 0 0 6px rgba(241,215,122,.85)}
::selection{background:var(--mc-gold-2);color:var(--mc-navy)}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media (forced-colors:active){html body .hub-subtab.is-active{outline:2px solid Highlight}}

/* ---------- R377b: layout de computador (>=1100px): feed central + coluna lateral fixa de destaques ----------
   Só posicionamento: nenhum bloco, id ou função mudou. No celular/tablet a ordem vertical continua a mesma. */
@media (min-width:1100px){
  html body #sub-feed-principal.hub-sub.is-active,html body #sub-feed-principal.hub-sub[style*="block"]{display:grid;grid-template-columns:minmax(0,620px) 340px;column-gap:28px;justify-content:center;align-items:start;max-width:1040px;margin-inline:auto}
  html body #sub-feed-principal>*{grid-column:1;min-width:0}
  html body #sub-feed-principal>.mc-side{grid-column:2;grid-row:1 / span 40;position:sticky;top:76px;max-height:calc(100vh - 92px);overflow:auto;display:flex;flex-direction:column;gap:14px;scrollbar-width:thin;margin-top:0}
  html body #sub-feed-principal>.mc-side>*{margin:0;flex:0 0 auto}
  html body #sub-feed-principal>.mc-side .exp{font-size:.92em}
}
@media (min-width:1100px) and (prefers-reduced-motion:no-preference){
  html body .post-card,html body .card{transition:box-shadow .2s var(--mc-ease),transform .2s var(--mc-ease)}
  html body .post-card:hover{box-shadow:0 10px 28px rgba(11,31,70,.12)}
}
@media (min-width:1100px){
  html body .wrap.hub:has(#sub-feed-principal.is-active){max-width:1060px}
}

/* ---------- R378: contraste real corrigido (WCAG 2.2 AA) ----------
   Cartão "Você tem interesse?": fundo ficou azul médio (4,1:1 com texto branco) → azul-marinho da marca (≈13:1). */
html body .mc-int:not(#mc){background:rgba(11,31,70,.97)!important;border:1px solid rgba(241,215,122,.6)!important}
/* Texto de avisos (.notice): cinza #6B7280 sobre azul-claro dava 3,98:1 → cinza-azulado escuro (≥8:1) */
html body .notice .notice__text:not(#mc),html body .notice .notice__text *:not(#mc){color:#2E3A4D!important}

/* ---------- R378: ICONOGRAFIA UNIFICADA + CAPAS DE MÓDULO + ESTADOS VAZIOS ----------
   Conjunto único: grade 24×24, traço 1,75 px, pontas arredondadas, ouro #D4AF37 sobre azul-marinho. Sem texto fixo (13 idiomas/RTL):
   a capa é só ícone + faixa de cor do módulo; o nome do módulo continua vindo das abas já traduzidas. Capas ocupam 52 px e não mudam a navegação. */
/* R405 — REMOVIDAS as 'capas de módulo' (faixa azul-marinho de 52px só com ícone, ::before de cada .hub-section): criavam uma barra vazia no topo de Turismo, Perfil, Oportunidades, Impacto, Votações, Marketplace, Empreendedor, Recompensas, Conta, Eventos, Esportes e Resgates. O nome do módulo já aparece nas abas/título; nenhum espaço foi substituído. */
html body .statement-empty:not(#mc)::before,html body .mn-empty:not(#mc)::before,html body .rv__empty:not(#mc)::before,html body .pp-empty:not(#mc)::before,html body .cm__empty:not(#mc)::before,html body .empty:not(#mc)::before,html body .mc-empty:not(#mc)::before,html body .eh-empty:not(#mc)::before{content:"";display:block;width:84px;height:84px;margin:0 auto 10px;background:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 96 96%22%3E%3Ccircle cx=%2248%22 cy=%2248%22 r=%2244%22 fill=%22%23EEF2F8%22/%3E%3Cpath d=%22M22 52l9-20h34l9 20v16a4 4 0 0 1-4 4H26a4 4 0 0 1-4-4V52z%22 fill=%22%23fff%22 stroke=%22%230b1f46%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M22 52h18a8 8 0 0 0 16 0h18%22 fill=%22none%22 stroke=%22%230b1f46%22 stroke-width=%223%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M48 14v8M35 18l4 6M61 18l-4 6%22 stroke=%22%23d4af37%22 stroke-width=%223%22 stroke-linecap=%22round%22/%3E%3C/svg%3E") center/contain no-repeat}

/* R378 — contraste real (medido por pixels): heróis azul-médio com texto dourado (3,6–4,3:1) → azul-marinho da marca (≥11:1);
   número do passo (branco sobre azul-médio, 3,7:1) → azul-marinho; "+" branco sobre botão claro (1,2:1) → herda a cor do botão. */
html body :is(.ct-hero,.cf-hero):not(#mc){background:radial-gradient(circle at 50% 0%,#1d4ba0 0%,#12306a 55%,#0b1f46 100%)!important}
html body .cf-step__n:not(#mc){background:linear-gradient(135deg,#12306a,#0b1f46)!important;color:#fff!important}
html body .px-plus:not(#mc){color:inherit!important}
/* Cartão virtual: texto branco pequeno sobre azul-médio (2,7–3,1:1) → azul-marinho (≥11:1), com filete dourado */
html body .vc:not(#mc){background:radial-gradient(circle at 18% 12%,#1d4ba0 0%,#12306a 55%,#0b1f46 100%)!important;box-shadow:0 18px 40px rgba(11,31,70,.35),inset 0 0 0 1px rgba(241,215,122,.35)}

/* R402 — "REDE SOCIAL" no menu inferior (antes CLUBE): cabe em celulares estreitos sem mexer nos outros itens */
html body .footer-nav .footer-nav__item--rede span:last-child { font-size: clamp(9.5px, 2.75vw, 11px); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 340px) { html body .footer-nav .footer-nav__item--rede span:last-child { font-size: 9.5px; white-space: normal; line-height: 1; text-align: center; overflow: visible; } }
