/* Community Fusion v44: una sola comunidad, cuatro destinos claros y sin renders antiguos visibles. */
/* COMMUNITY_SHELL_V65_FUSION_CHROME: el footer global y Más permanecen montados en Comunidad. */
/* UNIFIED_HEADER_V67: Fusion no es propietario del header principal. */
body.community-fusion-v44-mode[data-screen="communityPostDetail"] .mobile-header {
  display: none !important;
}

body.community-fusion-v44-mode .mobile-content {
  padding-bottom: 5.15rem !important;
}

body.community-fusion-v44-mode .community-hub-tabs,
body.community-fusion-v44-mode .community-hub-profile-strip,
body.community-fusion-v44-mode .community-hub-footer,
body.community-fusion-v44-mode [data-community-hub-footer] {
  display: none !important;
}

body.community-fusion-v44-mode .community-hub-header {
  position: sticky;
  top: 0;
  z-index: 28;
  margin-bottom: 0.7rem;
  background: rgba(255, 255, 255, 0.975) !important;
  backdrop-filter: blur(16px);
}

body[data-screen="community"]:not(.community-fusion-v44-ready) #communityList > *,
body[data-screen="communityPostDetail"]:not(.community-fusion-v44-ready) #communityPostDetail > * {
  visibility: hidden !important;
}

body[data-screen="community"]:not(.community-fusion-v44-ready) #screen-community,
body[data-screen="communityPostDetail"]:not(.community-fusion-v44-ready) #screen-communityPostDetail {
  position: relative;
  min-height: 72vh;
}

body[data-screen="community"]:not(.community-fusion-v44-ready) #screen-community::before,
body[data-screen="communityPostDetail"]:not(.community-fusion-v44-ready) #screen-communityPostDetail::before {
  position: absolute;
  z-index: 35;
  inset: 0.1rem 0.15rem auto;
  min-height: 30rem;
  border-radius: 1rem;
  content: "";
  background:
    linear-gradient(90deg, #eee9e1 25%, #f8f5ef 45%, #eee9e1 65%) 1rem 1rem / 40% .8rem no-repeat,
    linear-gradient(90deg, #eee9e1 25%, #f8f5ef 45%, #eee9e1 65%) 1rem 2.4rem / 68% .55rem no-repeat,
    linear-gradient(90deg, #eee9e1 25%, #f8f5ef 45%, #eee9e1 65%) 1rem 5rem / calc(100% - 2rem) 4.3rem no-repeat,
    linear-gradient(90deg, #eee9e1 25%, #f8f5ef 45%, #eee9e1 65%) 1rem 10rem / calc(100% - 2rem) 4.3rem no-repeat,
    linear-gradient(90deg, #eee9e1 25%, #f8f5ef 45%, #eee9e1 65%) 1rem 15rem / calc(100% - 2rem) 4.3rem no-repeat,
    linear-gradient(90deg, #eee9e1 25%, #f8f5ef 45%, #eee9e1 65%) 1rem 20rem / calc(100% - 2rem) 4.3rem no-repeat,
    #fff;
  background-size: 220% 100%, 220% 100%, 220% 100%, 220% 100%, 220% 100%, 220% 100%, auto;
  box-shadow: 0 0.45rem 1.2rem rgba(54, 39, 18, 0.05);
  animation: community-fusion-v44-shimmer 1.1s linear infinite;
}

/* COMMUNITY_SHELL_V65: estilos del antiguo footer Fusion eliminados. */

.community-fusion-page {
  display: grid;
  gap: 0.7rem;
  padding: 0.1rem 0.2rem 0.9rem;
}

.community-fusion-page-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid rgba(60, 49, 32, 0.08);
  border-radius: 1rem;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 0.45rem 1.2rem rgba(51, 38, 20, 0.045);
}

.community-fusion-page-head > span {
  display: grid;
  width: 3.1rem;
  height: 3.1rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #e1a128, #c57a00);
  box-shadow: 0 0.4rem 0.9rem rgba(183, 110, 0, 0.17);
}

.community-fusion-page-head svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.community-fusion-page-head div {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.community-fusion-page-head strong {
  color: #17130f;
  font-size: 1.08rem;
  font-weight: 1000;
  letter-spacing: -0.025em;
}

.community-fusion-page-head small {
  color: #746c62;
  font-size: 0.67rem;
}

.community-fusion-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 0.45rem;
  min-height: 12.8rem;
  border: 1px solid rgba(60, 49, 32, 0.08);
  border-radius: 1rem;
  padding: 1rem 0.6rem 0.7rem;
  background:
    radial-gradient(circle at 50% 0, rgba(225, 160, 37, 0.13), transparent 42%),
    #fff;
}

.community-fusion-podium article {
  display: grid;
  position: relative;
  place-items: center;
  align-content: center;
  gap: 0.22rem;
  min-width: 0;
  min-height: 8.5rem;
  border-radius: 0.85rem 0.85rem 0.35rem 0.35rem;
  padding: 0.7rem 0.35rem;
  background: #f7f3eb;
  text-align: center;
}

.community-fusion-podium article.is-place-1 {
  min-height: 10.5rem;
  background: linear-gradient(180deg, #fff8e8, #f5e2b4);
  box-shadow: 0 0.5rem 1rem rgba(184, 115, 0, 0.09);
}

.community-fusion-podium article.is-place-2 { background: linear-gradient(180deg, #fafafa, #e9e7e2); }
.community-fusion-podium article.is-place-3 { background: linear-gradient(180deg, #fff7ef, #ead2b6); }
.community-fusion-podium article.is-me { outline: 2px solid rgba(196, 121, 0, 0.28); }
.community-fusion-podium article > b { position: absolute; top: 0.45rem; right: 0.45rem; color: #a36500; font-size: 0.66rem; }
.community-fusion-podium article > strong { overflow: hidden; max-width: 100%; color: #26211b; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.community-fusion-podium article > small { color: #9d6100; font-size: 0.62rem; font-weight: 900; }
.community-fusion-podium article > em { color: #7d756c; font-size: 0.5rem; font-style: normal; line-height: 1.2; }
.community-fusion-podium-empty { min-height: 8rem; }

.community-fusion-avatar {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #7c5b28;
  background: #eee7dc;
  box-shadow: 0 0.18rem 0.55rem rgba(42, 31, 17, 0.1);
  font-size: 0.62rem;
  font-weight: 950;
}

.community-fusion-avatar.is-large {
  width: 3.75rem;
  height: 3.75rem;
  font-size: 0.82rem;
}

.community-fusion-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-fusion-ranking-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(60, 49, 32, 0.08);
  border-radius: 0.95rem;
  background: #fff;
}

.community-fusion-ranking-list article {
  display: grid;
  grid-template-columns: 1.5rem 2.3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 4.35rem;
  padding: 0.6rem 0.7rem;
}

.community-fusion-ranking-list article + article { border-top: 1px solid rgba(60, 49, 32, 0.07); }
.community-fusion-ranking-list article.is-me { background: #fff8e9; }
.community-fusion-ranking-list article > b { color: #8f867a; font-size: 0.7rem; text-align: center; }
.community-fusion-ranking-list article > span:not(.community-fusion-avatar) { display: grid; min-width: 0; gap: 0.12rem; }
.community-fusion-ranking-list article > span > strong { overflow: hidden; color: #29241e; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.community-fusion-ranking-list article > span > strong small { display: inline-block; margin-left: 0.2rem; border-radius: 999px; padding: 0.08rem 0.3rem; color: #9b6200; background: #ffecc4; font-size: 0.48rem; }
.community-fusion-ranking-list article > span > em { color: #81796f; font-size: 0.51rem; font-style: normal; }
.community-fusion-ranking-list article > strong { color: #9c6200; font-size: 0.67rem; white-space: nowrap; }

.community-fusion-ranking-note {
  margin: 0;
  padding: 0.45rem 0.65rem;
  color: #81786d;
  font-size: 0.53rem;
  line-height: 1.35;
  text-align: center;
}

.community-fusion-profile-card {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(60, 49, 32, 0.08);
  border-radius: 1rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 90% 15%, rgba(216, 151, 29, 0.12), transparent 35%),
    #fff;
  box-shadow: 0 0.45rem 1.2rem rgba(51, 38, 20, 0.045);
}

.community-fusion-profile-card > div {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.community-fusion-profile-card > div small { color: #a46600; font-size: 0.57rem; font-weight: 850; }
.community-fusion-profile-card > div strong { overflow: hidden; color: #1c1813; font-size: 0.9rem; text-overflow: ellipsis; white-space: nowrap; }
.community-fusion-profile-card > div em { color: #787067; font-size: 0.56rem; font-style: normal; }
.community-fusion-profile-card > button { min-height: 2.2rem; border: 1px solid rgba(190, 116, 0, 0.35); border-radius: 0.6rem; padding: 0 0.55rem; color: #9d6100; background: #fff; font: inherit; font-size: 0.57rem; font-weight: 850; cursor: pointer; }

.community-fusion-profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(60, 49, 32, 0.08);
  border-radius: 0.9rem;
  background: #fff;
}

.community-fusion-profile-metrics span {
  display: grid;
  min-height: 4.5rem;
  place-items: center;
  align-content: center;
  gap: 0.1rem;
  padding: 0.45rem 0.2rem;
  text-align: center;
}

.community-fusion-profile-metrics span + span { border-left: 1px solid rgba(60, 49, 32, 0.07); }
.community-fusion-profile-metrics b { color: #211c16; font-size: 0.92rem; }
.community-fusion-profile-metrics small { color: #80786e; font-size: 0.52rem; }

.community-fusion-profile-link {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  min-height: 4rem;
  border: 1px solid rgba(60, 49, 32, 0.08);
  border-radius: 0.85rem;
  padding: 0.65rem 0.75rem;
  color: #7e766c;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.community-fusion-profile-link > svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: #bd7600; stroke-width: 1.7; }
.community-fusion-profile-link > span { display: grid; gap: 0.08rem; }
.community-fusion-profile-link strong { color: #2b261f; font-size: 0.68rem; }
.community-fusion-profile-link small { color: #837b72; font-size: 0.54rem; }

.community-fusion-empty {
  display: grid;
  min-height: 13rem;
  place-items: center;
  align-content: center;
  gap: 0.4rem;
  border: 1px solid rgba(60, 49, 32, 0.08);
  border-radius: 1rem;
  padding: 1.1rem;
  background: #fff;
  text-align: center;
}

.community-fusion-empty > span { font-size: 2rem; }
.community-fusion-empty strong { color: #1c1813; font-size: 0.9rem; }
.community-fusion-empty p { max-width: 18rem; margin: 0; color: #7c746a; font-size: 0.64rem; line-height: 1.4; }
.community-fusion-empty button { min-height: 2.4rem; margin-top: 0.2rem; border: 0; border-radius: 0.65rem; padding: 0 0.85rem; color: #fff; background: #c37a00; font: inherit; font-size: 0.64rem; font-weight: 900; }

@keyframes community-fusion-v44-shimmer {
  from { background-position: 180% 0, 180% 0, 180% 0, 180% 0, 180% 0, 180% 0, 0 0; }
  to { background-position: -40% 0, -40% 0, -40% 0, -40% 0, -40% 0, -40% 0, 0 0; }
}

@media (max-width: 560px) {
  .community-fusion-v44-footer small { font-size: 0.57rem; }
  .community-fusion-podium { gap: 0.3rem; padding-inline: 0.4rem; }
  .community-fusion-podium article { padding-inline: 0.2rem; }
  .community-fusion-profile-card { grid-template-columns: 3.8rem minmax(0, 1fr); }
  .community-fusion-profile-card > button { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-screen="community"]:not(.community-fusion-v44-ready) #screen-community::before,
  body[data-screen="communityPostDetail"]:not(.community-fusion-v44-ready) #screen-communityPostDetail::before {
    animation: none;
  }
}
